← Catalog

@ssk_dev/pi-web-access-lean

Lean Pi version of pi-web-access: full web search, source checks and page fetching through one compact tool, plus local PDF reading.

Extension

Install

Install with PiG

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

Install with Pi

pi install npm:@ssk_dev/pi-web-access-lean
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.48.0 (README.md). PiG does not review it.

pi-web-access-lean

Search, check and fetch the web from Pi, through one small tool.

简体中文 · Full setup: My Lean Pi Setup

Always-on context: 1,165 tokens upstream, 153 Lean, 86.9% less

A lean version of pi-web-access. It runs the upstream 0.48.0 engine as-is and folds its four tools into one web_access tool with a short schema.

Install

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

Requires Pi >=0.84.1 and Node.js >=22.19.0. Don't install it alongside upstream or another pi-web-access wrapper, or the tools get registered twice.

Compared with upstream

Kept: web search, result pagination, source checking and page fetching, all from upstream's engine.

Trimmed:

  • web_search, source_check, fetch_content and get_search_content become one web_access tool.
  • Everyday calls take a plain string input; full schemas and advanced parameters stay out of the prompt until the model asks with help.

Added:

  • Local PDFs: op: "fetch" reads local PDF files (R:/doc.pdf, Windows paths, file:///... and relative paths), which upstream's SSRF guard blocks. The extracted Markdown is saved locally with page and character counts.
  • Forgiving arguments: a missing op is inferred from unambiguous fields (responseId, url/urls, claim, query/queries, or a bare URL/PDF path versus plain text). An object input is serialized, and upstream fields placed at the top level are merged into input; a field that disagrees with input is rejected, never silently dropped.

Usage

The model sees one tool, web_access:

opPurposeinput
searchSearch the webQuery
checkCheck a claim or sourceClaim
fetchFetch a URL or local PDFURL or PDF path
getContinue a stored resultResponse ID
helpShow full parametersOperation name
{ "op": "search", "input": "Pi coding agent extensions" }

For batches or advanced parameters, pass a JSON object encoded as the input string.

Token comparison

With only this extension enabled, what the model reads on every turn:

VariantBreakdownTotal
Lean @ssk_dev/pi-web-access-lean@0.48.0web_access (153)153
Upstream pi-web-access@0.48.0web_search (338) + source_check (225) + fetch_content (372) + get_search_content (230)1,165

Method: Pi 1.4.0, each variant measured in its own temporary process with an empty working directory and configuration. Built-in tools, skills, context files, session history, user messages, other extensions, runtime UI and slash commands are not counted; before_agent_start additions are. Tokens are estimated as ceil(characters / 4), not billed tokens.

Development

npm ci
npm run check

License

MIT. The runtime comes from pi-web-access (MIT).