Skip to main content

talonic_submit_agent_task

Return the result of a claimed Agent task. Output keys must match output_contract exactly, required fields must be present, and every value must match its declared data type. The platform validates the entire result before writing any cell.

Submit is the last call of the pull workflow — list, get, claim, heartbeat, submit — and the only one that changes the document. It requires the task_id plus the exact execution_epoch from your claim; a stale epoch is rejected with HTTP 409 just as it is on heartbeats, which is what makes the workflow safe to run from several workers at once.

ParameterTypeDescription
task_id *UUIDClaimed task ID.
execution_epoch *integerExact epoch from the current claim.
outputs *objectDeclared field key to `{ value, confidence?, reasoning? }`. Confidence is 0–1; reasoning is at most 4,000 characters.
summarystringOptional overall result summary, at most 4,000 characters.
Submit result
{
  "task_id": "11111111-1111-4111-8111-111111111111",
  "execution_epoch": 3,
  "outputs": {
    "risk_score": {
      "value": 0.72,
      "confidence": 0.88,
      "reasoning": "Two adverse indicators in the supplied evidence."
    }
  },
  "summary": "Supplier requires enhanced review."
}

Validation is all-or-nothing. Every output key must exist in the task's output_contract, every required field must be present, and every value must match its declared data type. If any check fails, the platform rejects the whole submission and writes nothing — there is no partially-filled result to clean up. On success the task's status moves to submitted, the response returns the task's metadata, and the parked document resumes through the rest of its pipeline with your values in place.

The optional confidence (0–1) and reasoning (up to 4,000 characters) accompany each value into the document's audit trail, and summary describes the result as a whole. Filling them in is worth the tokens: reviewers see them next to the value when deciding whether to trust it, and they are the only trace of why the agent answered as it did once the conversation that produced the answer is gone.

Successful outputs are attributed to AI Agent (MCP) in the audit trail and stored with mcp_agent provenance. They do not receive human-review authority in v1.

Frequently asked questions

Can an Agent task return extra fields it discovered?+
No. Undeclared fields and invalid types are rejected before any value is written. Add desired outputs to the Agent stage contract first, then run a new document task.
What happens if my submission fails validation?+
Nothing is written — the submit is transactional. The task stays claimed under your execution epoch, so fix the outputs to match the contract and submit again before the lease expires.
Can I resubmit or amend after a successful submit?+
No. A successful submit is terminal for that task: the status becomes submitted and the document resumes. Corrections happen downstream — in review or by rerunning the document — not by a second submit.