pi-web-fetch is a pi coding agent extension that gives AI agents a proper web browser via headless Chrome, clean content extraction with trafilatura, and optional LLM processing. Version 1.1.0 brings concurrent batch fetching (up to 10 URLs with 6 parallel tabs), a 15-minute cache, smart large-page summarization, cross-host redirect detection, and an extensible hook system for site-specific handling. Unlike static fetchers like Claude Code's WebFetch, it handles JavaScript-rendered SPAs, strips boilerplate using ML-based extraction, and supports optional LLM distillation via a pi sub-agent. Requires Node.js 18+, a Python tool runner (uvx recommended), and puppeteer's bundled Chromium.
npm install pi-web-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and initializing the pi-web-fetch extension with a pi agent, including example tool calls for single and batch URL fetching.
Set PUPPETEER_EXECUTABLE_PATH to existing Chrome binary to skip Chromium download.
Ensure uv is installed and uvx alias is available, or rely on pipx fallback.
Update Node.js to version 18 or later.
Use import syntax or convert project to ESM.
Split fetches into batches of 10 or fewer URLs.
Run 'npm install pi-web-fetch' in your project directory.
Correct: 'new WebFetchExtension()'
Ensure the extension object is passed to PiAgent constructor in 'extensions' array.
Check that Chrome is installed and puppeteer can launch it. Set PUPPETEER_EXECUTABLE_PATH if needed.