34c281c2a8894bd807d6db25f9bf056b70be4141
pi-web-search
pi-web-search is a Pi extension package that adds web_search and web_fetch tools backed by pluggable providers such as Exa, Tavily, and Firecrawl.
Install
Local path:
pi install /absolute/path/to/web-search
Git:
pi install https://gitea.rwiesner.com/pi/pi-web-search
Resources
- Extension:
./index.ts
Configuration
Provider configuration is managed by the extension's own commands and config files.
Example ~/.pi/agent/web-search.json:
{
"defaultProvider": "firecrawl-main",
"providers": [
{
"name": "firecrawl-main",
"type": "firecrawl",
"apiKey": "fc-...",
"fallbackProviders": ["exa-fallback"]
},
{
"name": "exa-fallback",
"type": "exa",
"apiKey": "exa_..."
}
]
}
Self-hosted Firecrawl:
{
"defaultProvider": "firecrawl-selfhosted",
"providers": [
{
"name": "firecrawl-selfhosted",
"type": "firecrawl",
"baseUrl": "https://firecrawl.internal.example/v2"
}
]
}
Tool examples:
{
"query": "pi docs",
"provider": "firecrawl-main",
"firecrawl": {
"country": "DE",
"categories": ["github"],
"scrapeOptions": {
"formats": ["markdown"]
}
}
}
{
"urls": ["https://pi.dev"],
"provider": "firecrawl-main",
"summary": true,
"firecrawl": {
"formats": ["markdown", "summary", "images"]
}
}
Notes:
- Firecrawl self-hosted providers may omit
apiKeywhenbaseUrlis set. - Firecrawl does not support generic
highlights; use Firecrawlformatssuch asmarkdown,summary, andimagesinstead.
Run web-search-config inside Pi to add or edit Tavily, Exa, and Firecrawl providers interactively.
Development
npm install
npm test
Description
Languages
TypeScript
100%