Skip to main content
POST
Dispatch an answer agent run
The Answer Agent researches a natural-language question across Tako’s knowledge and the live web, then returns a synthesized, opinionated 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-Key header. Store it as an environment variable rather than hardcoding it.
  • The agent is asynchronous: this endpoint returns 202 with an AnswerAgentRun whose status is queued. Poll Poll an Answer Agent run until status is completed or failed.
  • To stream progress live instead of polling, send Accept: text/event-stream. The response is then a Server-Sent Events stream of AnswerAgentStreamEnvelope events. See the coding-agent reference.
  • Frozen contract: the Answer Agent never accepts an output_schema and never returns structured output or inline data — the result is answer + 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 the thread_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

X-API-Key
string
header
required

Body

application/json

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).

query
string
required

Natural-language request for the answer agent.

Example:

"How have American Airlines' margins held up against fuel shocks?"

thread_id
string<uuid> | null

Existing thread to continue (follow-up). Omit to start a new thread.

effort
enum<string>
default:medium

Answer-agent effort. Only 'medium' is currently supported.

Available options:
medium
source_indexes
enum<string>[]

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'.

Available options:
data,
web
Examples:
locale
string
default:en-US

BCP-47 locale. Drives the language of the agent's answer and the locale used when rendering card preview images. Defaults to en-US.

timezone
string | null

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.

output_settings
AgentOutputSettings · object | null

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).

run_id
string
required
status
enum<string>
required
Available options:
queued,
running,
completed,
failed
created_at
string
required
object
string
default:agent.run
Allowed value: "agent.run"
thread_id
string | null
completed_at
string | null
result
AnswerAgentResult · object | null

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.

error
ErrorObject · object | null
usage
Usage · object | null

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
AnswerAgentRunRequest · object | null

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).