Capabilities
The Search Agent is a data-retrieval agent that returns schema-defined structured data outputs and visualization cards. Hand it a question that needs real retrieval work — resolving a cohort, ranking or filtering a set, multi-hop aggregation — and it researches Tako’s curated knowledge graph and the live web, then returns exactly the shape you asked for.Structured data out
Define an
output_schema (JSON Schema) and the agent fills it: synthesized scalar fields plus dataset slots (x-tako-dataset) populated with the exact retrieved rows. Get machine-usable JSON, not prose you have to parse.Visualization cards
Every run may also build Tako
cards — interactive knowledge cards with their sources and methodology — ready to embed alongside the data. On by default; suppress with cards: false.Grounded and citable
The agent draws on Tako’s curated, structured data and the live web. The written
answer carries [n] markers that join a top-level citations registry covering both, so every claim is attributable.Asynchronous and long-running
Dispatch a run, then poll or stream it to completion (a run can take minutes) — real multi-step work in the background instead of racing a single call.
Example
Dispatch a run, then pollGET /v1/agent/search/runs/{run_id} until status is completed or failed:
- cURL
- Python
Example API Response
Example API Response
A completed run. result.answer is markdown with [n] citation markers; result.citations is the registry those markers join; result.cards[0] is the lead card.
Structured outputs
Pass anoutput_schema (a JSON Schema) to get machine-usable JSON back in result.structured_output. Two kinds of field:
- Synthesized fields — ordinary schema properties the agent writes (a headline, a count, a boolean).
- Dataset slots — a property marked
"x-tako-dataset": true, filled with the exact retrieved rows as aTakoDataset. A slot node carries onlyx-tako-dataset, an optionaldescription, and an optionalcolumnshint — notype.
object / array / string / number / integer / boolean, plus enum, required, and description. Caps: 16 KB, depth 5, 64 properties, 4 dataset slots. A schema outside these bounds returns 400 output_schema_invalid.
The SDK ships two helpers for consuming the result — derive_response_schema() (the schema structured_output actually validates against, with each slot as TakoDataset | null) and TakoDatasetView (a records / DataFrame view over a filled slot):
When the request carries an
output_schema, the result adds structured_output_status (complete / partial / failed) and, for partial runs, unfilled_fields — the dot-separated paths of dataset slots the agent honestly couldn’t fill. structured_output_citations maps field paths back to the same [n] citation index space as the answer.Choosing sources
source_indexes controls where the agent researches. It defaults to ["data", "web"] — both — so pass it only to restrict:
["data", "web"](default) — Tako’s curated knowledge graph and the live web.["data"]— the curated knowledge graph only.["web"]— the live web only.
"tako" is accepted as a synonym for "data".
Continue a thread
Each run belongs to a thread. Pass a prior run’sthread_id to ask a follow-up in the same conversation:
thread_id to start a fresh thread. A thread is pinned to one agent product and one set of source_indexes.
Stream live progress
To show progress while the agent works, stream the run over Server-Sent Events instead of polling — sendAccept: text/event-stream on dispatch. client.agent.search.stream() yields SearchAgentStreamEnvelope events; the terminal agent_result event carries the same SearchAgentResult you’d get from polling. See the coding-agent reference for the full event taxonomy and resume semantics.
Stream for live progress in interactive UIs; poll for simple server-to-server flows. Both return the same
SearchAgentResult when the run completes.