Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rnd): add FastAPI support to existing project outline #7165

Merged
merged 19 commits into from
Jun 3, 2024

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented May 22, 2024

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.

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

@majdyz majdyz requested a review from a team as a code owner May 22, 2024 14:29
@majdyz majdyz requested review from Swiftyos, aarushik93, ntindle and Pwuts and removed request for a team May 22, 2024 14:29
Copy link

netlify bot commented May 22, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit 9d880ca
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/665d40c60d216200081a569a
😎 Deploy Preview https://deploy-preview-7165--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@majdyz majdyz changed the title Add FastAPI support on existing project outline fet(rnd): Add FastAPI support on existing project outline May 22, 2024
@majdyz majdyz changed the title fet(rnd): Add FastAPI support on existing project outline feat(rnd): add FastAPI support to existing project outline May 22, 2024
@Swiftyos
Copy link
Contributor

Swiftyos commented May 22, 2024

Reduced the number of main components into two api and executor.

Why the change of heart in the need for the Manager?

I thought you where quiet certain of the need for it in our previous discussion. Is this now an exploration in a different direction?

@majdyz
Copy link
Contributor Author

majdyz commented May 22, 2024

agent_executor is the manager, I'm happy to rename it with anything. It runs the pool of process/threads that will execute the agent. I started with thread, if you want to use process we can simply change ThreadExecutorPool into ProcessExecutorPool and everything still work fine because we are not sharing any variable except ExecutionQueue

Copy link
Contributor

@Swiftyos Swiftyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of sync with update

@Swiftyos Swiftyos dismissed their stale review May 22, 2024 17:29

out of sync with updates

@majdyz majdyz requested review from Swiftyos and kcze May 23, 2024 03:39
rnd/autogpt_server/run.sh Outdated Show resolved Hide resolved
rnd/autogpt_server/run.sh Outdated Show resolved Hide resolved
@majdyz majdyz requested review from Pwuts and ntindle May 23, 2024 17:39
ntindle
ntindle previously approved these changes May 29, 2024
rnd/autogpt_server/autogpt_server/agent_api/server.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/xl and removed size/l labels Jun 3, 2024
@majdyz majdyz enabled auto-merge (squash) June 3, 2024 04:05
@majdyz majdyz requested a review from ntindle June 3, 2024 04:37
@majdyz majdyz merged commit 7a932cd into master Jun 3, 2024
11 checks passed
@majdyz majdyz deleted the swiftyos/agpt-734-create-project-outline branch June 3, 2024 04:39
Swiftyos added a commit that referenced this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants