search.automatic submits one question and lets the service pick the
pipeline — fact, deep, or filtered search — instead of you calling one of
them by name. It returns a Promise<Job> whose result wraps the chosen
pipeline’s native output. Files must already be
ingested.
Automatic search is single-shot: there is no session to continue and no
clarification question back — an ambiguous query is answered under the
service’s best reading. Before searching, the service selects fact search for
focused lookups, high-effort deep search for analysis and investigation, or
filtered search for catalog entries. Read the result by its output type; the
selected pipeline can vary between similar queries.
Basic usage
Method signature
Parameters
Returns
AJob. On success, job.result is an AutomaticSearchResult
(result_type: "automatic_search"), wrapping the chosen pipeline’s native,
fully typed result:
Narrow the wrapper with
result_type and !(result instanceof UnknownResult),
then narrow result.output with its own result_type. Every field on
output means exactly what it means on that pipeline’s own route.
Result structure
routing
The
output types above are the stable contract. Which pipeline gets selected
for a given query is not: it may vary between similar queries and change
between deployments.
Receipts and pagination: output_job_id
The wrapper’s own job retains the wrapper. The output’s durable artifacts
— a deep result’s retained SQL results (res_… handles), ground crops, and a
filtered result’s cursor state — belong to the job named by output_job_id.
Use that id wherever a native result’s documentation says “this job”:
filtered_page method. Page a filtered output
through the native filtered-search route
(POST .../filtered-search with { "type": "page", "cursor": "…" }), or use
the Python SDK’s search.filtered_page. Pages execute without another routing
decision.
Reading the three output shapes
Error handling
Best practices
Read the output by its type
Branch on
output.result_type — the selected pipeline may vary between
similar queries and between deployments.Use output_job_id for artifacts
Retained rows, receipts, and cursors belong to the output’s job, not the
wrapper’s.
Ask an answerable question
There is no clarification back. Put the disambiguation into
query or
context up front.Pick a pipeline yourself when you know
If you already know you want an agent investigation, call
search.deep
directly and skip the router.Related search methods
See Search methods and the Search guide.
Next steps
Deep search
The agent loop, sessions, and clarifications — when you choose it yourself.
Job management
Wait, stream events, and cancel long-running jobs.