@0xkobold/pi-web

extension

Web search and content extraction for pi agents — DuckDuckGo/SearX search, cascade fetching (fast → readability → Playwright), deep research

by · v0.2.0 · published 4mo ago

$ pi install npm:@0xkobold/pi-web
downloads/mo
106
stars
last push
open issues

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

287 downloads · last 12 weeks (weekly)

README

pi-web

Web search and content extraction for pi-coding-agent — cascade fetching, multi-engine search, deep research.

Installation

pi install npm:@0xkobold/pi-web

Or as part of the meta-extension:

pi install npm:@0xkobold/pi-kobold

Features

  • Cascade Fetching — Fast HTML → Readability → Playwright for JS sites
  • Multi-Engine Search — DuckDuckGo (default) + SearXNG (fallback)
  • Deep Research — Search + fetch + synthesize from multiple sources
  • Playwright Pool — Browser reuse with concurrency limits and retries
  • Optional Dependency — Playwright is optional; fast fetch works without it

Tools

ToolDescription
web_fetchFetch and extract content from a URL
web_searchSearch web, optionally fetch content from results
web_researchDeep research: search + fetch + multi-source synthesis

Commands

CommandDescription
/deep-fetch <url>Fetch JS-rendered content using Playwright
/web-search-deep <query>Search + fetch from top results

Parameters

web_fetch

ParameterTypeDefaultDescription
urlstringrequiredFull URL to fetch
max_lengthnumber5000Maximum characters to retrieve
use_playwrightbooleanfalseForce Playwright for JS content
timeout_msnumber15000Timeout in ms (max: 60000)

web_search

ParameterTypeDefaultDescription
querystringrequiredSearch query
limitnumber5Number of results (1-10)
fetch_contentbooleanfalseFetch full content from top results
fetch_sourcesnumber3How many sources to fetch

web_research

ParameterTypeDefaultDescription
questionstringrequiredResearch question
sourcesnumber5Number of sources to analyze (1-10)

Architecture

┌────────────────────────────────────────┐
│              pi-web                     │
├─────────────┬──────────────────────────┤
│  Search     │  Content Extraction      │
│  ─────────  │  ──────────────────────  │
│  DuckDuckGo │  1. Fast fetch (HTML)    │
│  SearXNG    │  2. Readability (regex)  │
│             │  3. Playwright (JS)       │
├─────────────┴──────────────────────────┤
│        Playwright Browser Pool          │
│        (concurrency: 2, pool TTL: 2m)  │
└────────────────────────────────────────┘

Development

cd packages/pi-web
bun install
bun run build

Optional: Playwright

For JavaScript-rendered content, install Playwright:

npm install playwright
npx playwright install chromium

Without Playwright, web_fetch still works using fast HTML fetch and readability extraction.