@sdillen/pi-brave-search
pi extension: web search via the Brave LLM Context API
Package details
Install @sdillen/pi-brave-search from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@sdillen/pi-brave-search- Package
@sdillen/pi-brave-search- Version
0.1.3- Published
- Oct 16, 2026
- Downloads
- 438/mo · 438/wk
- Author
- sdillen
- License
- MIT
- Types
- extension
- Size
- 24.6 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./dist/brave-search.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
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.