• Stars
    star
    834
  • Rank 54,676 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A fast and lightweight framework for creating decentralized agents with ease.

uAgents: AI Agent Framework

Official Website Unit Tests GitHub Repo stars Twitter Follow

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 put into 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.8, 3.9, 3.10, or 3.11:

cd python
poetry install
poetry shell

Running a Demo

Creating an Agent

Build your first uAgent using the following script:

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 random addresses each time.

Giving it a task

Give it a simple task, such as greeting:

@alice.on_interval(period=2.0)
async def say_hello(ctx: Context):
    ctx.logger.info(f'hello, my name is {ctx.name}')

if __name__ == "__main__":
    alice.run()

Running the Agent

So far, your code should look like this:

from uagents import Agent, Context

alice = 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.name}')

if __name__ == "__main__":
    alice.run()

Run it using:

python agent.py

You should see the results in your terminal.

πŸ“– Documentation

Please see the official documentation for full setup instructions and advanced features.

🌱 Examples

The examples folder contains several examples of how to create and run various types of agents.

Python Library

Go to the 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 for more details.

πŸ“„ Development Guidelines

Read our development guidelines to learn some useful tips related to development.

❓ Issues, Questions, and Discussions

We use GitHub Issues for tracking requests and bugs, and GitHub Discussions for general questions and discussion.

πŸ›‘ Disclaimer

This project, ΞΌAgent, 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

License

The uAgents project is licensed under Apache License 2.0.

More Repositories

1

agents-aea

A framework for autonomous economic agent (AEA) development
Python
202
star
2

cosmpy

A Python client library for interacting with blockchains based on the Cosmos-SDK
Python
127
star
3

fetchd

Source code for Fetch.ai blockchain nodes
Go
98
star
4

ledger

Official Fetch.AI Ledger C++ implementation
C++
78
star
5

docs-archived

This repo contains documentation for public Fetch.ai products.
Makefile
57
star
6

colearn

Colearn is a collection of protocols for running multi-stakeholder machine learning that preserve data privacy
Python
36
star
7

ledger-archive

C++
28
star
8

agents-tac

Competition and Agent Frameworks for the Trading Agents Competition
Jupyter Notebook
27
star
9

research-dvrf

C++ implementation of Distributed Verifiable Random Functions
C++
24
star
10

ledger-api-py

Official Python client library for interacting with the Fetch.AI Ledger
Python
18
star
11

mettalex-market-maker

Solidity
15
star
12

carpark_agent

Fetch.ai Carpark agent - A Raspberry Pi CCTV camera project to broadcast numbers of available car parking spaces on the Fetch.ai network
Python
14
star
13

cosmos-sdk

Fetch.ai fork of the Cosmos SDK
Go
12
star
14

genesis-launch

Repo for launch of Fetch.ai main-net
11
star
15

ledger-staking-contract

Solidity
10
star
16

jenesis

Python
8
star
17

etch-examples

Python
8
star
18

cosmos-explorer

Fetch.ai network explorer
JavaScript
8
star
19

website-token-information

Website containing information about FET token trends
JavaScript
7
star
20

agents-template

A template repo for development with the AEA framework
Shell
7
star
21

agentverse

Public repository for Agentverse
7
star
22

docs

Fetch.ai documentation for AI Agents, AI Engine, Fetch Network and more.
MDX
6
star
23

mettalex-documentation

Public documentation for Mettalex
5
star
24

staking-contract

Smart contract implementing the Fetch Dutch Staking Auctions
JavaScript
5
star
25

tools-etch-code-highlighter

Etch code highlighters
Vim Script
5
star
26

uAgents-examples

A collection of uAgents project examples
Python
4
star
27

docker-images

Dockerfiles, scripts and setup necesary to build docker images used by Fetch.ai (e.g. for build, CI, etc. ...)
Shell
4
star
28

agents-yoti

A repo to explore integrating the AEA framework (https://docs.fetch.ai/aea) with Yoti (https://www.yoti.com).
Python
4
star
29

FIPs

The Fetch Improvement Proposals repository
4
star
30

cra-template-cosmjs-keplr

A create-react-app template for DApps which interact with cosmos-based networks as well as the Fetch wallet and Keplr
JavaScript
3
star
31

cosmos-consensus

Integration of the Fetch DRB with the Tendermint consensus
Go
3
star
32

ledger-api-javascript

Official Javascript client library for interacting with the Fetch.AI Ledger
TypeScript
3
star
33

fetch-ethereum-bridge-v1

Rust
3
star
34

pyOEF

Python
2
star
35

improvement-proposals

2
star
36

docker-constellation

Docker image repository for generating a docker build
Python
2
star
37

networks-beaconworld

2
star
38

networks-agentland

Information for connecting to the Agentland testnet
2
star
39

genesis-fetchhub

repo for launching Stargate upgrade of Fetch.ai mainnet
JavaScript
2
star
40

ai-engine-sdk-python

Python
2
star
41

project-agent-platform

A repository for collecting feedback with the agent platform project
1
star
42

mettalex-sdk

Python
1
star
43

wallet-browser-extension

TypeScript
1
star
44

genesis-prelaunch

Repository for coordinating prelaunch network starts
1
star
45

tendermint

Go
1
star
46

etch-demos

Etch demo versions of popular Ethereum tutorial dApps.
Jupyter Notebook
1
star
47

tools-pocketbook

Python based CLI wallet for testing ledger instances
Python
1
star
48

apps-wallet-chrome-extension

JavaScript
1
star
49

cw-fetch-std

A Rust library for CosmWasm smart contract development
Rust
1
star
50

demo-collective-learning

Demo code for the Collective Learning Medium article
Jupyter Notebook
1
star
51

avctl

Command line tool for interacting with Agentverse hosted services
1
star
52

agents-manager-app-site

Website for AEA Manager app
HTML
1
star
53

babble

A python client library for sending messages via the memorandum service
Python
1
star