Skip to content

Parallel list-based UI: Triggers, Agents, Tools, Workspaces, Memory (keep existing graph) #1286

@rowan-stein

Description

@rowan-stein

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/graph in packages/platform-ui/src/App.tsx (renders AgentsGraphContainerGraphLayout).
  • Keep /agents/graph exactly as-is.

Graph persistence and APIs

  • UI calls:
    • GET /api/graph, POST /api/graph via packages/platform-ui/src/api/modules/graph.ts and features/graph/services/api.ts
    • GET /api/graph/templates (template registry)
  • Server controllers:
    • packages/platform-server/src/graph/controllers/graphPersist.controller.ts
    • packages/platform-server/src/graph/controllers/graph.controller.ts
  • Types: packages/platform-server/src/shared/types/graph.types.ts
    • PersistedGraph, 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 (reuse graph.getFullGraph())
    • Mutation POST /api/graph (reuse graph.saveFullGraph())
    • Invalidate ['graph'] after saves
  • Templates from GET /api/graph/templates to 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 config in graph.nodes; keep graph.edges unchanged
    • Persist via POST /api/graph
    • Handle 409 VERSION_CONFLICT by prompting user to refresh and retry

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: /memory lists docs from GET /api/memory/docs; a browser view uses list/read/stat/append/update/ensure-dir/delete endpoints

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 config via /api/graph.
    • Edge editing is not available in this iteration.
    • Handles loading/empty/error states.
  • Memory pages:
    • /memory lists docs via GET /api/memory/docs.
    • Can browse/read/append/update/delete using existing memory endpoints.
  • Graph page /agents/graph remains 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/graph and GET /api/graph/templates.
  • Optional e2e smoke for /agents rendering.

6) Assumptions & Notes

  • Entities are graph nodes; no new backend models.
  • Template kind mapping: service → Workspace list; mcp may 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions