Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fetchai/uAgents
A fast and lightweight framework for creating decentralized agents with ease.
https://github.com/fetchai/uAgents
agents ai ai-agents llm multi-agent-systems
Last synced: 2 days ago
JSON representation
A fast and lightweight framework for creating decentralized agents with ease.
- Host: GitHub
- URL: https://github.com/fetchai/uAgents
- Owner: fetchai
- License: apache-2.0
- Created: 2022-09-28T17:31:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T14:47:34.000Z (10 days ago)
- Last Synced: 2024-10-29T15:15:07.469Z (10 days ago)
- Topics: agents, ai, ai-agents, llm, multi-agent-systems
- Language: Python
- Homepage:
- Size: 29.5 MB
- Stars: 981
- Watchers: 19
- Forks: 235
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-agents - uAgents
- awesome-langchain-zh - uAgents
- awesome-langchain - uAgents
README
# uAgents: AI Agent Framework
[![Official Website](https://img.shields.io/badge/Official%20Website-fetch.ai-blue?style=flat&logo=world&logoColor=white)](https://fetch.ai) [![Unit Tests](https://img.shields.io/github/actions/workflow/status/Fetchai/uAgents/ci-tests.yml?label=unit%20tests)](https://github.com/Fetchai/uAgents/actions/workflows/ci-tests.yml) [![GitHub Repo stars](https://img.shields.io/github/stars/Fetchai/uAgents?style=social)](https://github.com/Fetchai/uAgents/stargazers) [![Twitter Follow](https://img.shields.io/twitter/follow/fetch_ai?style=social)](https://twitter.com/fetch_ai)
uAgents is a library developed by Fetch.ai that allows for creating autonomous AI agents in Python. With simple and expressive decorators, you can have an agent that performs various tasks on a schedule or takes action on various events.
## π Features
- π€ **Easy creation and management**: Create any type of agent you can think of and implement it in code.
- π **Connected**: On startup, each agent automatically joins the fast growing network of uAgents by registering on the Almanac, a smart contract deployed on the Fetch.ai blockchain.
- π **Secure**: uAgent messages and wallets are cryptographically secured, so their identities and assets are protected.## β‘ Quickstart
### Installation
Get started with uAgents by installing it for Python 3.9 to 3.12:
pip install uagents
### Running a Demo
#### Creating an Agent
Build your first uAgent using the following script:
```python3
from uagents import Agent, Context
alice = Agent(name="alice", seed="alice recovery phrase")
```Include a seed parameter when creating an agent to set fixed addresses, or leave it out to generate a new random address each time.
#### Giving it a task
Give it a simple task, such as a greeting:
```python3
@alice.on_interval(period=2.0)
async def say_hello(ctx: Context):
ctx.logger.info(f'hello, my name is {ctx.agent.name}')if __name__ == "__main__":
alice.run()
```#### Running the Agent
So far, your code should look like this:
```python3
from uagents import Agent, Contextalice = Agent(name="alice", seed="alice recovery phrase")
@alice.on_interval(period=2.0)
async def say_hello(ctx: Context):
ctx.logger.info(f'hello, my name is {ctx.agent.name}')if __name__ == "__main__":
alice.run()
```Run it using:
```bash
python agent.py
```You should see the results in your terminal.
## π Documentation
Please see the [official documentation](https://fetch.ai/docs) for full setup instructions and advanced features.
- [π Introduction](https://fetch.ai/docs/concepts/agents/agents)
- [π» Installation](https://fetch.ai/docs/guides/agents/installing-uagent)
- Tutorials
- [π€ Create an agent](https://fetch.ai/docs/guides/agents/create-a-uagent)
- [π£οΈ Agent Communication](https://fetch.ai/docs/guides/agents/communicating-with-other-agents)
- [π½οΈ Restaurant Booking Demo](https://fetch.ai/docs/guides/agents/booking-demo)
- Key Concepts:
- [πAddresses](https://fetch.ai/docs/guides/agents/getting-uagent-address)
- [πΎ Storage](https://fetch.ai/docs/guides/agents/storage-function)
- [π Interval Tasks](https://fetch.ai/docs/guides/agents/interval-task)
- [π Agent Broadcast](https://fetch.ai/docs/guides/agents/broadcast)
- [βοΈ Almanac Contracts](https://fetch.ai/docs/guides/agents/register-in-almanac)## π± Examples
The [`examples`](https://github.com/fetchai/uAgents/tree/main/python/examples) folder contains several examples of how to create and run various types of agents.
## π² Integrations
The [`integrations`](https://github.com/fetchai/uAgents/tree/main/integrations) folder contains examples that provide a more in depth use of the uAgents library.
## Python Library
Go to the [`python`](https://github.com/fetchai/uAgents/tree/main/python) folder for details on the Python uAgents library.
## β¨ Contributing
All contributions are welcome! Remember, contribution includes not only code, but any help with docs or issues raised by other developers. See our [contribution guidelines](https://github.com/fetchai/uAgents/blob/main/CONTRIBUTING.md) for more details.
### π Development Guidelines
Read our [development guidelines](https://github.com/fetchai/uAgents/blob/main/DEVELOPING.md) to learn some useful tips related to development.
### β Issues, Questions, and Discussions
We use [GitHub Issues](https://github.com/fetchai/uAgents/issues) for tracking requests and bugs, and [GitHub Discussions](https://github.com/fetchai/uAgents/discussions) for general questions and discussion.
## π‘ Disclaimer
This project, uAgents, is provided "as-is" without any warranty, express or implied. By using this software, you agree to assume all risks associated with its use, including but not limited to unexpected behavior, data loss, or any other issues that may arise. The developers and contributors of this project do not accept any responsibility or liability for any losses, damages, or other consequences that may occur as a result of using this software.
## License
The uAgents project is licensed under [Apache License 2.0](https://github.com/fetchai/uAgents/blob/main/LICENSE).