Files
pi-web-search/README.md

1.8 KiB

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 apiKey when baseUrl is set.
  • Firecrawl does not support generic highlights; use Firecrawl formats such as markdown, summary, and images instead.

Run web-search-config inside Pi to add or edit Tavily, Exa, and Firecrawl providers interactively.

Development

npm install
npm test