* Refactor on the link structure and API * Refactor on the link structure and API * Cleanup IDS * Remove run_id * Update block interface * Added websockets dependency * Adding routes * Adding in websocket code * Added cli to test the websocket * Added an outline of the message formats I plan on using * Added webscoket message types * Updated poetry lock * Adding subscription logic * Updating subscription mechanisms * update cli * Send updates to server * Get single execution data * Fix type hints and renamed function * add callback function and type hints * fix type hints * Updated manager to use property * Added in websocket updates * Added connection manager tests * Added tests for ws_api * trying to work around process issues * test formatting * Added a create and execute command for the cli * Updated send format * websockets command working * cli update * Added model.py * feat: Update server.py and manager.py - Initialize blocks in AgentServer lifespan context - Remove unnecessary await in AgentServer get_graph_blocks - Fix type hinting in manager.py - Validate input data in validate_exec function * fix tests * feat: Add autogpt_server.blocks.sample and autogpt_server.blocks.text modules This commit adds the `autogpt_server.blocks.sample` and `autogpt_server.blocks.text` modules to the project. These modules contain blocks that are used in the execution of the Autogpt server. The `ParrotBlock` and `PrintingBlock` classes are imported from `autogpt_server.blocks.sample`, while the `TextFormatterBlock` class is imported from `autogpt_server.blocks.text`. This addition enhances the functionality of the server by providing additional blocks for text processing and sample operations. * fixed circular import issue * Update readme --------- Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
Next Gen AutoGPT
This is a research project into creating the next generation of autogpt, which is an autogpt agent server.
The agent server will enable the creation of composite multi-agent system that utilize AutoGPT Agent as its default agent.
Project Outline
Currently the project mainly consist of these components:
agent_api A component that will expose API endpoints for the creation & execution of agents. This component will make connections to the database to persist and read the agents. It will also trigger the agent execution by pushing its execution request to the ExecutionQueue.
agent_executor A component that will execute the agents. This component will be a pool of processes/threads that will consume the ExecutionQueue and execute the agent accordingly. The result and progress of its execution will be persisted in the database.
Setup
This setup is for MacOS/Linux. To setup the project follow these steps inside the project directory:
-
Enter poetry shell
poetry shell -
Install dependencies
poetry install -
Generate prisma client
poetry run prisma generateIn case prisma generates client for the global python installation instead of the virtual environment the current mitigation is to just uninstall the global prisma package:
pip uninstall prismaAnd then run the generation again. The path should look something like this:
<some path>/pypoetry/virtualenvs/autogpt-server-TQIRSwR6-py3.12/bin/prisma -
Migrate the database, be careful because this deletes current data in the database
poetry run prisma migrate dev
Running The Server
Starting the server directly
Run the following command:
poetry run cli app
Running the App in the Background
-
Start the server, this starts the server in the background
poetry run cli startYou may need to change the permissions of the file to make it executable
chmod +x autogpt_server/cli.py -
Stop the server
poetry run cli stop
Testing
To run the tests
poetry run pytest