-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
User Request
We have a graph with different nodes (agents, workspaces, etc.) that define system behavior. We want to replace the graph with list interfaces. As the first step, keep the existing graph page and add list-based UI in parallel for the following entities:
- Triggers
- Agents
- Tools
- Workspaces
- Memory
Scope Note (Update)
Per product directive, the first iteration ships entity create/edit forms that manage the entity’s own configuration only. Edges (connections) are intentionally out of scope for this iteration and will be added in a follow-up update to this same Issue/PR.
Specification (Research by Emerson Gray)
Repo: agynio/platform (monorepo)
- UI:
packages/platform-ui(Vite + React + react-router-dom + @tanstack/react-query) - Server:
packages/platform-server(NestJS)
1) Current State Assessment
Graph page and routing
- Graph route:
/agents/graphinpackages/platform-ui/src/App.tsx(rendersAgentsGraphContainer→GraphLayout). - Keep
/agents/graphexactly as-is.
Graph persistence and APIs
- UI calls:
GET /api/graph,POST /api/graphviapackages/platform-ui/src/api/modules/graph.tsandfeatures/graph/services/api.tsGET /api/graph/templates(template registry)
- Server controllers:
packages/platform-server/src/graph/controllers/graphPersist.controller.tspackages/platform-server/src/graph/controllers/graph.controller.ts
- Types:
packages/platform-server/src/shared/types/graph.types.tsPersistedGraph,PersistedGraphNode,PersistedGraphEdge
Memory APIs
packages/platform-server/src/graph/controllers/memory.controller.ts(@Controller('api/memory'))- Client wrapper:
packages/platform-ui/src/api/modules/memory.ts
Entities today
- Triggers/Agents/Tools/Workspaces exist as graph nodes (not separate DB tables). CRUD is via updating the graph document.
2) Proposed List UI (parallel to graph)
Routes to add
/triggers→ Triggers list/agents→ Agents list (in addition to/agents/graph)/tools→ Tools list/workspaces→ Workspaces list/memory→ Memory docs list/browser (complements existing Agents memory manager)
Data fetching and mutations
- Use React Query with existing APIs:
- Query
GET /api/graph(reusegraph.getFullGraph()) - Mutation
POST /api/graph(reusegraph.saveFullGraph()) - Invalidate
['graph']after saves
- Query
- Templates from
GET /api/graph/templatesto drive forms and ports/handles.
Tables (common patterns)
- Columns: Title, Template, Node ID, Ports (optional), Relations (incoming/outgoing edge counts), Actions (View/Edit/Delete)
- Filters: text search (Title, Template, ID)
- Sort: Title, Template
- Pagination: none initially (client-side if needed later)
Create/Edit forms (Updated)
- Fields:
- Template (required on create; read-only on edit)
- Title (stored in
config.title) - Entity configuration via the same views used by the graph sidebar (nodeProperties)
- Note: Edge editing is excluded in this iteration
- Validation:
- Field-level validation as provided by nodeProperties views; JSON inputs validated where applicable
- Save behavior:
- Update only the node’s
configingraph.nodes; keepgraph.edgesunchanged - Persist via
POST /api/graph - Handle 409 VERSION_CONFLICT by prompting user to refresh and retry
- Update only the node’s
Entity-specific notes
- Triggers/Tools/Workspaces may require secret/variable suggestions; provide the same mechanisms as the graph sidebar
- Workspaces may use nix helpers; provide equivalents as needed
- Memory:
/memorylists docs fromGET /api/memory/docs; a browser view useslist/read/stat/append/update/ensure-dir/deleteendpoints
Navigation changes (keep graph)
- Preserve “Agents → Team” →
/agents/graph - Add a separate “Entities” section containing: Triggers, Agents, Tools, Workspaces, Memory
3) Implementation Plan
New pages (examples) and shared modules unchanged; forms now reuse nodeProperties views embedded in dialog.
4) Acceptance Criteria (Updated)
- Triggers/Agents/Tools/Workspaces pages:
- List renders nodes of appropriate kind.
- Create/Edit/Delete works and persists the node
configvia/api/graph. - Edge editing is not available in this iteration.
- Handles loading/empty/error states.
- Memory pages:
/memorylists docs viaGET /api/memory/docs.- Can browse/read/append/update/delete using existing memory endpoints.
- Graph page
/agents/graphremains functional and unchanged. - Navigation includes links to all list pages.
5) Test Plan
- Unit tests for pages and interactions under
packages/platform-ui/src/pages/__tests__/using Vitest/Testing Library. - MSW mocks for
GET/POST /api/graphandGET /api/graph/templates. - Optional e2e smoke for
/agentsrendering.
6) Assumptions & Notes
- Entities are graph nodes; no new backend models.
- Template kind mapping:
service→ Workspace list;mcpmay be grouped under Tools for now. - Title stored consistently in
config.title. - Edge editing will be added in a follow-up iteration to this same Issue/PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels