pi-agent-web-access

Web search (Exa + Brave) and content extraction for Pi

Packages

Package details

extension

Install pi-agent-web-access from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-agent-web-access
Package
pi-agent-web-access
Version
1.1.2
Published
May 12, 2026
Downloads
not available
Author
santychuy
License
MIT
Types
extension
Size
262.8 KB
Dependencies
5 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Web Access Extension

Adds two Pi tools:

  • web_search — searches the web with Exa or Brave and returns cited sources.
  • fetch_content — fetches a URL and extracts readable markdown content.

Providers

Exa

  • Uses EXA_API_KEY or extensions/web-access/web-search.json when available.
  • Falls back to Exa MCP zero-config when no key is configured.
  • Direct API usage is locally budgeted at 1,000 requests/month in ~/.pi/exa-usage.json.

Brave

  • Uses BRAVE_API_KEY or extensions/web-access/web-search.json.
  • Used directly when provider: "brave", or as fallback when Exa fails and a Brave key is available.

Config

Copy .web-search.json.example to web-search.json in this extension directory:

{
  "exaApiKey": "exa-...",
  "braveApiKey": "BSA...",
  "provider": "auto"
}

Environment variables take precedence:

  • EXA_API_KEY
  • BRAVE_API_KEY

Tool routing

Use web_search when the user needs web/current/external information but did not provide a direct URL. Examples: topics, domains, docs lookup, comparisons, recent info, broad research.

Use fetch_content when the user provides a direct http:// or https:// URL and asks to fetch, read, inspect, summarize, or analyze that page.

Tool examples

{
  "queries": ["Pi coding agent extensions", "Pi coding agent tools API"],
  "numResults": 5,
  "provider": "auto"
}
{
  "url": "https://example.com/article"
}