fetch-logo
ConceptsConceptsGuidesGuidesExamplesExamplesReferencesReferencesAPIsAPIs
GitHub (opens in a new tab)
  • Guides
      • Quickstart
        • What's an Agent?
        • uAgents Framework installation
        • Create your first agent
        • Agents address
        • Communicating with other agents
        • Agent Handlers (on_...)
        • Agents storage functions
        • Public and private Agents
        • Send tokens with Agents
        • Agents Mailboxes
        • Agent Functions
        • Make agents AI Engine compatible
        • Multi-file agent pipeline for AI Engine: Hugging face API to create a multi agent pipeline
        • Options for running local agents
        • Hosted agent
        • Introducing dialogues
        • Almanac Contract
        • Verify messages with Agents
        • Multi-file agent pipeline for AI Engine: Network of Primary and Secondary functions in Agentverse
        • Localwallet
        • Agentverse: Hosted Agents
        • Agentverse: Dice Roll agent
        • Agentverse: Allowed Imports
        • Agentverse: Mailbox
        • Register Agentverse Functions
        • Agentverse Functions: coin toss agent
        • Field descriptions for DeltaV
        • Agentverse Command Line Interface (AVCTL)
        • AVCTL Hosting commands
      • Agents and Functions creation APIs
      • Secret Management APIs
      • How to convert native FET to and from ERC-20 FET
      • How to stake FET tokens
      • Different ways of staking FET
      • Re-delegating staked FET token
      • Reconciliation service
      • How to setup a Multisig Wallet
        • Getting started
        • How to use the Fetch wallet
        • How to stake and claim rewards
        • Address book
        • Connections
        • Fetch Wallet Hardware Connection Guide
        • Installation
        • Connecting to a blockchain
        • Querying balances
        • Wallets and private keys
        • Sending funds
        • Staking
        • Smart contracts
          • Stake auto-compounder
          • Stake optimizer
          • Oracles
          • Wallet top-up
          • Liquidity pool
          • Swap automation
        • Installation️
        • Getting started
        • Keys
          • How to add profiles
          • How to add contract templates
          • How to compile contracts
          • How to deploy contracts
          • Contract interaction
        • Installation
        • How to use chain state snapshots
        • State-synchronization (state-sync)
        • How to set up a validator node
        • How to join a testnet
        • How to run a single node test network
        • Governance
        • How to get testnet tokens via the Token Faucet
          • CLI - Introduction
          • CLI - Managing keys
          • CLI - Managing tokens
          • CLI - Multisig keys
          • CLI - Delegation
          • Governance proposals
      • Agents 101
      • Agents 101 for AI Engine
  • Guides
      • Quickstart
        • What's an Agent?
        • uAgents Framework installation
          • System Requirements
          • Install with Pip
          • Install from source code
          • Troubleshooting
          • Simplified Installation for Windows users
          • Installing other essential python libraries
          • Development tools
        • Create your first agent
        • Agents address
        • Communicating with other agents
        • Agent Handlers (on_...)
        • Agents storage functions
        • Public and private Agents
        • Send tokens with Agents
        • Agents Mailboxes
        • Agent Functions
        • Make agents AI Engine compatible
        • Multi-file agent pipeline for AI Engine: Hugging face API to create a multi agent pipeline
        • Options for running local agents
        • Hosted agent
        • Introducing dialogues
        • Almanac Contract
        • Verify messages with Agents
        • Multi-file agent pipeline for AI Engine: Network of Primary and Secondary functions in Agentverse
        • Localwallet
        • Agentverse: Hosted Agents
        • Agentverse: Dice Roll agent
        • Agentverse: Allowed Imports
        • Agentverse: Mailbox
        • Register Agentverse Functions
        • Agentverse Functions: coin toss agent
        • Field descriptions for DeltaV
        • Agentverse Command Line Interface (AVCTL)
        • AVCTL Hosting commands
      • Agents and Functions creation APIs
      • Secret Management APIs
      • How to convert native FET to and from ERC-20 FET
      • How to stake FET tokens
      • Different ways of staking FET
      • Re-delegating staked FET token
      • Reconciliation service
      • How to setup a Multisig Wallet
        • Getting started
        • How to use the Fetch wallet
        • How to stake and claim rewards
        • Address book
        • Connections
        • Fetch Wallet Hardware Connection Guide
        • Installation
        • Connecting to a blockchain
        • Querying balances
        • Wallets and private keys
        • Sending funds
        • Staking
        • Smart contracts
          • Stake auto-compounder
          • Stake optimizer
          • Oracles
          • Wallet top-up
          • Liquidity pool
          • Swap automation
        • Installation️
        • Getting started
        • Keys
          • How to add profiles
          • How to add contract templates
          • How to compile contracts
          • How to deploy contracts
          • Contract interaction
        • Installation
        • How to use chain state snapshots
        • State-synchronization (state-sync)
        • How to set up a validator node
        • How to join a testnet
        • How to run a single node test network
        • Governance
        • How to get testnet tokens via the Token Faucet
          • CLI - Introduction
          • CLI - Managing keys
          • CLI - Managing tokens
          • CLI - Multisig keys
          • CLI - Delegation
          • Governance proposals
      • Agents 101
      • Agents 101 for AI Engine
Guides
AI Agents
Getting Started
uAgents Framework installation

Installing the uAgents Framework

System Requirements

Fetch.ai's uagents ↗️ (opens in a new tab) Frameworks package is a Python library running on Ubuntu/Debian, MacOS, and Windows systems.

On your computer, you may need to install:

  • Python ↗️ (opens in a new tab) 3.8+.
  • PIP ↗️ (opens in a new tab) - the Python package manager.
  • Poetry ↗️ (opens in a new tab) for virtual environments (optional).
  • uagents library ↗️ (opens in a new tab)

Install with Pip

  1. Create a directory for your agents project: mkdir directory_name

  2. Within the directory, create and open a virtual environment using Poetry: poetry init -n && poetry shell

  3. Install Fetch.ai uagents library: pip install uagents

  4. Check if installation was successful: pip show uagents

ℹ️

If you want to install a specific version of the uagents library (e.g., 0.12.0), you can do so by running the following:

pip install uagents==0.12.0

Install from source code

  1. Download the latest released version from Github and navigate to the agents directory:

    git clone https://github.com/fetchai/uAgents.git
    cd uAgents
  2. Install the required dependencies:

    poetry install
  3. Open the virtual environment:

    poetry shell

Troubleshooting

It is possible that you may face issues during the installation process. Here, you can find common problems and their solutions.

🚫

Problem (MacOS/Python 3.11): Installing coincurve (17.0.0): Failed

Solution: install the latest versions of automake, autoconf, and libtool: brew install automake autoconf libtool

For any other problems, please let us know by creating an issue ↗️ (opens in a new tab).

Simplified Installation for Windows users

Installing the uagents framework on a Windows machine is a straightforward process. The uagents library is a Python package, so you'll need to have Python installed on your system before you can use it.

If you don't already have Python installed on your Windows machine, visit the official Python website at Python ↗️ (opens in a new tab) and download the latest stable version of Python for Windows.

Run the downloaded installer executable file (e.g., python-3.x.x.exe).

During installation, make sure to check the box that says "Add Python X.X to PATH." This will automatically add Python to your system's PATH variable, making it easier to use from the command line.

Install uagents library using pip

Once you have Python installed and added to your PATH, follow these steps to install the uagents framework using pip:

  1. To install using PIP open your terminal. To ensure that PIP (Python's package manager) is up-to-date, run the following command:

    python -m pip install --upgrade pip
  2. Now, you can install the uagents framework by running the following command:

    pip install uagents

PIP will download and install the uagents package and its dependencies. Wait for the process to complete. To verify the complete installation explore your terminal. As part of the installation you will see a message showcasing the completion of the installation as well as the exact version.

Installing other essential python libraries

Installing AI Engine library

If you wish to create AI Engine ↗️ compatible Agents, you will need to get the uagents-ai-engine package installed. Checkout the AI Engine package ↗️ (opens in a new tab) to download it and start developing your AI Engine compatible Agents.

You can install AI Engine with pip: pip install uagents-ai-engine

ℹ️

Explore the additional resources we have on AI Engine compatible Agents:

  • DeltaV ↗️
  • Agent Functions ↗️
  • Make your agents AI Engine compatible ↗️
  • Register Agent Functions ↗️

Development tools

Installing Homebrew

Homebrew streamlines software installations on MacOS via the command line. To install and update Homebrew, execute the following commands:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You can verify it here ↗️ (opens in a new tab). Let's then ensure Homebrew is updated:

brew update
ℹ️

For more information on Homebrew explore their website ↗️ (opens in a new tab).

Installing PyEnv

Now, you need to install PyEnv. It is a simple tool to manage multiple versions of Python. Run:

brew install pyenv

Once you have installed PyEnv you can configure the shell environment:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
ℹ️

These commands configure your shell environment (specifically the Zsh shell) to work with PyEnv. These commands set up environment variables, modify the PATH, and initialize PyEnv so that you can easily manage and switch between different Python versions. You can verify all steps here ↗️ (opens in a new tab).

You are now ready to install Python if you haven't done it yet. You need to install a version of Python 3.8 or above (for this example, we use version 3.10):

pyenv install 3.10

You can get help or check a command insights by running:

pyenv help

Let's now ensure the global version of Python you are working with is not the default one in the system. Run:

pyenv global 3.10 # this sets the global interpreter
pyenv versions # this verifies if it is set up correctly

Installing Poetry

You now need to install Poetry. Poetry is used for managing Python project dependencies, handling virtual environments, packaging, and publishing Python libraries or applications.

You can install Poetry by running the following command:

curl -sSL https://install.python-poetry.org | python3 -
ℹ️

If you would like to learn more about Poetry, visit the website ↗️ (opens in a new tab) for further information.

Initialize your project with Poetry

You now have all necessary tools installed. You are ready to initialize your project! Let's create a working directory and initialize Poetry 🎉.

First, you need to create a working directory for your project using mkdir command. Then, you will need to change directory to this one, using cd command:

mkdir development/agent-demo
cd development/agent-demo

You can ensure you are in the correct directory by checking your current path:

pwd
# Example output: /Users/Jessica/Documents

If you are happy with the install location for the project, go ahead and initialize Poetry:

poetry init
ℹ️

Follow the setup wizard to provide details including project name, version, author, license, and select dependencies (e.g., uagents).

Once you complete the initialization, run:

poetry install

This command will install the dependencies specified in the pyproject.toml file.

Was this page helpful?

What's an Agent?Create your first agent
footer-logo

Main website

Integrations

Events

We’re hiring!

Twitter (opens in a new tab)Telegram (opens in a new tab)Discord (opens in a new tab)GitHub (opens in a new tab)Youtube (opens in a new tab)LinkedIn (opens in a new tab)Reddit (opens in a new tab)
Sign up for developer updates