The stdin request
One JSON object on stdin, one JSON envelope on stdout. The query never reaches the process list and needs no shell escaping.
A malformed field answers fix_input before any router call. tier and the query's length are not checked here, and the router answers for them. The answer's shape is on The envelope.
A field is spelled exactly as below. Every top-level key must be spelled exactly as the request defines it: a key in another case, such as QUERY, is unknown_field naming the key, exit 2, fix_input, and the router is never called. A VERSION key is unknown_field whatever its value. Through jevlin mcp the tools answer the same way.
Fields
| field | value |
|---|---|
version | 1, required. |
query | The search, required, not blank. |
objective | Experimental and optional. What you are trying to find out, in your own words: a non-blank string of at most 4096 bytes. The router passes it to the providers that accept a goal and keeps it on the trace; how it is used is still being tested, so the skill no longer asks for it. |
tier | "fast", "balanced" or "max". fast runs the indexes of a preset: two (economy, the default) or three (standard). Absent, the request carries your tier (agents tier, then [router] tier), or none, and the router applies your key's default. See Providers and tiers. |
recency | "day", "week", "month" or "year". Sent to every arm that takes it; the router drops pages that do not match and reports it in result.filters_applied. Without that report the results may be unfiltered, so check each page's published date if it must hold. |
domain_filter | Up to 16 bare hostnames. Sent and reported like recency; without the report, check each page's url host if it must hold. |
as_of | From v0.9.0. An RFC 3339 time with a zone, at least a minute in the past and at most 365 days back: a dated search, the web as it was saved at or before then. The answer echoes the cutoff in result.as_of, and result.filters_applied.as_of says how many results were dropped for a later publication date. Fewer results, or none, is a valid answer. An empty as_of, or one beside recency, is refused before anything is sent (exit 2, fix_input). Absent, the search is live. |
max_results | 1 to 25: a cap per arm. |
search_queries | 1 to 4 more wordings of query, each a non-blank string of at most 4096 bytes, searched beside it; a repeat is dropped. Each extra wording costs about as much as another search. |
merged_limit | 1 to 50: how many pages result.merged holds. Absent, see What a search returns. |
max_chars | A positive integer: the characters of page text across the whole merged list, spent in list order, so later pages get less. With page_chars too, the router cuts each page at page_chars first. |
page_chars | 200 to 4000: the characters of text each page keeps. Absent, see What a search returns. |
cache | "default" (the same as absent) or "refresh". The router serves a repeat of a search from its cache for up to 15 minutes; "refresh" runs it live instead and is billed as live, keeps the fresh result for the next caller where the account retains content, and says so in result.usage.cache_refresh. The command line's --fresh is the same. |
providers | Up to 16 provider names, on balanced or max only: restrict the fan-out, or reach an extended arm that runs only when named. On fast the router answers 400 invalid_request. Recorded as decision.requested. The router owns the list; an unknown name is its call. |
view | "merged" (default) or "full". The default carries the merged list without the per-provider candidates, and each page without excerpts and canonical_url, which repeat its snippet and url; "full" adds all three. Either way the router is asked for its merged view, and result.merged is that view, never re-merged by the client. |
What a search returns
An agent's --stdin search that sizes nothing gets 500 characters of text per page on every tier (page_chars), and a merged list of at most 16 pages where the router's own window would be larger: on max, and with search_queries. That keeps an agent's answer under about 20,000 characters; to read more of a page, the agent fetches it (Reading a page in full). A request's own max_results, merged_limit, page_chars and max_chars replace these. Without them, the router's defaults apply (a person's search from the command line, for one): a 12-page merged list, 24 on max, and 1,200 characters per page, 2,000 on max.
What each option is for, with examples, is on Request options.
Sending it
From a POSIX shell, a heredoc keeps the query out of the command line:
jevlin search --stdin <<'JSON'
{"version":1,"query":"what is proof of authority consensus"}
JSON
Where the shell is PowerShell, a skill pipes a here-string into the call:
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
@'
{"version":1,"query":"what is proof of authority consensus"}
'@ | & 'C:\Users\you\.jevlin\bin\jevlin.exe' search --stdin
The first line is what makes an apostrophe, a quotation mark or any non-ASCII character arrive as written. Without it, Windows PowerShell 5.1 turns every non-ASCII character into ? on the way to the program, and the search answers a different question.
Each installed skill carries the form for its agent's shell, with your paths filled in.
Bounds
-timeout, default 1m0s, bounds the whole search: connect, TLS, headers, body and any second request. A search sends a second request in three cases, each once and under the same deadline:
- the router answers the exact code
trace_unsupported: the search is sent again without the trace; - a request carrying
objectiveorsearch_queriesis answeredmalformed_json, by a router that predates them or whose body limit they push it past: it is sent again without them, andresult.forms_droppedistrue; - a fast search with a stored preset first asks
GET /v1/fast-sets(within 2 seconds) whether the router lists that preset, and sends it asfast_setonly if so.
Nothing else causes a second request.