Behaviour for web-search backends.
The web_search tool calls search/2; the concrete implementation is chosen
via application config so the dependency on any particular search provider is
wrapped behind a contract we own (and can mock with Mox in tests):
config :ex_athena, :search, adapter: ExAthena.Search.Http, backend: :duckduckgoMirrors the provider-resolution pattern in ExAthena.Config (a default module
plus per-env override). The default adapter is ExAthena.Search.Http, which is
itself pluggable across backends (DuckDuckGo / Tavily / Brave / SearXNG).
Summary
Functions
The configured search backend module (defaults to ExAthena.Search.Http).
Run a web search through the configured backend.
Types
@type opts() :: [ max_results: pos_integer(), topic: String.t(), recency: String.t(), timeout_ms: pos_integer() ]
Callbacks
@callback search(query :: String.t(), opts()) :: {:ok, [ExAthena.Search.Result.t()]} | {:error, term()}
Functions
@spec impl() :: module()
The configured search backend module (defaults to ExAthena.Search.Http).
@spec search(String.t(), opts()) :: {:ok, [ExAthena.Search.Result.t()]} | {:error, term()}
Run a web search through the configured backend.