-
Notifications
You must be signed in to change notification settings - Fork 44.8k
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): Add Support for Managing Agent Presets with Pagination and Soft Delete #9211
feat(backend): Add Support for Managing Agent Presets with Pagination and Soft Delete #9211
Conversation
…re-agents-without-agent-ownership
…without-agent-ownership' of github.com:Significant-Gravitas/AutoGPT into swiftyos/open-2276-add-ability-to-execute-store-agents-without-agent-ownership
…re-agents-without-agent-ownership
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
autogpt_platform/backend/backend/server/v2/library/model_test.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Reinier van der Leer <[email protected]>
Co-authored-by: Reinier van der Leer <[email protected]>
…re-agents-without-agent-ownership
…without-agent-ownership' into swiftyos/open-2277-implement-library-add-update-remove-archive-functionality
…archive-functionality' into swiftyos/open-2278-implement-agent-preset-functionality
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
…lement-agent-preset-functionality
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
…ctionality (#9218) ### Changes 🏗️ 1. **Core Features**: - Add agents to the user's library. - Update library agents (auto-update, favorite, archive, delete). - Paginate library agents and presets. - Execute graphs using presets. 2. **Refactoring**: - Replaced `UserAgent` with `LibraryAgent`. - Separated routes for agents and presets. 3. **Schema Changes**: - Added `LibraryAgent` table with fields like `isArchived`, `isDeleted`, etc. - Soft delete functionality for `AgentPreset`. 4. **Testing**: - Updated tests for `LibraryAgent` operations. - Added edge case tests for deletion, archiving, and pagination. 5. **Database Migrations**: - Migration to drop `UserAgent` and add `LibraryAgent`. - Added fields for soft deletion and auto-update. Note this includes the changes from the following PR's to avoid merge conflicts with them: #9179 #9211 --------- Co-authored-by: Reinier van der Leer <[email protected]>
Summary
LibraryAgentPreset
,LibraryAgentPresetResponse
,Pagination
, andCreateLibraryAgentPresetRequest
.isDeleted
column inAgentPreset
for soft delete.AgentPreset
:get_presets
with pagination.get_preset
by ID.create_or_update_preset
for upsert.delete_preset
to soft delete.GET /presets
: Fetch paginated presets.GET /presets/{preset_id}
: Fetch a single preset.POST /presets
: Create a preset.PUT /presets/{preset_id}
: Update a preset.DELETE /presets/{preset_id}
: Soft delete a preset.isDeleted
field to support soft delete.Review Notes