agentleFS
GetStreamGetStream/Agents/.claude/skills/router-search/SKILL.md

router-search

Skill8.2k starsChanged 58 days agoApache-2.0View on GitHub

What the search router can be asked for, what each provider calls it, and what it refuses to fake. Read before adding a search option or a search provider.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projectsWeek of Nov 22: 0 new projects
Oct 2026Nov 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about GetStream/Agents

The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 8

Talked about on GitHub (8 times).

On GitHub · 8

3 more on GitHub

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search has no socket and no recording: a question and its answer are one round trip, so it is a plain POST /v1/search.

    line 13

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Routing search

The per-modality half of router-interface. The vocabulary is options.Search; the providers are under internal/search and are declared in router.yaml.

Search has no socket and no recording: a question and its answer are one round trip, so it is a plain POST /v1/search. What separates the providers is whether a model writes the answer before it comes back. The low-latency tier returns pages for the conversation's own model to read; the high-quality tier pays a second model, and the seconds it takes, to have the sentence written for it.

depth is not a term, it is the route. instant and fast pick the low-latency tier and standard and deep the high-quality one, because asking for a deep answer is asking for the tier that reads pages before answering rather than the one that hands them over.

The top five, and what each calls the same thing

OptionExaTavilyPerplexityBraveLinkup
depthtype: fast, auto, neuralsearch_depth: basic, advancedsearch vs sonarone tierdepth: standard, deep
resultsnumResultsmax_resultsmax_resultscount—
include_domainsincludeDomainsinclude_domainssearch_domain_filtersite: in the queryincludeDomains
exclude_domainsexcludeDomainsexclude_domains-domain in the filtersite: in the queryexcludeDomains
categorycategorytopic: general, news, finance—result_filter—
max_age_hoursstartPublishedDatedayssearch_recency_filterfreshnessfromDate
locationuserLocationcountryweb_search_options.user_locationcountry—
contentscontents: {text, highlights, summary}include_raw_content, include_answercitations onlyextra snippetsoutputType
output_schema/answer with outputSchema—response_format—structuredOutputSchema

What the table is saying:

  • Recency is expressed five ways. A date floor, a day count, a named window, a freshness code. max_age_hours is the one thing they can all be computed from, and zero means force a live crawl rather than trust a cached page.
  • A domain filter is not universal. Brave has no parameter for it, only the site: operator in the query, and that is a different thing: it changes the query the user asked.
  • Only some providers return the extract. contents asks for the text a model actually reads. Perplexity returns citations and the answer it wrote; there is no per-hit text to ask for.

What the router refuses to fake

The same Terms() mechanism as the other modalities, and search is where it is most visible today. exa/fast and exa/auto declare [domains, category, recency, location, contents] because exa.go sends all five. The Tavily and Perplexity clients send only the query, the depth and the result count, so they declare nothing — which means a request that filters by domain is not routed to them.

That is the honest state, not the finished state: Tavily and Perplexity both have the parameters and our clients do not send them yet. Closing that gap means sending them in the client first and declaring them second. Declaring a term to widen the candidate set is the one thing this design exists to prevent, and a search that quietly ignored the domain filter is exactly the failure it prevents: the caller cannot tell from the results that the filter was dropped.

A term nothing can serve is a 400 naming it. For a voice agent that is the right answer — an agent that says "I could not restrict that to your own documentation" is more useful than one that reads out a stranger's blog post.

Adding an option

  1. A field on options.Search, with Merge, plus a Term and a line in Terms() unless it picks the route the way depth does.
  2. The same field on SearchOptions, on its Go struct in internal/api. Then run go run ./cmd/openapi and regenerate all three clients.
  3. Send it in each provider that takes it, translating into that vendor's shape — a cache age into a date floor, a country into whatever it calls a country — and declare it in supports:.
  4. A test that a provider which does not send it is not chosen when it is asked for.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.