Microagents are software entities that can interact with each other to achieve specific goals. Fetch.ai's uAgents package is a fast and lightweight python library that makes it easy to build microagents for different kinds of decentralized use cases. Microagents can be programmed to perform a wide range of tasks, such as buying and selling goods, booking appointments, managing finances, and so on. Microagents are designed to be intelligent, adaptable, and autonomous, meaning they can make decisions and take actions on their own without human intervention.
Microagents offer several advantages, including:
Easy to pick up: the quick guides available on our website allow you to create a microagent in a few minutes.
Customization: any type of microagent can be created to meet the most specific needs.
Connectivity: your microagents automatically join the micro-Agents network at start-up, through registration on the Fetch.ai Almanac smart contract.
Security: the messages exchanged and the wallets used by microagents are cryptographically protected.
Independence: your microagent is platform and language independent, with the exchange protocol defined in standard data types and soon to be available in additional languages.
Let's get set up to develop microagents! First, make sure you have satisfied all the system requirements needed to go on with the installation process.
Fetch.ai's microagents package is a Python library that runs on Ubuntu/Debian, MacOS, and Windows.
Once the system requirements are met, you need to create a specific directory for your micro-Agents projects. So go ahead and create a directory on your system and enter it.
Although optional, we strongly recommend that you use a virtual environment when developing your micro-Agents.
A virtual environment lets you create an isolated environment for a Python project, so that the project's dependencies and packages do not conflict with other Python projects on the same system. This ensures that the project's dependencies are isolated, and makes it easier to manage dependencies for the project.
You can use any of the standard Python virtual environment providers, such as poetry or pipenv.
Create and enter a new poetry virtual environment:
poetry init -n && poetry shell
Create and enter a new pipenv environment:
pipenv --python 3.10 && pipenv shell
Now let's install the microagents library from the Python Package Index (PyPI):
pipenv install uagents
This will download and install the latest version of the microagents library, along with any dependencies it requires.
Note: to check if microagent library is installed:
pip show uagents
Once the requirements are being satisfied, you will be ready to go on with the installation process. First of all, you need to create a specific directory for your project which will contain all the scripts you need to create. Let’s create a directory named "micro_agents_example":
mkdir micro_agents_example
We then need to enter it. Once you enter the directory, you will need to create and activate the virtual environment.
pipenv install pipenv shell
then, you can proceed with the installation of the microagents python package.
pipenv install uagents
We can check if the package has been installed.
pip show uagents
Now, installation is complete! You are ready to create your first microagent!
For more information visit the microagents GitHub repository or our documentation. Also, do not miss any other related piece of content, such as our latest microagents blog post The Dawn of Microagents.