← Catalog

@ferologics/pi-web

Web search (Exa, Brave, Claude, Codex, Google) and page fetching tools for Pi

Package

Install

Install with PiG

pig install npm:@ferologics/pi-web

Install with Pi

pi install npm:@ferologics/pi-web
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.1 (README.md). PiG does not review it.

pi-web

Web search and page reading for Pi. A single web_search tool covers five providers, and web_fetch reads one page. There is no MCP server, curator UI, cookie access, or provider fallback chain. The model picks the provider, and errors come back as they are.

Tools

ToolBehavior
web_searchSearch with exa (default), brave, claude, codex, or google. Optional numResults, freshness, domains
web_fetchRead a URL as markdown. It fetches the page directly, then falls back to Exa's page cache when EXA_API_KEY is set

Output over Pi's tool limits (2000 lines or 50KB) is truncated, and the full text is saved to a temp file whose path appears in the result.

Providers

ProviderReturnsCredentials
exaRanked pages with query-relevant excerptsEXA_API_KEY
braveRanked pages with snippetsBRAVE_API_KEY
claudeCited summary from Claude's web search toolPi anthropic login (subscription or API key)
codexCited summary from Codex's web search toolPi openai-codex login
googleCited summary from Gemini's Google groundingnpm:pi-antigravity and its antigravity login
  • exa searches with type: "auto" and Dynamic Highlights. When it fails, the error tells the model to retry with brave.
  • brave uses the plain web search endpoint and adds site: operators for domains.
  • claude runs claude-haiku-5-5 with up to 5 searches. Subscription tokens get the same billing identity that pi-cc-patch gives Pi's own Anthropic requests.
  • codex runs gpt-6-luna at low reasoning effort with Codex's web_search tool.
  • google calls pi-antigravity's own search function, then resolves Google's opaque grounding redirect links to the real URLs. Set ANTIGRAVITY_NO_SEARCH_TOOL=1 so pi-antigravity does not also register its google_search tool.

Answers from claude, codex, and google are labeled as another model's summary. Their token usage is reported on the tool result, so session totals include it.

Pi Durable

@ferologics/pi-web/durable exposes the same two tools for Pi Durable harnesses, which run outside Pi and cannot load Pi extensions:

import { createWebTools } from "@ferologics/pi-web/durable";

registry.install(
    createWebTools({
        secret: async (name) => process.env[name], // EXA_API_KEY, BRAVE_API_KEY
        credential: async (provider) => (await models.getAuth(provider))?.auth.apiKey, // "anthropic", "openai-codex"
    }),
);

It installs a durable extension named pi-web with web_search (exa, brave, claude, codex; google needs pi-antigravity inside Pi's process) and web_fetch. Both are replay-safe, so a harness restarted mid-call runs them again. The host decides where keys come from. pi-web only imports types from @earendil-works/pi-durable (an optional peer dependency), so the Pi extension does not need it.

Install

From npm (standalone package):

pi install npm:@ferologics/pi-web

From git:

pi install git:github.com/ferologics/pi-web

Or use the bundled package:

pi install npm:@ferologics/pi-extensions
# or
pi install npm:pi-shit

Setup

Expose the API keys to Pi:

EXA_API_KEY=...
BRAVE_API_KEY=...

In the dotfiles setup, store each key in 1Password, add only its op://... reference to ~/.pi/agent/env.op, run pi-secrets-refresh, and restart Pi.

The claude, codex, and google providers reuse Pi's logins (/login anthropic, /login openai-codex, /login antigravity).

Maintenance

These constants follow upstream releases and need updating when a provider rejects them:

  • CLAUDE_SEARCH_MODEL and CLAUDE_CODE_VERSION in claude.ts. Keep the version in step with pi-cc-patch.
  • CODEX_SEARCH_MODEL in codex.ts.
  • DYNAMIC_HIGHLIGHTS_BETA in exa.ts, until Exa drops the beta header.
  • The pi-antigravity module path in index.ts (src/search/index.ts inside the installed package).

Privacy

  • Search queries go to the selected provider.
  • web_fetch requests the page from this machine. When that fails, the URL is sent to Exa.
  • Returned page text becomes part of the Pi conversation and is sent to the active model provider.