{"id":37062997,"url":"https://github.com/grei-ufc/pade","last_synced_at":"2026-01-14T07:01:17.480Z","repository":{"id":28308617,"uuid":"118021297","full_name":"grei-ufc/pade","owner":"grei-ufc","description":"Python Agent DEvelopment framework","archived":false,"fork":false,"pushed_at":"2024-05-02T18:22:24.000Z","size":3086,"stargazers_count":115,"open_issues_count":26,"forks_count":40,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-09-02T01:17:55.203Z","etag":null,"topics":["artificial-intelligence","cli","co-simulation","multiagent-systems","python","simulations","twisted"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grei-ufc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2018-01-18T18:25:48.000Z","updated_at":"2025-08-10T21:20:58.000Z","dependencies_parsed_at":"2023-01-14T08:36:08.384Z","dependency_job_id":"d75a6736-3496-4d28-8f06-544addeb96ea","html_url":"https://github.com/grei-ufc/pade","commit_stats":{"total_commits":172,"total_committers":16,"mean_commits":10.75,"dds":0.2906976744186046,"last_synced_commit":"2bc47e239a5070eb1774140ad7beebf9240fcb6d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/grei-ufc/pade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grei-ufc%2Fpade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grei-ufc%2Fpade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grei-ufc%2Fpade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grei-ufc%2Fpade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grei-ufc","download_url":"https://codeload.github.com/grei-ufc/pade/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grei-ufc%2Fpade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["artificial-intelligence","cli","co-simulation","multiagent-systems","python","simulations","twisted"],"created_at":"2026-01-14T07:01:16.773Z","updated_at":"2026-01-14T07:01:17.463Z","avatar_url":"https://github.com/grei-ufc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Agent DEvelopment framework (PADE)\n\n[![](https://img.shields.io/pypi/v/pade.svg)](https://pypi.python.org/pypi/pade/)\n[![](https://img.shields.io/pypi/pyversions/pade.svg)](https://pypi.python.org/pypi/pade/)\n[![](https://img.shields.io/readthedocs/pade.svg)](https://pade.readthedocs.io/en/latest/)\n[![](https://img.shields.io/github/issues/grei-ufc/pade.svg)](https://github.com/grei-ufc/pade/issues)\n[![](https://img.shields.io/github/issues-pr/grei-ufc/pade.svg)](https://github.com/grei-ufc/pade/pulls)\n[![](https://img.shields.io/pypi/l/pade.svg)](https://opensource.org/licenses/MIT)\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/lucassm/Pade/master/pade/images/pade_logo.png\" alt=\"PADE\" width=\"200\"\u003e\n\u003c/p\u003e\n\nPADE its a framework for developing, executing and mannaging multi-agent systems in distributed computing enviroments. PADE code is 100% Python and has its core in Twisted, a python package for implementing distributed applications.\n\nPADE is also free software and licenced in terms of MIT licence. First it was developed in **Federal University of Ceará (Brazil) by Electric Smart Grids Group (GREI) in Electric Engineering Department (DEE)**.\n\nThe researchers of **Laboratory of Applied Artificial Intelligence (LAAI) of Federal University of Para (UFPA)** have been contributed a lot with PADE project. We registre here our acknowledgments.\n\nEveryone that has interest in developing PADE is welcome to download, install, test, use and send us feedback.\n\n## Scientific Paper\n\nThere is a scientific paper presenting PADE as a scientific tool for multiagent system simulation with focus in electric power systems simulation. If you have interest here is the link to access:\n\n[Python‐based multi‐agent platform for application on power grids](https://doi.org/10.1002/2050-7038.12012)\n\nIf you use PADE in your research work, please cite PADE as:\n\n\u003eMelo, LS, Sampaio, RF, Leão, RPS, Barroso, GC, Bezerra, JR. Python‐based multi‐agent platform for application on power grids. Int Trans Electr Energ Syst. 2019; 29:e12012. https://doi.org/10.1002/2050-7038.12012\n\n\n## Documentation\n\nPADE is well documented. You can access the documentation here: [PADE documentation](https://pade.readthedocs.io/en/latest/)\n\n## Dependencies\n\nPADE is developed in [Python 3.7](https://www.python.org/) and has a [Twisted](https://twistedmatrix.com/trac/) core.\n\n## Install\n\n#### Via Python Package Index (PyPI):\n```bash\n$ pip install pade\n```\n\n#### Via Github:\n```bash\n$ git clone https://github.com/greiufc/pade\n$ cd pade\n$ python setup.py install\n```\n\nSee the complete process in this video: [HOW TO install PADE](https://asciinema.org/a/ELHfOxZnMUjZyLa8bITJ0AQnP)\n\n## Docker\n\nBuild container\n```bash\n$ docker-compose up -d\n````\n\nList containers\n```bash\n$ docker ps\n\nCONTAINER ID        IMAGE\n8d7cb00972c9        pade_pade\n```\n\nGet inside container\n```bash\n$ docker exec -it \u003cCONTAINER_ID\u003e bash\n```\n\n\n## Example\n\nHello world in PADE:\n\n```python\nfrom pade.misc.utility import display_message, start_loop\nfrom pade.core.agent import Agent\nfrom pade.acl.aid import AID\nfrom sys import argv\n\nclass AgenteHelloWorld(Agent):\n    def __init__(self, aid):\n        super(AgenteHelloWorld, self).__init__(aid=aid)\n        display_message(self.aid.localname, 'Hello World!')\n\n\nif __name__ == '__main__':\n\n    agents_per_process = 3\n    c = 0\n    agents = list()\n    for i in range(agents_per_process):\n        port = int(argv[1]) + c\n        agent_name = 'agente_hello_{}@localhost:{}'.format(port, port)\n        agente_hello = AgenteHelloWorld(AID(name=agent_name))\n        agents.append(agente_hello)\n        c += 1000\n    \n    start_loop(agents)\n```\n\n## Changes in this new version\n\nSome changes has been added in this new version, but don't worry about that if you are using pade in your simulations, it's very easy adjust this version in old versions.\n\nThe main and bigger change in Pade is in how you launch your agents. Now when you install Pade via pip command or via setup.py install you install a pade terminal command line (cli) that launch your pade applications.\n\nBefore we start an PADE example, it's important to create the initial database file in the temporary folder of your Operating System. As the temporary folder is cleared each time that you shutdown your OS you will need to run this command  in each reinitialization of your OS before executing PADE agents:\n\n```shell\n$ pade create-pade-db\n```\n\nIf everything is well, than this message will apperar in your prompt:\n\n```\n[...] Creating Pade tables in selected data base.\n[ok_] Tables created in selected data base\n```\n\nAs example, if you put the hello world example code in a file with the name hello-agent.py and you want to launch this agent just one time, you could type in your command line interface:\n\n```shell\n$ pade start-runtime hello-agent.py \n```\n\nIf you want to launch this agent 3 times, than you type:\n\n```shell\n$ pade start-runtime --num 3 hello-agent.py \n```\n\nIf you wanto to launch the 3 agents in ports 20000, 20001 and 20002, than you just type:\n\n```shell\n$ pade start-runtime --num 3 --port 20000 hello-agent.py \n```\n\nHere we have to explain some points in how Pade executes the agents.\n\nWhen you type the commands `--num 3` and `--port 20000` you tell to Pade command line tool to execute the content of file hello-agent.py 3 times. Each time, the file content will be executed in a new process and the attribute port will be passed as argument in this process with a unit incremment in each time. For example, in the case `--num 3` and `--port 2000`, the arguments passed for agents are 2000, 2001 and 2002.\n\nThis arguments should  be accessed in the code with `sys.argv[1]`. So you can execute how many agents as you want per process. In the hello-agent.py example there is a for loop that will repeat many times as defined in agents_per_process variable. That will define the number of agents in each process. In the example, since the `--num` parameter is 3 and the agents_per_process variable is 3 the pade will start 9 agents in ports: 20000, 21000, 22000, 20001, 210001, 22001, 20002, 210002 and 22002.\n\nThe command line will support mode than one agent file too, for example if you have the agents in mode than one file you could start then with a command like this:\n\n```shell\n$ pade start-runtime --num 3 --port 20000 hello-agent_1.py hello-agent_2.py\n```\n\nIn this case the first agent receive in the `sys.argv[1]` the value 20000 and the second, the value 20001, and so on.\n\nThere is another way to launch the Pade agents. Is with a config file in the json format. Here it's a example of config file:\n\n```json\n{ \n    \"agent_files\": [\n        \"agent_example_1.py\",\n        \"agent_example_3.py\"\n    ],\n    \"port\": 20000,\n    \"num\": 2,\n    \"pade_ams\": {\n        \"launch\": true,\n        \"host\": \"localhost\",\n        \"port\": 8000\n    },\n    \"pade_web\": {\n        \"active\": true,\n        \"host\": \"localhost\",\n        \"port\": 5000\n    },\n    \"pade_sniffer\": {\n        \"active\": true,\n        \"host\": \"localhost\",\n        \"port\": 8001\n    },\n    \"session\": {\n        \"username\": \"pade_user\",\n        \"email\": \"pade_user@pade.com\",\n        \"password\": \"12345\"    \n    }\n}\n```\n\nTo launch then, just type the command line:\n\n```shell\npade start-runtime --config_file pade_config.json\n```\n\nIf you need to execute simulations with a high number of agents that send and receive messages, something like 500 agents sending 5 messages per second, is recommended that you launch your pade session with a option `--no_pade_sniffer` because the register of this messages in database will overhead your pade execution. Than, the example could be:\n\n```shell\n$ pade start-runtime --num 3 --port 20000  --no_pade_sniffer hello-agent_1.py hello-agent_2.py\n```\n\nAnother useful commands in Pade CLI are:\n\n```shell\n$ pade create-pade-db\n```\n\n```shell\n$ pade drop-pade-db\n```\n\n```shell\n$ pade start-web-interface\n```\n\nTo show a complete list of pade comands in the CLI, just type `pade` in terminal command line.\n\nTo show the agents in action, show the video in this link: [pade agents start example]()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrei-ufc%2Fpade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrei-ufc%2Fpade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrei-ufc%2Fpade/lists"}