@ssk_dev/pi-web-access-lean

Lean Pi web access extension with full features: 152 initial tokens (94.9% fewer than current upstream).

Packages

Package details

extension

Install @ssk_dev/pi-web-access-lean from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@ssk_dev/pi-web-access-lean
Package
@ssk_dev/pi-web-access-lean
Version
0.35.1
Published
Oct 2, 2026
Downloads
1,283/mo · 240/wk
Author
ssk_dev
License
MIT
Types
extension
Size
18.6 KB
Dependencies
1 dependency · 4 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

@ssk_dev/pi-web-access-lean

Token benchmark: Lean 153, upstream pi-web-access@0.35.0 2,979 — 94.9% fewer.

See my full setup for Pi

简体中文

A lightweight Pi wrapper for pi-web-access. It preserves the full upstream web search and browsing engine while compressing four separate tools into a single, compact tool schema.

Core Features

  • Full upstream capabilities: Web search, result pagination, source verification, and page fetching all work as intended.
  • Unified tool interface: Consolidates web_search, source_check, fetch_content, and get_search_content under one web_access tool.
  • Direct local PDF extraction: Supports fetching local PDF documents directly (op: "fetch" with paths such as R:/doc.pdf, Windows paths, and file:///...), which is blocked in upstream by SSRF guards. Extracted Markdown is saved locally with page and character counts.
  • Minimal prompt overhead: Everyday operations use concise string inputs. Detailed schemas and advanced parameters stay out of the prompt until queried via help.

Installation

pi install npm:@ssk_dev/pi-web-access-lean

Do not load this alongside another pi-web-access wrapper to avoid duplicate tool registrations.

Usage

The model interacts with a single tool:

web_access
op Purpose input
search Search the web Query string
check Check a claim or source Claim string
fetch Fetch a URL or local PDF URL or local PDF path
get Continue a stored result Response ID
help Show full parameters Operation name

Simple example:

{ "op": "search", "input": "Pi coding agent extensions" }

For batch or advanced parameters, pass a JSON object encoded as the input string. Use help only when you need the complete upstream schema.

Context Footprint Benchmark

With only this extension enabled, its recurring model-facing initialization contribution is:

Variant Tool and prompt contribution Total
Lean @ssk_dev/pi-web-access-lean@0.35.1 web_access (153) 153
Upstream pi-web-access@0.35.0 web_search (1,188) + source_check (618) + fetch_content (731) + get_search_content (442) 2,979

This saves 2,826 tokens (94.9%). Measured with Pi 1.0.0 in separate temporary processes with empty working directories and configuration. Built-in tools, skills, context files, session history, user messages, unrelated extensions, runtime UI, and slash commands are excluded; before_agent_start additions are included. Tokens are a fixed character-proxy estimate using ceil(characters / 4), not provider tokenizer billing.

Versions

Upstream runtime is pinned to pi-web-access@0.35.0.

Development

npm ci
npm run check

License

MIT. This project wraps the MIT-licensed pi-web-access.