Skip to main content
The agents API surfaces the registered AI agent adapters and their runtime status. Agents are the execution backends that process tasks - each adapter type (Claude Code, custom, etc.) exposes capabilities, health, and stats.

GET /api/agents

List all active agent adapters with health and execution statistics.
Response 200
Response fields

GET /api/agents/types

List registered adapter type identifiers.
Response 200

Agent Adapter Interface

Adapters are registered via getAgentRegistry() from src/adapters/registry.ts. Each adapter implements:

Health Checks

Agent health is checked on demand when GET /api/agents is called. Each adapter runs its own healthCheck() which typically:
  1. Verifies API key is present
  2. Makes a lightweight probe request to the underlying AI service
  3. Returns healthy: boolean and latencyMs
If all adapters are unhealthy, the overall system health degrades to degraded or unhealthy (visible at GET /api/health).

Registering Custom Adapters

Custom adapters are registered programmatically at startup: