nexo_web_search/lib.rs
1//! Multi-provider web search.
2//!
3//! Native built-in tool that an agent can call as `web_search(query, ...)`.
4//! The runtime selects a provider (Brave / Tavily / DuckDuckGo / Perplexity),
5//! consults a shared SQLite cache, runs the call through a circuit
6//! breaker, sanitises the output, and (optionally) expands top hits via
7//! the [`LinkExtractor`].
8//!
9//! Boundary:
10//! - This crate owns the trait, the router, the cache, the providers,
11//! and the result types.
12//! - It does **not** know about [`nexo_core::AgentContext`], the LLM
13//! tool registry, or YAML loading. Wiring lives in `nexo-core` and
14//! `src/main.rs`.
15
16pub mod cache;
17pub mod provider;
18pub mod providers;
19pub mod router;
20pub mod sanitise;
21pub mod telemetry;
22pub mod types;
23
24pub use cache::{CacheStats, WebSearchCache};
25pub use provider::WebSearchProvider;
26pub use router::{ProviderState, WebSearchRouter};
27pub use types::{Freshness, WebSearchArgs, WebSearchError, WebSearchHit, WebSearchResult};