Dispatch an Answer Agent run
Dispatch an Answer Agent run — deep research returning a synthesized, cited answer
answer (markdown) with the citations and cards that back it. Use it for open-ended questions that need reasoning across many entities.
See the Answer Agent guide for examples, citations, streaming, threads, and sources.
Notes
- To authenticate, send your Tako API key in the
X-API-Keyheader. Store it as an environment variable rather than hardcoding it. - The agent is asynchronous: this endpoint returns
202with anAnswerAgentRunwhosestatusisqueued. Poll Poll an Answer Agent run untilstatusiscompletedorfailed. - To stream progress live instead of polling, send
Accept: text/event-stream. The response is then a Server-Sent Events stream ofAnswerAgentStreamEnvelopeevents. See the coding-agent reference. - Frozen contract: the Answer Agent never accepts an
output_schemaand never returns structured output or inline data — the result isanswer+cards+citations+metadata. For structured data, use the Search Agent.
Choosing sources
source_indexes is optional and defaults to ["data", "web"] — both. Pass it only to restrict: ["data"] (curated knowledge graph only) or ["web"] (open web only). The legacy value "tako" is a synonym for "data".
Continuing a thread
Pass thethread_id from a prior run to ask a follow-up in the same conversation. Omit it to start a new thread. A thread is pinned to the Answer Agent and to one set of source_indexes.Authorizations
Body
Request body for POST /v1/agent/answer/runs.
Frozen contract: NO output_schema / structured outputs, NO inline data — ever. Cards are the only data-export path (via /v1/contents).
Natural-language request for the answer agent.
"How have American Airlines' margins held up against fuel shocks?"
Existing thread to continue (follow-up). Omit to start a new thread.
Answer-agent effort. Only 'medium' is currently supported.
medium Which sources the agent may use: 'data' (curated knowledge) and/or 'web' (open-web search). Defaults to ['data', 'web']. The legacy value 'tako' is accepted as a synonym for 'data'.
data, web ["data"]["web"]["data", "web"]BCP-47 locale. Drives the language of the agent's answer and the locale used when rendering card preview images. Defaults to en-US.
IANA timezone (e.g. 'America/New_York') used to render dates/times in card preview images. Does not affect the returned data.
Settings controlling the response/rendering.
Response
Run dispatched. With Accept: application/json, poll GET /v1/agent/answer/runs/{run_id} for status. With Accept: text/event-stream, the response is an SSE stream of AnswerAgentStreamEnvelope events terminating at stream_done; if the stream ends without an agent_result event, poll GET /v1/agent/answer/runs/{run_id} for terminal status.
The answer-agent run resource returned by dispatch (202) and poll (GET).
queued, running, completed, failed "agent.run"Final answer-agent output. answer is markdown prose with [n] citation markers; citations is the unified top-level registry the [n] markers join; cards reuse the sibling TakoCard; metadata carries definitions/assumptions/ methodology. NO inline data, NO structured output, NO web_results — ever. Prose-only (empty cards) is legitimate.
Cost-plus usage for one metered request. total_cost_usd is always present
(the total quoted charge). compute / data are the additive breakdown and
appear only where they apply. See module docstring for the quote-vs-drawdown
caveat and the total == compute + data invariant.
Request body for POST /v1/agent/answer/runs.
Frozen contract: NO output_schema / structured outputs, NO inline data — ever. Cards are the only data-export path (via /v1/contents).