Skip to content

[Admin][API] Agents & Instances — cross-tenant list + detail #31

Description

@serge-ivo

[Admin][API] Agents & Instances — cross-tenant list + detail

Why

GET /v1/agents only returns published agents. Operators need to see all agents (incl. drafts, all owners) and all instances (subscriptions) across tenants for support/debugging.

Scope

  • GET /v1/admin/agents (paginated, searchable, filter by status/visibility/owner): id, slug, name, owner (login), category, store_type, visibility, status, model, capabilities, instance count, created/updated.
  • GET /v1/admin/agents/:id — detail incl. owner, config/capabilities, subscriber count, recent activity.
  • GET /v1/admin/instances (paginated, filter by agent/owner/status): id, agent, owner, display name, status, runtime-connected?, created; and GET /v1/admin/instances/:id — detail (state summary, runtime nodes, recent tasks/board items, recent errors).
  • Read-only here; mutations (unpublish/cancel) live in the Moderation issue.

Acceptance criteria

  • Lists include drafts and all owners; pagination + filters work.
  • Instance detail shows live runtime status (reuse the relay live-check, not the stale status column).
  • Non-admin → 403; tests for gate + pagination.

Relevant code

  • Tables: agents, agent_instances, instance_runtime_nodes, agent_events
  • Reuse lib/agent-capabilities.ts; relay live-check in relay routes/DO.

References

  • FAS /v1/admin/apps with session counts (content-admin.ts), FGS Games list.

Part of the PAGS Admin Portal epic. Depends on Foundation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-portalPAGS admin/operator portalenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions