brave
A web_search backend that searches with Brave (search.brave.com).
Pass it as agent({web: {search: brave(secret("BRAVE_API_KEY"))}}). It returns at most 10 hits per search.
Import from @threads/core (TypeScript) or threads.search (Python).
function brave(apiKey: Secret, transport?: WebTransport): SearchBackendParameters
apiKey / api_keySecretrequiredA secret() naming the host environment variable that holds the Brave API key. It is resolved on the host at setup (check() or the first run): an unset variable is missing_secret naming it, before anything runs. A search sent without setup reads it then, and an unset variable fails that search as unavailable. See Secret.
transportWebTransportTypeScript only. Seam: where the request is sent, for tests. Omitted: the host's live web transport, which vets each address before it connects.
Returns
Throws ConfigError with one of these codes: missing_secret.