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 Retrieval 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, no structured outputs, and 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), 'web' (open-web search), or both. Defaults to ['data', 'web']. Tako accepts the legacy value 'tako' as a synonym for 'data'.
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 (for example, 'America/New_York'). The agent uses it to render dates and times in card preview images. It does not affect the returned data.
Settings that control the response and rendering.
Response
Run dispatched. With Accept: application/json, poll GET /v1/agent/answer/runs/{run_id} for the run status. With Accept: text/event-stream, the response is an SSE stream of AnswerAgentStreamEnvelope events. The stream ends at stream_done. If the stream ends without an agent_result event, poll GET /v1/agent/answer/runs/{run_id} for the 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 that the [n] markers join. cards reuse the sibling TakoCard. metadata carries definitions, assumptions, and methodology. There is no inline data, no structured output, and no web_results — ever. A prose-only result (empty cards) is legitimate.
Usage for one metered request. total_cost_usd is always present (the
total quoted charge). compute and data are the additive breakdown;
each appears only where it applies. total_cost_usd always equals the sum
of the components that appear.
Request body for POST /v1/agent/answer/runs.
Frozen contract: no output_schema, no structured outputs, and no inline data — ever. Cards are the only data-export path (via /v1/contents).