feat(platform/library): Agent Library v2 (#9407)

- Resolves #8774
  - Resolves #8775
- Includes back-end work for #9168
- Partially implements #8776
- Partially implements #8777

### Changes 🏗️

- Add `/library` page
- Change target of "Library" navigation link from `/monitoring` to
`/library`
- Move `/agents/[id]` page to `/library/agents/[id]`
- Set application background color to `bg-neutral-50`
- Redirect to new library agent's "runs" page (`/library/agents/[id]`)
after adding from marketplace

Further (technical) frontend changes:
- Add types and client methods for all library API endpoints
- Added `primary` variant to `agptui/Button` component

Backend changes:
- Add functionality to library backend
  - Aggregate agent status
  - Image generation for use in library view
    - Add `LibraryAgent.imageUrl` column to DB schema
  - Sorting & pagination
  - Explicit relation between library agents and their graph's creator
- Refactor & update API endpoints for DX
- Other minor refactoring
- Add missing but required `MEDIA_GCS_BUCKET_NAME` to `.env.example`

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - `/library`
    - [x] Create agent from scratch -> should show up on `/library`
- [x] Add agent to library from marketplace -> should show up on
`/library`
- [x] Click on agent in `/library` -> should go to
`/library/agents/[id]`
    - [x] Test sorting & pagination functionality
  - `/library/agents/[id]`
    - [x] Fill out inputs and click "Run" -> should run like normally
    - [x] Select completed agent run -> should show all inputs & outputs
- [x] Click "run again" on a completed agent run -> should run
successfully with same input
  - [x] `/monitoring` should still work the same as before

---------

Co-authored-by: abhi1992002 <abhimanyu1992002@gmail.com>
Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
This commit is contained in:
Swifty
2025-02-25 18:29:15 +01:00
committed by GitHub
parent b603ed2d2a
commit e752f0f342
43 changed files with 3467 additions and 1636 deletions

File diff suppressed because it is too large Load Diff