Agent Tasks
List and inspect Agent tasks parked by a Spec's Agent (via MCP) stage with GET /v1/agent-tasks: status filter, cursor pagination, input snapshots and contracts.
A Spec's pipeline rail can include an Agent (via MCP) stage: when a document reaches that stage, the pipeline parks it and creates an agent task — an immutable work item holding a snapshot of the document's current cells, an output contract naming the fields the agent must fill, and the stage's instructions. An external agent (typically connected over MCP) pulls the task, does its work with whatever tools it has, and submits values; the pipeline then resumes at the next stage.
A second stage type shares the same transport: Agentic Review runs post-assembly, creating one *product-grain* task per composed record instead of one per document. Its snapshot carries the composed cells plus, per contract field, the full distribution of document-level candidate values the composed value collapsed from — so a reviewing agent adjudicates evidence without re-reading documents. Submissions from these tasks land as canonical cells on the composed record under the actor label "Agentic Review".
GET /v1/agent-tasks lists your workspace's document-scoped tasks, newest first, with read scope. Filter with ?status (one of available, claimed, submitted, timed_out, cancelled — anything else is a 400), page with ?limit (1–100, default 50) and the opaque ?cursor returned as pagination.next_cursor. The listing is keyset-paginated on (created_at, id), so pages stay stable while new tasks are created ahead of your cursor.
Every route on this surface requires the credential to resolve to exactly one tenant. A key operating in the cross-tenant master view gets 400 with the message Select one tenant for Agent task access — task snapshots contain document values, and cross-tenant reads of that payload are never allowed. Additionally, Sources-IAM is evaluated as the user who created the API key: a task whose document sits behind a source restriction that principal is not admitted to is simply invisible (404 on fetch, absent from the list), never a 403.
GET /v1/agent-tasks/:id returns the full payload: the listing's metadata plus input_snapshot (the parked record's cells — and for product-grain tasks the candidates distributions, the frozen autonomy contract, the anchor document, and the triggers that parked it), output_contract (the declared output fields with key, dataType, required), free-text instructions, and timeout_fallthrough (what happens if no agent answers in time: hold, skip, or route_to_review).
/v1/agent-tasksQuery parameters
50curl
curl -s "https://api.talonic.com/v1/agent-tasks?status=available&limit=25" \
-H "Authorization: Bearer tlnc_your_api_key"Response (200)
{
"data": [
{
"id": "0b6a2f5e-8c1d-4e7a-9f3b-2d4c6e8a0b1c",
"customer_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"pipeline_id": "1a0c681d-ea20-4bb4-8892-01a6d7f834da",
"pipeline_document_id": "e2b8d4f6-1a3c-5e7f-9b1d-3f5a7c9e1b3d",
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"stage_id": "agent-1",
"phase_index": 3,
"status": "available",
"execution_epoch": 0,
"claimed_at": null,
"lease_expires_at": null,
"timeout_at": "2026-08-29T14:30:00.000Z",
"submitted_at": null,
"created_at": "2026-08-29T12:30:00.000Z",
"updated_at": "2026-08-29T12:30:00.000Z"
}
],
"pagination": {
"has_more": false,
"next_cursor": null
}
}Get a task
/v1/agent-tasks/:idPath parameters
Response (200) — document-grain task
{
"id": "0b6a2f5e-8c1d-4e7a-9f3b-2d4c6e8a0b1c",
"status": "available",
"stage_id": "agent-1",
"phase_index": 3,
"execution_epoch": 0,
"timeout_at": "2026-08-29T14:30:00.000Z",
"input_snapshot": {
"document": { "id": "c3d4e5f6-a7b8-9012-cdef-123456789012", "filename": "policy-0091.pdf" },
"recordSetId": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
"recordId": "e2b8d4f6-1a3c-5e7f-9b1d-3f5a7c9e1b3d",
"cells": [
{
"fieldKey": "policy_number",
"dataType": "string",
"value": null,
"status": "empty",
"confidence": null,
"source": "llm_extraction",
"auditRef": null
}
]
},
"output_contract": [
{ "key": "policy_number", "dataType": "string", "required": true },
{ "key": "policy_holder", "dataType": "string", "required": false }
],
"instructions": "Look up the policy number in the carrier portal if it is not printed on the document.",
"timeout_fallthrough": "route_to_review"
}Errors
Error responses