Skip to content

API server

The foxctl API server is the HTTP surface behind foxctl web serve. It exposes runtime state, agent management, room coordination, orchestration, companion chat, and retrieval endpoints under the base path /api.

The live server uses /api as the base path. The older /api/v1/* prefix has been removed and now returns EDEPRECATED.

PathPurpose
GET /api/healthHealth check
GET /healthzKubernetes liveness probe
GET /readyzKubernetes readiness probe
WS /ws/console/{id}WebSocket console session

There are two main response patterns:

  1. Protocol-style command envelopes for command-oriented handlers. These follow the Protocol v1 envelope shape with version, status, command, data, meta, and error fields.
  2. JSON resource responses for list/detail style endpoints.

Large payloads may be artifactized through CAS, especially in orchestration and other high-volume responses. When a response exceeds the CAS threshold, the envelope contains data.summary plus a data.artifact pointer instead of the full payload inline.

MethodPathPurpose
GET/api/healthHealth status
GET/api/eventsGlobal invalidation/event feed (SSE)
GET/api/openapi.jsonOpenAPI schema
GET/api/swaggerSwagger UI
GET/healthzK8s liveness
GET/readyzK8s readiness
WS/ws/console/{id}Console WebSocket
MethodPathPurpose
GET/api/oauth/callbackOAuth callback handler (currently stubbed)
POST/api/teams/messagesTeams platform webhook
MethodPathPurpose
GET/api/jobsList jobs
GET/api/jobs/{id}Job state
GET/HEAD/POST/DELETE/api/cas/{digest...}CAS artifact access
GET/api/workspacesWorkspace inventory
POST/api/workspaces/switchSwitch active workspace
MethodPathPurpose
GET/api/skillsSkill inventory
GET/api/skills/schemaSkill schema metadata
POST/api/skills/runRun a skill via API
GET/POST/PUT/DELETE/api/skills/{skill...}Skill CRUD
MethodPathPurpose
GET/POST/api/console/sessionsList or create console sessions
GET/POST/DELETE/PATCH/api/console/sessions/{id...}Console session lifecycle
MethodPathPurpose
GET/POST/api/tasksTask list and creation
GET/PATCH/POST/api/tasks/{id...}Task detail and updates
GET/api/sessionsSession list
GET/api/sessions/{id...}Session detail
GET/api/agentsAgent inventory
POST/GET/PATCH/DELETE/api/agents/{id...}Agent CRUD
POST/api/agents/spawnSpawn a new agent
POST/api/agents/{id}/askSend a question to an agent
POST/api/agents/{id}/daemon/startStart/resume agent daemon
POST/api/agents/{id}/daemon/killStop agent daemon
GET/api/agents/{id}/daemon/sessionsList daemon sessions
MethodPathPurpose
GET/api/statsRuntime statistics
GET/api/insightsInsights and analytics
GET/POST/PATCH/api/mailboxMailbox operations
GET/POST/api/roomsRoom list and creation
GET/POST/PATCH/api/rooms/{id...}Room state and updates
GET/api/rooms/{id}/eventsRoom-scoped SSE events
GET/POST/DELETE/api/reservationsReservations
GET/POST/api/blackboardBlackboard operations
GET/POST/PATCH/DELETE/api/blackboard/{id...}Blackboard item lifecycle
  • GET /api/events remains the global invalidation/event feed used by broad UI surfaces.
  • GET /api/rooms/{id}/events?workspace_id=... is the stable room-scoped SSE surface for room clients.
  • Room mutation routes are actor-authorized: room patch and full member replacement require coordinator access.
  • Member transport and binding updates are self-service only for the target participant unless the caller has coordinator access.
  • Role-changing member binding updates are coordinator-only even when the caller is updating their own binding.
  • Room member payloads expose delivery_binding as the canonical binding/routing record. Legacy top-level fields (backend, session, pane_id, transport_endpoint, transport_kind) are still mirrored for compatibility.
  • Room status responses expose last_delivery_trace from the persisted room-loop row. This trace records the chosen binding, transport endpoint/kind, fallback attempt, outcome, and cursor movement for the latest delivery decision.
  • Room reminder schedules are durable room-loop state. Acknowledging one emitted reminder does not cancel the schedule. Reminders can also stop automatically when linked task_id, story_id, or milestone_id work is satisfied.
MethodPathPurpose
GET/api/logsLog access
GET/api/sqliteSQLite inspection
GET/api/sqlite/{...}SQLite query
GET/POST/api/searchSearch endpoint
GET/api/codemapsCodemap list
GET/api/codemaps/{id}Codemap detail
MethodPathPurpose
POST/api/orchestration/dispatch-issueDispatch an issue to the board
POST/api/orchestration/card-actionExecute a card action
GET/api/orchestration/board-getGet board state
GET/api/orchestration/board-card-getGet card detail
GET/api/orchestration/board-card-runtime-getGet card runtime state
POST/api/orchestration/refreshRefresh board projections
POST/api/orchestration/seed-cardsSeed cards onto the board

These routes are the main HTTP view into the v2/Jido-backed orchestration board and projection state.

MethodPathPurpose
GET/api/companion/providersList LLM providers
POST/api/companion/chatSend a chat message
GET/api/companion/conversationsList conversations
DELETE/PATCH/api/companion/conversations/{id}Conversation lifecycle
GET/DELETE/api/companion/conversations/{id}/messagesMessage access
POST/api/companion/conversations/{id}/compressCompress conversation
GET/PATCH/api/companion/conversations/{id}/personalityPersonality settings
PATCH/api/companion/conversations/{id}/personality/dimensionPersonality dimension
GET/PATCH/api/companion/conversations/{id}/settingsConversation settings
POST/api/companion/contextSubmit context
GET/DELETE/api/companion/context/{conversation_id...}Context lifecycle
POST/api/companion/charactersCreate character
GET/api/companion/characters/{conversation_id...}Character detail
POST/api/companion/characters/{conversation_id}/{character_id}/overlaysCharacter overlays
GET/api/companion/memory/{conversation_id}/statsMemory stats
GET/api/companion/memory/{conversation_id}/contextMemory context
GET/api/companion/memory/{conversation_id}/exportExport memory
GET/api/companion/memory/{conversation_id}/searchSearch memory
POST/api/companion/memory/{conversation_id}/importImport memory
DELETE/api/companion/memory/{conversation_id}Clear memory

The API server is hybrid: some handlers are classic storage/resource handlers, while orchestration, ask state, and runtime tree inspection now intersect with v2 projections and Jido-backed runtime data.

  • /api/agents/* is a mix of local store operations, daemon-backed agent control, and newer runtime-state inspection helpers.
  • /api/orchestration/* is the clearest current v2/Jido-backed HTTP surface.
  • /api/companion/* provides the full companion chat and memory surface.

All routes that modify state enforce principal propagation through the auth middleware. See Auth and identity for how principals, Casbin policies, and the OAuth broker work.

Start the server and inspect routes:

Terminal window
foxctl web serve --help

The MCP server can also be started locally:

Terminal window
foxctl mcp serve --daemon --skills

The canonical OpenAPI spec lives at docs/general/api-server.openapi.yaml. It defines request/response schemas, envelope shapes, and parameter types. Note that the spec still references /api/v1 in server URLs for backward compatibility, but the live server serves /api/*.