Skip to content

web-search-tool

Searches the web and returns structured results with titles, URLs, snippets, and metadata. Uses the Brave Search API.

The agent calls web_search with a query string. The extension sends the query to Brave Search, parses the JSON response, and returns structured results with clickable OSC 8 hyperlinks.

Results include:

  • Title — page title as a clickable link
  • URL — full page URL
  • Snippet — text excerpt with context
  • Domain — source website
  • Date — publish/index date (when available)

Sign up at api.search.brave.com/register and create an API key. The free tier includes 2,000 queries per month with 1 query per second rate limit.

Add BRAVE_API_KEY to your environment:

Option A: tallow .env (recommended)

~/.tallow/.env
BRAVE_API_KEY=your-key-here

Option B: Shell profile

Terminal window
# ~/.zshrc or ~/.bashrc
export BRAVE_API_KEY="your-key-here"

Option C: direnv (per-project)

Terminal window
# .envrc in your project root
export BRAVE_API_KEY="your-key-here"

Run tallow and ask it to search for something:

search for the latest bun release notes
ParameterTypeDefaultDescription
querystringSearch query
maxResultsnumber5Max results to return (max: 20)
freshnessstringRestrict to recent: “day”, “week”, “month”, “year”
  • Need current information beyond training data
  • Looking up error messages or stack traces
  • Finding documentation URLs for unfamiliar libraries
  • Checking latest versions or release notes
  • Researching recent technologies
  • You already have the URL — use web_fetch instead
  • The information is in the codebase — use grep or find
  • Looking up well-known, stable APIs from training data

The extension uses a provider interface. To add a new search backend (Tavily, SerpAPI, etc.), implement the SearchProvider interface in providers/ and add it to the provider list in index.ts. The first available provider (with a configured API key) is used automatically.