Skip to main content

Python-based framework for heterogeneous agent communities

Project description

PEAK - Python-based framework for heterogenous agent communities

GitHub GitHub branch checks state

PEAK is a multi-agent system framework which helps the users develop, monitor, analyze and maintain ecosystem of heterogeneous agent communities. This ecosystem is where various multi-agent systems can coexist, interact and share resources between them. This framework is based on SPADE.

Prerequisites

  • Python == 3.9.6
  • XMPP Server (configurations, more on that later)
  • Linux or Windows (Mac not tested)

Installing PEAK

Conda

To install using conda, download the environment.yml file from the repository and then use the following command:

$ conda env create --file environment.yml	

This will create a conda environment called peak.

Pip

To install using pip, just type the following command:

$ pip install peak

Using PEAK

Notes on SPADE

As already said PEAK is based on SPADE. This means that every functionality of SPADE is available to the user. We highly recommend you to see SPADE examples and documentation before starting using PEAK. Once you are familiarized with SPADE's mechanics you can start using PEAK.

Notes on XMPP

To run any PEAK's agent you will need a XMPP server. You can either configure one on your machine, remotely or use a public server. The only issue with the public servers is that they don't usually have all the configurations required to run some PEAK's functionalities. To configure the server you can read the "Configure XMPP server" section in the documentation.

Single Agent

One thing that was added in PEAK was the way the user executes the agents. PEAK added a CLI, inspired in JADE, to help the user execute end configure each agent in a easy and intuitive manner. In this example we will show you how to execute a single agent. Save the following code in a file called agent.py.

from peak import Agent

from peak.behaviours import OneShotBehaviour

  
  

class agent(Agent):

    class HelloWorld(OneShotBehaviour):

        async def run(self) -> None:

            print("Hello World")

            await self.agent.stop()

  

    async def setup(self) -> None:

        self.add_behaviour(self.HelloWorld())

It is necessary that the name of the file is the same as the name of the agent's class so PEAK can do the proper parsing. This agent only has a behavior that prints to the terminal the "Hello World" message. To execute the agent just type the following command:

$ peak path/to/agent.py -j agent@localhost

Change the localhost to the domain of the XMPP server you want to connect.

Note

If you want to know more about each command we recommend reading the documentation or using the -h option to see the help message.

For more advanced functionalities and examples we recommend you to head forward to the documentation website.

Support

Use the Discussion page if you have any questions or ideas you would like so see implemented. To alert an issue or a bug please post in the Issues page.

Roadmap

This are some functionalities that are being developed and will be released in a near future:

  • Create a Docker for XMPP server and PEAK.
  • Add dynamic speed option to PEAK's internal clock.
  • Add multi-threading option to the execution configurations.
  • Implement Yellow Page Service in DF agent.
  • Implement Data Analysis section in the Dashboard.

Contributing to PEAK

Pull requests are welcome. For major changes, please open a discussion first to discuss what you would like to change.

The examples are used as a form of testing the framework. So please make sure to update the examples as appropriate or make new ones.

To format the code please use the black and isort packages.

For the commits please follow the Conventional Commits Guideline.

License

PEAK is free and open-source software licensed under the GNU General Public License v3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peak-mas-1.0.1.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

peak_mas-1.0.1-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file peak-mas-1.0.1.tar.gz.

File metadata

  • Download URL: peak-mas-1.0.1.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for peak-mas-1.0.1.tar.gz
Algorithm Hash digest
SHA256 64493d831aadf438e5b72aed63a5a3faebb14caa769bbe0c4f0e8bb6dbfc2a36
MD5 b3251b0e096522e7362adf7ec80c4ac1
BLAKE2b-256 521e8776cc365b141114671da5a4a869d8dbf5c225c2574415a639e8d1fd1977

See more details on using hashes here.

File details

Details for the file peak_mas-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: peak_mas-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for peak_mas-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b077c3bfee7f2753e9124ec4e681c4cdfd0a87c298363fcefbe314ac1f7415e7
MD5 cfd7d25b3fca5f3e81d0447630ce38b4
BLAKE2b-256 c1a18cf02041497b2b28613705bae96e153751e07523f3623477d492d69b514f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page