mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 23:28:07 -05:00
feat(rnd): add FastAPI support to existing project outline (#7165)
### Background ###### Project Outline Currently, the project mainly consists 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. ###### How to test Execute `poetry run app`. Access the swagger page `http://localhost:8000/docs`, there is one API to trigger an execution of one dummy slow task, you fire the API a couple of times and see the `agent_executor` executes the multiple slow tasks concurrently by the pool of Python processes. The pool size is currently set to `5` (hardcoded in app.py, the code entry point). ##### Changes 🏗️ * Initialize FastAPI for the AutoGPT server project. * Reduced number of queues to 1 and abstracted into `ExecutionQueue` class. * Reduced the number of main components into two `api` and `executor`.
This commit is contained in:
1151
rnd/autogpt_server/poetry.lock
generated
Normal file
1151
rnd/autogpt_server/poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user