ThinkingRoot Docs
API Reference

REST endpoints

The engine surface, grouped by area. All paths are under the gateway's /engine proxy.

All engine endpoints are versioned under /api/v1 and reached through the gateway as "$GATEWAY/engine/api/v1/...", authenticated with a tr_sk_… key. Workspace-scoped routes take a workspace name ({ws}) — most projects use main. Responses use the { ok, data, error } envelope.

This is the surface you'll use most. The engine exposes more (tags, branch templates, proposals, engrams, bitemporal "as-of" queries, substrate-bus, the graph "galaxy" map, and SSE event streams). The probe endpoints /livez, /readyz, /metrics, and /api/v1/version are unauthenticated.

Workspaces

MethodPathPurpose
GET/api/v1/workspacesList mounted workspaces
POST/api/v1/workspacesMount (and auto-create) a workspace
GET/api/v1/workspaces/{name}/statusUnified status (claims, entities, health)
GET/api/v1/workspaces/{name}/status/streamStatus as an SSE stream

Knowledge

MethodPathPurpose
GET/api/v1/ws/{ws}/sourcesList sources
POST/api/v1/ws/{ws}/compileCompile sources into claims
POST/api/v1/ws/{ws}/compile/streamCompile with live progress (SSE)
POST/api/v1/ws/{ws}/sources/forgetDrop a source's claims
GET/api/v1/ws/{ws}/claimsList claims
GET/api/v1/ws/{ws}/witnesses · /witnesses/countList witnesses / count
GET/api/v1/ws/{ws}/witnesses/{id}/walkWalk a witness's evidence mesh
GET/api/v1/ws/{ws}/entities · /entities/{name}List / get entities
GET/api/v1/ws/{ws}/relations · /relations/{entity}Relations (all / for an entity)

Query & answer

MethodPathPurpose
GET/api/v1/ws/{ws}/searchText search
POST/api/v1/ws/{ws}/search/hybridHybrid text + semantic search
POST/api/v1/ws/{ws}/askGrounded answer (cited)
POST/api/v1/ws/{ws}/ask/streamGrounded answer, streamed (SSE)
POST/api/v1/ws/{ws}/ask/approval/{tool_use_id}Approve/reject a tool call mid-answer
GET/api/v1/ws/{ws}/health · /llm/healthGraph health / LLM provider health
GET/api/v1/ws/{ws}/gapsKnown gaps the graph can't yet answer

Branches

MethodPathPurpose
GET POST/api/v1/branchesList / create
GET/api/v1/branches/{branch}/diffDiff vs parent
POST/api/v1/branches/{branch}/mergeMerge into main
POST/api/v1/branches/{branch}/rollback · /checkout · /rebaseUndo / promote / rebase
GET/api/v1/branches/lineage · /branches/{branch}/statsDAG / stats
GET/api/v1/branches/{branch}/events/streamBranch events (SSE)

Prompts & Functions

MethodPathPurpose
GET PUT/api/v1/ws/{ws}/promptsList / upsert a Compiled Prompt
GET/api/v1/ws/{ws}/prompts/{name}/versionsVersion history
POST/api/v1/ws/{ws}/prompts/{name}/assembleAssemble with variables
GET PUT/api/v1/ws/{ws}/functionsList / deploy a Root Function
POST/api/v1/ws/{ws}/functions/{name}/invokeInvoke
GET/api/v1/ws/{ws}/functions/{name}/runsRun history

Connectors (MCP servers)

MethodPathPurpose
GET POST/api/v1/ws/{ws}/mcp-serversList / install an external MCP server
DELETE/api/v1/ws/{ws}/mcp-servers/{name}Remove