Skip to main content

Module handlers

Module handlers 

Source
Expand description

REST endpoint handlers over the FleetManager.

Functions§

add_workspace
POST /api/workspaces — register a workspace.
agent_end_input
POST /api/agents/{id}/end-input — signal end-of-input to an interactive agent.
agent_input
POST /api/agents/{id}/input — inject a user message into an interactive agent.
delete_workspace
DELETE /api/workspaces/{name} — unregister a workspace.
get_agent
GET /api/agents/{id} — one agent’s current state.
get_agent_events
GET /api/agents/{id}/events?from=N — replay history from the shared store.
get_capabilities
GET /api/capabilities — what the active fleet backend supports, so the dashboard can render backend-aware controls (#99). admin mirrors whether an admin/registry plane is wired (Some for local, None for k8s).
get_fleet
GET /api/fleet — the whole fleet snapshot.
get_metrics
GET /api/metrics — prosperod’s operational counters.
get_usage
GET /api/usage — cost, turns, and terminal outcomes per workspace over a window, with a per-day series (#180).
get_workspace_agents
GET /api/workspaces/{workspace}/agents — agents under one workspace.
get_workspaces
GET /api/workspaces — managed workspaces with health, sources, agent counts.
healthz
GET /healthz — daemon liveness (always 200 while the process is up).
kill_agent
POST /api/agents/{id}/kill.
readyz
GET /readyz — readiness: 200 only when the store is writable, otherwise 503 so an orchestrator can gate traffic/restarts. The body carries the store-writability flag and an aggregate repo-health summary.
respawn_agent
POST /api/agents/{id}/respawn — replace an agent with a fresh one.
rm_agent
DELETE /api/agents/{id} — forget the agent (local: caliban registry; k8s: CR).
set_workspace_config
PUT /api/workspaces/{name}/config — set provider config and restart caliband.
spawn_agent
POST /api/workspaces/{workspace}/agents — spawn an agent (worktree by default).