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(backend): Enable executing store agents without agent ownership #9267

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Jan 14, 2025

This re-introduces PR #9179 with some fixes.

This PR enables the execution of store agents even if they are not owned by the user. Key changes include handling store-listed agents in the get_graph logic, improving execution flow, and ensuring version-specific handling. These updates support more flexible agent execution.

Changes 🏗️

(copied from #9179)

  • Graph Retrieval: Updated get_graph to check store listings for agents not owned by the user.
  • Version Handling: Added graph_version to execution methods for consistent version-specific execution.
  • Execution Flow: Refactored scheduler.py, rest_api.py, and other modules for clearer logic and better maintainability.
  • Testing: Updated test_manager.py and other test cases to validate execution of store-listed agents added test for accessing graph

Out-of-scope changes:

  • Add logic to pretty-print Pydantic validation error responses to backend API client in frontend

ntindle and others added 9 commits January 12, 2025 17:11
Enable the tests in `monitor.spec.ts`.

* Remove `test.describe.skip` to enable the tests.
* Ensure the tests are now running and passing successfully.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Significant-Gravitas/AutoGPT?shareId=XXXX-XXXX-XXXX-XXXX).
…wnership (#9179)

This PR enables the execution of store agents even if they are not owned
by the user. Key changes include handling store-listed agents in the
`get_graph` logic, improving execution flow, and ensuring
version-specific handling. These updates support more flexible agent
execution.

- **Graph Retrieval:** Updated `get_graph` to check store listings for
agents not owned by the user.
- **Version Handling:** Added `graph_version` to execution methods for
consistent version-specific execution.
- **Execution Flow:** Refactored `scheduler.py`, `rest_api.py`, and
other modules for clearer logic and better maintainability.
- **Testing:** Updated `test_manager.py` and other test cases to
validate execution of store-listed agents added test for accessing graph

---------

Co-authored-by: Reinier van der Leer <[email protected]>
Co-authored-by: Zamil Majdy <[email protected]>
…ts/open-2276-add-ability-to-execute-store-agents-without-agent-ownership
@Pwuts Pwuts requested a review from a team as a code owner January 14, 2025 14:22
@Pwuts Pwuts requested review from Swiftyos and majdyz and removed request for a team January 14, 2025 14:22
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit c645ea1
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/679600950283d70008c90e19

@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Jan 14, 2025
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit c645ea1
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67960095b2c5130008f8a529

autogpt_platform/backend/backend/data/graph.py Outdated Show resolved Hide resolved
autogpt_platform/backend/backend/server/v2/store/db.py Outdated Show resolved Hide resolved
autogpt_platform/backend/backend/server/v2/store/db.py Outdated Show resolved Hide resolved
@@ -151,3 +152,9 @@ class StoreReviewCreate(pydantic.BaseModel):
store_listing_version_id: str
score: int
comments: str | None = None


class ReviewSubmissionRequest(pydantic.BaseModel):
Copy link
Member

Choose a reason for hiding this comment

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

whats with the pydantic import like this?

Copy link
Member Author

Choose a reason for hiding this comment

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

autogpt_platform/backend/backend/usecases/sample.py Outdated Show resolved Hide resolved
@Pwuts Pwuts force-pushed the pwuts/open-2276-add-ability-to-execute-store-agents-without-agent-ownership branch from af6be24 to 03df229 Compare January 22, 2025 10:35
@github-actions github-actions bot added size/xl and removed size/l labels Jan 26, 2025
@Pwuts Pwuts requested a review from ntindle January 26, 2025 09:12
@github-actions github-actions bot added size/l and removed size/xl labels Jan 26, 2025
@Pwuts Pwuts disabled auto-merge January 26, 2025 13:02
@Pwuts
Copy link
Member Author

Pwuts commented Jan 26, 2025

I'm going to undelete the template functionality before merging this. Because this PR doesn't introduce a suitable replacement and doesn't properly clean up the related code either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end size/l
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants