A framework for autonomous economic agent (AEA) development
-
Create and launch a clean virtual environment with Python 3.7 (any Python
>=
3.6 works):pipenv --python 3.7 && pipenv shell
-
Install the package from PyPI:
pip install aea[all]
Or, if you use
zsh
rather thanbash
:pip install "aea[all]"
-
Then, build your agent as described in the docs.
This approach is not recommended!
This repository contains submodules. Clone with recursive strategy:
git clone https://github.com/fetchai/agents-aea.git --recursive && cd agents-aea
-
To fetch/update submodules (for existing local repo):
git submodule sync --recursive && git submodule update --init --recursive
All python specific framework dependencies are specified in setup.py
and installed with the framework. All development dependencies are specified in Pipfile
(and installed via the commands specified in Preliminaries).
You can have more control on the installed dependencies by leveraging the setuptools' extras mechanism.
-
Create and launch a virtual environment with Python 3.7 (any Python
>=
3.6 works):pipenv --python 3.7 && pipenv shell
-
Install the package from source:
pip install .[all]
Or, if you use
zsh
rather thanbash
:pip install ".[all]"
-
Then, build your agent as described in the docs.
The following dependency is only relevant if you intend to contribute to the repository:
-
All Pull Requests should be opened against the
develop
branch. Do not open a Pull Request againstmain
! -
The project uses Google Protocol Buffers compiler for message serialization. A guide on how to install it is found here.
The following steps are only relevant if you intend to contribute to the repository. They are not required for agent development.
-
The simplest way to get setup for development on the framework is to run the following:
make new_env pipenv shell
-
For linting and static analysis use:
make lint make static make pylint make security
-
For checking packages integrity:
make package_checks
-
For testing
aea.{SUBMODULE}
withtests/test_{TESTMODULE}
use:make dir={SUBMODULE} tdir={TESTMODULE} test-sub
e.g.
make dir=cli tdir=cli test-sub
-
To install development dependencies manually (here optionally skipping
Pipfile.lock
creation):pipenv install --dev --skip-lock
-
To install the package from source in development mode:
pip install -e .[all]
Of, if you use
zsh
rather thanbash
:pip install -e ".[all]"
-
To run tests:
tox -e py3.7
ormake test
. To only test specific modules trymake dir=PATH_TO_MODULE tdir=PATH_TO_TESTS test-sub
where (e.g.make dir=cli tdir=cli test-sub
). -
To run linters (code style checks) and code formatters:
tox -e flake8
andtox -e black
andtox -e isort
ormake lint
-
To run static type checks:
tox -e mypy
ormake static
-
To run
pylint
:tox -e pylint
ormake pylint
-
To run security checks:
tox -e bandit
andtox -e safety
ormake security
-
The
fetchai/p2p_libp2p
package is partially developed in Go. -
To install Go visit the Golang site.
-
We use
golines
andgolangci-lint
for linting. -
To run tests, use
go test -p 1 -timeout 0 -count 1 -v ./...
from the root directory of the package. If you experience installation or build issues rungo clean -modcache
.
-
To start a live-reloading docs server on localhost:
mkdocs serve
. To amend the docs, create a new documentation file indocs/
and add a reference to it inmkdocs.yml
. -
To run demos against local packages use flag
--local
inaea
CLI commands.
If you are using our software in a publication, please consider to cite it with the following BibTex entry:
@misc{agents-aea,
Author = {Marco Favorito and David Minarsch and Ali Hosseini and Aristotelis Triantafyllidis and Diarmid Campbell and Oleg Panasevych and Kevin Chen and Yuri Turchenkov and Lokman Rahmani and Jiří Vestfál and James Riehl},
Title = {Autonomous Economic Agent (AEA) Framework},
Year = {2019},
}