Skip to main content

Brave Search

Brave Search is optional. It registers the web-search tool, which searches the web through the Brave Search API and returns web results with titles, URLs, snippets, page age, and optional extra snippets.

Tools

ToolPurpose
web-searchSearch the web and return current results with titles, URLs, snippets, and page age.

web-search Inputs

InputRequiredDescription
queryyesSearch query.
countnoResult count from 1 to 20.
offsetnoResult page offset from 0 to 9.
freshnessnoFreshness filter. Use pd, pw, pm, py, or a custom range like 2026-01-01to2026-01-31.
countrynoTwo-character country code.
search_langnoSearch result language code.
ui_langnoResponse UI language, such as en-US.
safesearchnoSafeSearch mode: off, moderate, or strict.
extra_snippetsnoRequest extra snippets for each result.

Required Properties

VariableDescription
LIGHTFLARE_TOOLS_BRAVE_SEARCH_ENABLEDSet to true.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_ENABLED_TOOLSComma-separated tool allowlist. Use web-search.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_API_KEYBrave Search API key.

Optional Properties

VariableDefaultDescription
LIGHTFLARE_TOOLS_BRAVE_SEARCH_ENABLED_TOOLS[]Exposed Brave Search tools. Empty exposes no Brave Search tools.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_BASE_URLhttps://api.search.brave.comBrave Search API base URL.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_COUNTRYUSDefault search result country.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_SEARCH_LANGenDefault search result language.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_UI_LANGen-USDefault response UI language.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_SAFESEARCHmoderateDefault SafeSearch mode. Supported values are off, moderate, and strict.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_DEFAULT_COUNT5Default web result count. The service caps this at Brave's maximum of 20.
LIGHTFLARE_TOOLS_BRAVE_SEARCH_EXTRA_SNIPPETSfalseRequest extra snippets from Brave Search by default.

Example

LIGHTFLARE_TOOLS_BRAVE_SEARCH_ENABLED=true \
LIGHTFLARE_TOOLS_BRAVE_SEARCH_ENABLED_TOOLS=web-search \
LIGHTFLARE_TOOLS_BRAVE_SEARCH_API_KEY='replace-this-key' \
docker compose up --build