feat: add Firecrawl provider support

This commit is contained in:
pi
2026-04-12 02:53:10 +01:00
parent 01d4411903
commit 98a966cade
20 changed files with 1570 additions and 366 deletions

View File

@@ -1,6 +1,6 @@
# 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 and Tavily.
`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
@@ -24,6 +24,71 @@ pi install https://gitea.rwiesner.com/pi/pi-web-search
Provider configuration is managed by the extension's own commands and config files.
Example `~/.pi/agent/web-search.json`:
```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:
```json
{
"defaultProvider": "firecrawl-selfhosted",
"providers": [
{
"name": "firecrawl-selfhosted",
"type": "firecrawl",
"baseUrl": "https://firecrawl.internal.example/v2"
}
]
}
```
Tool examples:
```json
{
"query": "pi docs",
"provider": "firecrawl-main",
"firecrawl": {
"country": "DE",
"categories": ["github"],
"scrapeOptions": {
"formats": ["markdown"]
}
}
}
```
```json
{
"urls": ["https://pi.dev"],
"provider": "firecrawl-main",
"summary": true,
"firecrawl": {
"formats": ["markdown", "summary", "images"]
}
}
```
Run `web-search-config` inside Pi to add or edit Tavily, Exa, and Firecrawl providers interactively.
## Development
```bash