Skip to main content

Module search

Module search 

Source
Expand description

Native query-based web search tool.

Exposes one tool to the LLM:

  • web_search — issues a natural-language query to an external search API and returns a ranked title/url/snippet list. Unlike crate::WebScrapeExecutor, this tool does not require a pre-known URL.

Mirrors WebScrapeExecutor’s cross-cutting machinery (SSRF validation, egress logging, audit, IPI filtering) for the single fixed search endpoint, but:

  • The search endpoint is exempt from [tools.scrape].allowed_domains (it would otherwise break search unless the operator manually allowlists the API host). denied_domains and full SSRF validation still apply unconditionally.
  • Result URLs are never auto-fetched by this tool — opening one is a separate, explicit fetch/web_scrape call that re-applies the full domain policy.

See specs/006-tools/006-1-web-search.md for the full contract.

Re-exports§

pub use brave::BraveSearchProvider;
pub use provider::SearchBackend;
pub use provider::SearchError;
pub use provider::SearchProvider;
pub use provider::SearchResult;

Modules§

brave
Brave Search API backend (v1 default).
provider
Search backend contract and dispatch.

Structs§

WebSearchExecutor
Issues a natural-language query to an external search API and returns ranked results.