Skip to content

The orchestration pipeline coordinates every agent session, tool call, and budget decision inside a workspace. This page documents the workspace-level endpoints that read configuration, stream live events, expose the full debug dump, manage the interactive questions queue, and purge all orchestration state. The four domain pages cover the lifecycle and state-transition endpoints for each subsystem:

The Master TODO is the central state machine: every orchestrated task is an entry that transitions through creation, dispatch, execution, and resolution. The executor consumes Master TODO entries subject to budget caps and worker locks; phases and orchestrator sessions drive prompt dispatch and memory; the vault persists the TODO as a portable, importable document. The endpoints below give you a cross-cutting view of that whole pipeline — config, live event feed, tool call log, debug snapshot, human-in-the-loop questions, and full reset.

GET /api/v1/workspaces/{workspaceID}/orchestration/config

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/config”

Returns the current orchestration configuration for the workspace.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
{}
const { data } = await client.agent.orchestration.getConfig({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});

PATCH /api/v1/workspaces/{workspaceID}/orchestration/config

Section titled “PATCH /api/v1/workspaces/{workspaceID}/orchestration/config”

Partially updates the orchestration configuration. The request body is a free-form partial update object — only the fields you include are changed.

NameInTypeRequiredDescription
workspaceIDpathstringYesworkspaceID path parameter

The body is an open partial-update object. Any fields you supply are merged into the current config.

{}
const { data } = await client.agent.orchestration.updateConfig({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
data: { /* partial config fields */ },
});

GET /api/v1/workspaces/{workspaceID}/orchestration/events

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/events”

Server-Sent Events stream of every orchestration event emitted in the workspace. Supports ?since_seq=N for reconnection.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
event: todo.created
data: {"seq":1,"type":"todo.created","payload":{}}
event: todo.dispatched
data: {"seq":2,"type":"todo.dispatched","payload":{}}
const stream = await client.agent.orchestration.streamEvents({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});
for await (const event of stream) {
// event.type, event.seq, event.payload
}

GET /api/v1/workspaces/{workspaceID}/orchestration/events/connections

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/events/connections”

Returns the number of active SSE subscribers on the orchestration events stream for the workspace.

NameInTypeRequiredDescription
workspaceIDpathstringYesworkspaceID path parameter
{
"count": 3
}
const { data } = await client.agent.orchestration.getEventsConnections({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});
console.log(`Active SSE subscribers: ${data.count}`);

GET /api/v1/workspaces/{workspaceID}/orchestration/log

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/log”

Returns a paginated, filterable log of every tool call made by orchestrated sessions. The response includes the log entries and pagination metadata.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
{
"items": [
{
"tool": "fs.read",
"sessionID": "01HXYZABCDEFGHJKMNPQRSTVW",
"callID": "call_01HXYZBROWSEFILE",
"entryID": "entry_01HXYZREADFILE",
"title": "Read package.json",
"timestamp": 1717691432000,
"duration": 142,
"status": "ok",
"corrections": [],
"target": "/workspace/repo/package.json",
"agentName": "build-agent",
"container_id": "ctr_01HXYZ",
"workspaceID": "ws_01HXYZABCDEFGHJKMNPQRSTVW"
},
{
"tool": "net.fetch",
"sessionID": "01HXYZABCDEFGHJKMNPQRSTVW",
"callID": "call_01HXYZFETCHURL",
"timestamp": 1717691438000,
"duration": 412,
"status": "intercepted",
"agentName": "research-agent",
"workspaceID": "ws_01HXYZABCDEFGHJKMNPQRSTVW"
}
],
"meta": {
"page": 1,
"limit": 50,
"total": 2,
"pages": 1
}
}
const { data } = await client.agent.orchestration.getLog({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});

GET /api/v1/workspaces/{workspaceID}/orchestration/log/stream

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/log/stream”

Server-Sent Events stream of tool call log entries as they are recorded.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
event: tool.call
data: {"tool":"fs.read","callID":"call_01HXYZBROWSEFILE","status":"ok","timestamp":1717691432000}
event: tool.call
data: {"tool":"net.fetch","callID":"call_01HXYZFETCHURL","status":"intercepted","timestamp":1717691438000}
const stream = await client.agent.orchestration.streamLog({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});
for await (const entry of stream) {
// entry.tool, entry.callID, entry.status, ...
}

GET /api/v1/workspaces/{workspaceID}/orchestration/debug-dump

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/debug-dump”

Exports the full orchestration debug dump for the workspace — every TODO, event, budget record, session reference, and in-memory cache needed to reconstruct the live state.

NameInTypeRequiredDescription
workspaceIDpathstringYesworkspaceID path parameter
{}
const { data } = await client.agent.orchestration.getDebugDump({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});

Questions are interactive prompts emitted by agents that need a human decision before they can continue — approvals, clarifications, or option picks. The queue is bounded by the number of in-flight sessions and is not paginated; answered or expired questions disappear from the feed as soon as they resolve. You can poll the list endpoint or subscribe via the orchestration events SSE stream to see new questions as they appear.

GET /api/v1/workspaces/{workspaceID}/orchestration/questions

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/questions”

Returns every unanswered question raised by any orchestrated session in the workspace.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
{
"questions": [
{
"id": "que_01HXYZABCDEFGHJKMNPQRSTVW",
"sessionID": "01HXYZABCDEFGHJKMNPQRSTVW",
"questions": [
{
"question": "Which deployment target should I use for the new service?",
"header": "Deploy target",
"options": [
{
"label": "AWS us-east-1",
"description": "Production-grade region with full feature parity."
},
{
"label": "GCP europe-west1",
"description": "Lower latency for EU users; some services are stubs."
}
],
"multiple": false,
"custom": true
}
],
"tool": {
"messageID": "msg_01HXYZMESSAGEID",
"callID": "call_01HXYZCALLID"
}
}
]
}
const { data } = await client.agent.orchestration.questionsList({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});

GET /api/v1/workspaces/{workspaceID}/orchestration/questions/{questionID}

Section titled “GET /api/v1/workspaces/{workspaceID}/orchestration/questions/{questionID}”

Returns the full detail of a single pending question, including its options and the originating tool call reference.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
questionIDpathstringYesQuestion identifier
{
"question": {
"id": "que_01HXYZABCDEFGHJKMNPQRSTVW",
"sessionID": "01HXYZABCDEFGHJKMNPQRSTVW",
"questions": [
{
"question": "Approve the schema migration on the production database?",
"header": "Approve migration",
"options": [
{
"label": "Approve",
"description": "Run the migration now and proceed."
},
{
"label": "Reject",
"description": "Cancel and roll back the orchestrator."
}
],
"multiple": false,
"custom": true
}
],
"tool": {
"messageID": "msg_01HXYZMESSAGEID",
"callID": "call_01HXYZCALLID"
}
}
}
const { data } = await client.agent.orchestration.questionsGetDetail({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
questionID: "que_01HXYZABCDEFGHJKMNPQRSTVW",
});

POST /api/v1/workspaces/{workspaceID}/orchestration/questions/{questionID}/answer

Section titled “POST /api/v1/workspaces/{workspaceID}/orchestration/questions/{questionID}/answer”

Submits an answer to a pending question. The answer is an array of arrays of strings, one inner array per question in the request (questions can be multi-select).

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
questionIDpathstringYesQuestion identifier
NameTypeRequiredDescription
answersarrayYesOne inner array of selected option labels per question in the request
{
"answers": [
["Approve"]
]
}
{
"answered": true
}
const { data } = await client.agent.orchestration.questionsAnswer({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
questionID: "que_01HXYZABCDEFGHJKMNPQRSTVW",
data: {
answers: [["Approve"]],
},
});

POST /api/v1/workspaces/{workspaceID}/orchestration/purge

Section titled “POST /api/v1/workspaces/{workspaceID}/orchestration/purge”

Pauses the executor and clears every piece of orchestration state for the workspace: TODO entries, events, budgets, tool logs, session IDs, and in-memory caches. Configuration is preserved. Use this for a clean reset without losing your tuning.

NameInTypeRequiredDescription
workspaceIDpathstringYesWorkspace identifier
{
"purged": [
"todos",
"events",
"budgets",
"tool_logs",
"session_ids",
"caches"
]
}
const { data } = await client.agent.orchestration.purge({
workspaceID: "ws_01HXYZABCDEFGHJKMNPQRSTVW",
});
console.log("Cleared:", data.purged);