@sdillen/pi-brave-search0.1.3
pi extension: web search via the Brave LLM Context API
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@sdillen/pi-brave-search
A pi extension that adds a web search tool backed by the Brave "LLM Context" API. Results are pre-extracted, LLM-optimized snippets (text, tables, code) with source and date, so no scraping is needed.
Install
pi install npm:@sdillen/pi-brave-search
Try it for a single run:
pi -e npm:@sdillen/pi-brave-search
API key
Lookup order:
- macOS Keychain (service
pi-brave-search) BRAVE_API_KEYenvironment variable~/.config/brave/api-key
Get a key at https://api-dashboard.search.brave.com. The key never leaves your machine and is never written to the LLM context.
Slash commands:
/brave-key status|set|delete:setreads the clipboard./brave-test: checks the key and the endpoint.
If the key is missing on a call, pi asks whether to store the clipboard contents in the Keychain.
Robustness
Rate limiting (429) and 5xx responses are retried with backoff, up to 3 times. The timeout is 30 s. If a result exceeds the token budget, it is truncated and the full output is written to a temp file, whose path is included in the result.
Full architecture notes and the development setup are in the repository README.