{"id":15023837,"url":"https://github.com/gecad-group/peak-mas","last_synced_at":"2025-09-08T03:44:30.392Z","repository":{"id":45757801,"uuid":"407598783","full_name":"gecad-group/peak-mas","owner":"gecad-group","description":"PEAK is a framework to build and manage multiagent ecosystems.","archived":false,"fork":false,"pushed_at":"2025-08-05T16:25:08.000Z","size":4957,"stargazers_count":7,"open_issues_count":37,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T18:13:07.848Z","etag":null,"topics":["agent-based","deployment","ecosystem","framework","multiagent-systems","simulation","spade"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gecad-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-17T15:53:22.000Z","updated_at":"2025-08-05T16:15:51.000Z","dependencies_parsed_at":"2023-02-17T11:01:19.438Z","dependency_job_id":"9f7a1f04-8a60-449f-b244-cb65fd4168c5","html_url":"https://github.com/gecad-group/peak-mas","commit_stats":{"total_commits":137,"total_committers":7,"mean_commits":"19.571428571428573","dds":"0.22627737226277367","last_synced_commit":"89b574885b3631186f4730389b93e340e950db95"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gecad-group/peak-mas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gecad-group%2Fpeak-mas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gecad-group%2Fpeak-mas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gecad-group%2Fpeak-mas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gecad-group%2Fpeak-mas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gecad-group","download_url":"https://codeload.github.com/gecad-group/peak-mas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gecad-group%2Fpeak-mas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274130170,"owners_count":25227270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-based","deployment","ecosystem","framework","multiagent-systems","simulation","spade"],"created_at":"2024-09-24T19:59:29.870Z","updated_at":"2025-09-08T03:44:30.362Z","avatar_url":"https://github.com/gecad-group.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PEAK: Python-based framework for heterogenous agent communities\n\n[![DOI](https://img.shields.io/badge/DOI-10.1007%2F978--3--031--18050--7__7-blue)](http://dx.doi.org/10.1016/j.softx.2025.102190)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peak-mas)](https://pypi.org/project/peak-mas/)\n[![PyPI](https://img.shields.io/pypi/v/peak-mas)](https://pypi.org/project/peak-mas/)\n[![GitHub](https://img.shields.io/github/license/gecad-group/peak-mas)](https://github.com/gecad-group/peak-mas)\n[![powered by](https://img.shields.io/static/v1?label=powered%20by\u0026message=GECAD\u0026color=177985\u0026labelColor=de5d4a)](https://www.gecad.isep.ipp.pt/GECAD/Pages/Presentation/Home.aspx)\n[![code style](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)\n[![imports isort](https://img.shields.io/static/v1?label=imports\u0026message=isort\u0026color=blue\u0026labelColor=orange)](https://pycqa.github.io/isort/)\n\nPEAK 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. \nThis framework is based on \u003ca href=\"https://spade-mas.readthedocs.io/en/latest/\" target=\"_blank\"\u003eSPADE\u003c/a\u003e.\n\n\n## Prerequisites\n\n- Python == 3.9.6\n- XMPP Server ([see docs](https://www.gecad.isep.ipp.pt/peak))\n\n\n## Installing PEAK\n\n### Conda\n\nTo install using conda, download the environment.yml file from the repository and then use the following command:\n```bash\n$ conda env create --file environment.yml\t\n```\nThis will create a conda environment called _peak_.\n\n### Pip\n\nTo install using pip, just type the following command:\n```bash\n$ pip install peak-mas\n```\n\n\n## Using PEAK\n\n### Notes on SPADE\n\nAs 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 \u003ca href=\"https://spade-mas.readthedocs.io/en/latest/\" target=\"_blank\"\u003eSPADE\u003c/a\u003e examples and documentation before starting using PEAK. Once you are familiarized with SPADE's mechanics you can start using PEAK.\nFor now PEAK is not compatible with version above 3.2.2 of SPADE.\n\n### Notes on XMPP\n\nTo 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 \u003ca href=\"http://www.gecad.isep.ipp.pt/peak\" target=\"_blank\"\u003edocumentation\u003c/a\u003e.\n\n#### Using docker\n\nTo make it easier to configure the XMPP server we have created a docker image with the server already configured. To use it just type the following command in the /docker folder:\n\n```bash\n$ docker-compose up -d\n```\n\n### Hello World Agent Example\n\nOne 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.\nIn this example we will show you how to execute a single agent. Save the following code in a file called `agent.py`.\n\n```python \nfrom peak import Agent, OneShotBehaviour\n\nclass agent(Agent):\n    class HelloWorld(OneShotBehaviour):\n        async def run(self):\n            print(\"Hello World\")\n            await self.agent.stop()\n\n    async def setup(self):\n        self.add_behaviour(self.HelloWorld())\n```\nIt 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:\n```bash \n$ peak run path/to/agent.py -j agent@localhost\n```\nChange the `localhost` to the domain of the XMPP server you want to connect.\n\n\u003cdetails\u003e\u003csummary\u003eNote\u003c/summary\u003e\n\u003cp\u003e\n\nIf you want to know more about each command we recommend reading the [documentation](http://www.gecad.isep.ipp.pt/peak) or using the `-h` option to see the help message.\n\n\u003c/p\u003e\n\u003c/details\u003e\n\nFor more advanced functionalities and examples we recommend you to head forward to the \u003ca href=\"http://www.gecad.isep.ipp.pt/peak\" target=\"_blank\"\u003edocumentation website\u003c/a\u003e.\n\n\n## Support\n\nUse the \u003ca href=\"https://github.com/gecad-group/peak-mas/discussions\" target=\"_blank\"\u003eDiscussion\u003c/a\u003e page if you have any questions or ideas you would like so see implemented.\nTo alert an issue or a bug please post in the \u003ca href=\"https://github.com/gecad-group/peak-mas/issues\" target=\"_blank\"\u003eIssues\u003c/a\u003e page.\n\n## Roadmap\n\nThis are some functionalities that are being developed and will be released in a near future:\n- [ ] Integrate FIPA ACL messages in PEAK.\n- [ ] Add dynamic speed option to PEAK's internal clock.\n- [ ] Add multi-threading option to the Command Line Interface.\n- [ ] Implement Yellow Page Service in the Directory Facilitator agent.\n- [ ] Implement physical mobility in the agents.\n\n## Scientific Publications\n\n- Ribeiro, B., Dias, D., Gomes, L., \u0026 Vale, Z. (2025). PEAK: Python-based framework for heterogeneous agent communities. SoftwareX, 30, 102190. https://doi.org/10.1016/j.softx.2025.102190\n- Ribeiro, B., Pereira, H., Gomes, L., Vale, Z. (2023). Python-Based Ecosystem for Agent Communities Simulation. In: , et al. 17th International Conference on Soft Computing Models in Industrial and Environmental Applications (SOCO 2022). SOCO 2022. Lecture Notes in Networks and Systems, vol 531. Springer, Cham. https://doi.org/10.1007/978-3-031-18050-7_7\n- Pereira H, Ribeiro B, Gomes L, Vale Z. Smart Grid Ecosystem Modeling Using a Novel Framework for Heterogenous Agent Communities. Sustainability. 2022; 14(23):15983. https://doi.org/10.3390/su142315983\n- Silva C, Faria P, Ribeiro B, Gomes L, Vale Z. Demand Response Contextual Remuneration of Prosumers with Distributed Storage. Sensors. 2022; 22(22):8877. https://doi.org/10.3390/s22228877\n\n\n## Contributing to PEAK\n\nPull requests are welcome. For major changes, please open a discussion first to discuss what you would like to change.\n\nThe examples are used as a form of testing the framework. So please make sure to update the examples as appropriate or make new ones. \n\nTo format the code please use the \u003ca href=\"https://pypi.org/project/black/\" target=\"_blank\"\u003eblack\u003c/a\u003e and \u003ca href=\"https://pypi.org/project/isort/\" target=\"_blank\"\u003eisort\u003c/a\u003e packages. \n\nFor the commits please follow the \u003ca href=\"www.conventionalcommits.org\" target=\"_blank\"\u003eConventional Commits Guideline\u003c/a\u003e.\n\n## License\n\n`PEAK` is free and open-source software licensed under the \u003ca href=\"https://github.com/gecad-group/peak-mas/blob/develop/LICENSE\" target=\"_blank\"\u003eGNU General Public License v3.0\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgecad-group%2Fpeak-mas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgecad-group%2Fpeak-mas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgecad-group%2Fpeak-mas/lists"}