Skip to content

API Reference

The CI daemon exposes a FastAPI REST interface at http://localhost:{port}/api.

The port is dynamic per project. Find it with:

Terminal window
oak ci port

The daemon only allows requests from loopback origins (http://localhost:{port} and http://127.0.0.1:{port}). External origins are blocked by the CORS middleware. To access tools from another machine, connect to a team to expose MCP tools through the relay.

MethodPathDescription
GET/api/healthBasic liveness check
GET/api/statusDetailed daemon status and process info
GET/api/logsGet daemon/hook logs with pagination
MethodPathDescription
GET/api/searchSemantic search. Query params: q, limit, type
POST/api/searchJSON body search
POST/api/search/networkFederated search across connected relay nodes
POST/api/fetchRetrieve full content for specific chunk IDs
POST/api/rememberStore a memory observation
POST/api/contextGet relevant context for a task
GET/api/memoriesList memories with filtering and pagination
GET/api/memories/tagsList all unique memory tags
POST/api/memories/{id}/archiveArchive a memory
POST/api/memories/{id}/unarchiveUnarchive a memory
PUT/api/memories/{id}/statusUpdate observation lifecycle status
DELETE/api/memories/{id}Delete a memory
POST/api/memories/bulkBulk operations on memories
POST/api/memories/bulk-resolveBulk-resolve observations by session or IDs

Hook endpoints receive data from AI coding agents. The prefix is /api/oak/ci/.

MethodPathDescription
POST/api/oak/ci/session-startInitialize session context
POST/api/oak/ci/prompt-submitCapture user prompt
POST/api/oak/ci/before-promptPre-prompt context injection
POST/api/oak/ci/post-tool-useReport tool execution
POST/api/oak/ci/post-tool-use-failureReport failed tool execution
POST/api/oak/ci/stopFinalize session and trigger summarization
POST/api/oak/ci/session-endSession end event
POST/api/oak/ci/subagent-startSub-agent spawned
POST/api/oak/ci/subagent-stopSub-agent completed
POST/api/oak/ci/agent-thoughtAgent reasoning capture
POST/api/oak/ci/pre-compactBefore context compaction
POST/api/oak/ci/{event}Catch-all for other events
MethodPathDescription
GET/api/activity/sessionsList sessions
GET/api/activity/sessions/{id}Get session details
GET/api/activity/sessions/{id}/activitiesList session activities
GET/api/activity/sessions/{id}/lineageGet session lineage
GET/api/activity/sessions/{id}/relatedGet related sessions
POST/api/activity/sessions/{id}/relatedAdd a related session relationship
DELETE/api/activity/sessions/{id}/related/{rid}Remove a related session relationship
GET/api/activity/sessions/{id}/suggested-relatedSuggested related sessions (semantic)
POST/api/activity/sessions/{id}/completeManually complete a session
POST/api/activity/sessions/{id}/regenerate-summaryRegenerate summary
DELETE/api/activity/sessions/{id}Delete session (cascade)
GET/api/activity/plansList plans
POST/api/activity/plans/{id}/refreshRefresh plan content from disk
GET/api/activity/statsGet activity statistics
GET/api/activity/searchFull-text search activities
MethodPathDescription
GET/api/configGet current runtime config
PUT/api/configUpdate configuration
POST/api/config/testTest embedding provider connection
POST/api/config/test-summarizationTest summarization provider
POST/api/config/discover-contextDiscover model context window
GET/api/config/exclusionsGet exclusion patterns
PUT/api/config/exclusionsUpdate exclusion patterns
POST/api/config/exclusions/resetReset exclusions to defaults
GET/api/providers/modelsList embedding models from provider
GET/api/providers/summarization-modelsList LLM models
POST/api/restartReload config and reinitialize embedding chain
POST/api/self-restartTrigger graceful daemon process restart
MethodPathDescription
GET/api/agentsList agents, templates, and tasks
POST/api/agents/tasks/{name}/runRun a task
GET/api/agents/runsList agent runs
GET/api/agents/runs/{id}Get run details
POST/api/agents/runs/{id}/cancelCancel a running agent
GET/api/schedulesList schedules
GET/api/schedules/{task_name}Get schedule details
POST/api/schedulesCreate a schedule
PUT/api/schedules/{task_name}Update schedule
DELETE/api/schedules/{task_name}Delete schedule
POST/api/schedules/{task_name}/runTrigger a schedule manually
POST/api/schedules/syncRemove orphaned schedules
GET/api/agents/settingsGet agent settings
PUT/api/agents/settingsUpdate agent settings

Endpoints for the Agent Client Protocol integration. These manage long-lived interactive sessions between ACP-compatible editors and the OAK daemon.

MethodPathDescription
POST/api/acp/sessionsCreate a new interactive session
POST/api/acp/sessions/{id}/promptSend a prompt (streams NDJSON execution events)
POST/api/acp/sessions/{id}/cancelCancel an in-progress prompt
PUT/api/acp/sessions/{id}/modeSet permission mode (code, architect, ask)
PUT/api/acp/sessions/{id}/focusSet agent focus (oak, documentation, analysis, engineering, maintenance)
POST/api/acp/sessions/{id}/approve-planApprove a proposed plan
DELETE/api/acp/sessions/{id}Close and clean up a session
MethodPathDescription
GET/api/acp/statusCheck if ACP server is running
POST/api/acp/startStart the ACP server subprocess
POST/api/acp/stopStop the ACP server subprocess
GET/api/acp/logsGet recent ACP server logs
MethodPathDescription
GET/api/governance/configGet governance configuration
PUT/api/governance/configSave governance configuration
GET/api/governance/auditQuery audit events with filters
GET/api/governance/audit/summaryAggregate audit stats for dashboard
POST/api/governance/audit/pruneManually prune old audit events
POST/api/governance/testTest a hypothetical tool call against policy
MethodPathDescription
GET/api/channelGet current channel, version, and PyPI availability
POST/api/channel/switchSwitch release channel (stable/beta)
MethodPathDescription
POST/api/oak/ci/notifyHandle agent notification events (e.g., Codex notify)
MethodPathDescription
POST/v1/logsOTLP HTTP logs receiver endpoint
MethodPathDescription
GET/api/index/statusGet codebase index status
POST/api/index/rebuildTrigger full index rebuild
POST/api/index/buildTrigger index build
MethodPathDescription
POST/api/swarm/joinJoin a swarm (save URL/token and connect)
POST/api/swarm/leaveLeave the swarm (clear config and disconnect)
GET/api/swarm/statusGet swarm connection status
GET/api/swarm/daemon/statusCheck if swarm daemon is running
POST/api/swarm/daemon/launchCreate swarm daemon config and start
MethodPathDescription
GET/api/backup/statusCheck backup status and list backups
POST/api/backup/createCreate database backup
POST/api/backup/restoreRestore from backup
POST/api/backup/restore-allRestore all team backups
MethodPathDescription
POST/api/cloud/startDeploy/connect cloud relay (scaffold, deploy, connect)
POST/api/cloud/stopStop cloud relay and clear local connection
GET/api/cloud/preflightCheck scaffold/auth/deploy readiness
PUT/api/cloud/settingsUpdate relay URL and token settings
POST/api/cloud/connectConnect daemon to an existing relay
POST/api/cloud/disconnectDisconnect daemon from relay
GET/api/cloud/statusGet relay connection status
MethodPathDescription
POST/api/devtools/rebuild-indexRebuild codebase index
POST/api/devtools/reset-processingReset processing state
POST/api/devtools/trigger-processingTrigger background processing
POST/api/devtools/compact-chromadbCompact ChromaDB
POST/api/devtools/rebuild-memoriesRe-embed memories
POST/api/devtools/database-maintenanceSQLite/ChromaDB maintenance
POST/api/devtools/regenerate-summariesRegenerate missing summaries
POST/api/devtools/cleanup-minimal-sessionsRemove low-quality sessions
POST/api/devtools/reprocess-observationsReprocess observation extraction
POST/api/devtools/resolve-stale-observationsFind and resolve stale observations
GET/api/devtools/memory-statsGet detailed memory statistics
MethodPathDescription
GET/api/mcp/toolsList available MCP tools
POST/api/mcp/callCall an MCP tool (query param: tool_name)
MethodPathDescription
GET/api/team/statusTeam sync connection status
GET/api/team/membersList online team members
GET/api/team/configGet team sync configuration
POST/api/team/configUpdate team sync configuration

See also the MCP Tools Reference for the MCP protocol tools exposed to agents.