Query tasks and results
On an initialized connection, use task/list to find task cards and task/get to read one card with its signals. Baseline protocol 0.1 advertises both methods. Check the capabilities in the initialization response before calling them. See CAPABILITIES in packages/api/src/protocol-initialization.ts, packages/api/src/connection.ts, and packages/api/test/swarm.test.ts. Request and response schemas
Read current task cards
After confirming task/list support, send this read-only request. limit ranges from 1 to 100 and defaults to 20. Read the current page from result.data. If the response includes nextCursor, use that value as params.cursor in the next request. The server can shorten a page to fit the frame size limit. See taskListParamsSchema in packages/api/src/protocol.ts and sendTaskList in packages/api/src/connection.ts.
{"jsonrpc":"2.0","id":"tasks-1","method":"task/list","params":{"limit":5}}After confirming task/get support, replace TASK_ID with the id of an actual data entry. The result contains task, signals, and an optional lease. A task card carries rootTaskId, optional parentTaskId, acceptance, acceptanceMet, and optional acceptanceEvidence. The status values are pending, claimed, running, completed, failed, and cancelled. A lease includes agentId, generation, and expiresAt. See taskGetResponseSchema, taskCardSchema, and leaseViewSchema in packages/api/src/protocol.ts.
{"jsonrpc":"2.0","id":"task-1","method":"task/get","params":{"taskId":"TASK_ID"}}Read original records
The following methods depend on server support and connection negotiation. Keep the source and pagination position for each view when showing the current card, plan, journal, or results for a task. See TaskQueryRequests.handle in packages/api/src/task-query-rpc.ts and capabilitiesForProtocol in packages/api/src/protocol-initialization.ts.
| What to read | Methods and source |
|---|---|
| Scheduler trace and acceptance evidence | task/inspect and task/evidence. task/inspect accepts either taskId or submissionId. task/evidence uses taskId. See packages/api/src/scheduler-protocol.ts. |
| Task plan | task/plan. Use status and state to interpret the response. Show a plan as confirmed only when the response confirms it and supplies its source. Continue pagination with confirmed.nextCursor where available. See taskPlanResponseSchema in packages/api/src/task-plan-protocol.ts. |
| Durable task history | task/catalog and task/history. The current 0.14 initializer supports an explicit requestTaskHistory: true opt-in. Verify the methods in the response before calling them. See initializeTaskHistoryParamsSchema in packages/api/src/protocol-initialization.ts and packages/api/src/task-history-protocol.ts. |
| File results and review material | task/changeList and task/changeRead. The current 0.14 initializer supports an explicit requestTaskChanges: true opt-in. Use the capability response to decide whether to call them. See packages/api/src/task-change-protocol.ts and initializeTaskChangesParamsSchema in packages/api/src/protocol-initialization.ts. |
To observe a task, follow the event subscription guide for the current connection. Cancellation is a separate write operation. A task/cancel result of { "ok": true } acknowledges the request. Use the task status to check the outcome. See packages/api/src/task-observe-rpc.ts and the task/cancel branch in packages/api/src/connection.ts.
