@gfgghgftgffg/pi-web-access-lean
A lighter wrapper for pi-web-access: one web_access tool, about 87% less tool text on the first call.
Package details
Install @gfgghgftgffg/pi-web-access-lean from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@gfgghgftgffg/pi-web-access-lean- Package
@gfgghgftgffg/pi-web-access-lean- Version
0.1.17- Published
- Nov 10, 2026
- Downloads
- 2,474/mo · 365/wk
- Author
- gfgghgftgffg
- License
- MIT
- Types
- extension
- Size
- 61.5 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
@gfgghgftgffg/pi-web-access-lean
Advantage
A lighter wrapper for pi-web-access. Search, checks, fetches and stored results share one web_access tool, cutting the tool text sent on the first call by about 87%.
Features
- One tool covers
search,check,fetch,getandhelp. The upstream engine still runs, and this package does not register those upstream tools a second time. - Local PDF paths and
file:///return the saved Markdown and its path. Metadata includes the Markdown character count and, when the engine provides it, the page count. This path extracts Markdown only, not the upstream structured extract mode. - Uncommon parameters stay in
help, including the allowed search providers. Pass them as a JSON object string ininput.
Source
The facade comes from kunkun9527/pi-web-access-lean. The engine is Nico Bailon's pi-web-access. This package follows upstream releases and does not copy the engine. Both are MIT; the original LICENSE is kept. It lives in amox-pi-extensions-lean.
Usage
Call web_access with op and input.
Search:
{ "op": "search", "input": "Pi coding agent extensions" }
Check a claim:
{ "op": "check", "input": "The paper was published in 2024" }
Fetch a page or a local PDF:
{ "op": "fetch", "input": "https://example.com/page" }
Continue a saved result. input is the response id from an earlier call:
{ "op": "get", "input": "response-id" }
See every parameter for one operation:
{ "op": "help", "input": "fetch" }
Extra fields go inside the input string as JSON:
{ "op": "fetch", "input": "{\"url\":\"https://example.com/page\",\"redirects\":\"same-origin\"}" }
If a result names an upstream tool, call the matching web_access operation instead. Page text is left as returned.
Installation
This is a public npm package. Install without a version pin:
pi install npm:@gfgghgftgffg/pi-web-access-lean
pi update --extensions
For a Git fallback, run from the repository checkout:
node scripts/install-extension.mjs pi-web-access-lean
Update a local Git installation by pulling the checkout and rerunning its installer; pi update does not update local contents. Keep one installation source. To migrate, back up settings, remove only the exact old source shown by pi list, then install the npm source.
Do not load this package alongside another pi-web-access wrapper, to avoid duplicate tool
registrations.
Configuration and limits
Providers, credentials, search routing and fetch options use upstream's web-search.json, normally
under ~/.pi/agent/. See the upstream documentation
for configuration paths, environment variables, supported services and billing rules. External services
may receive queries and page content and incur charges; review their configuration before use. Proxy
policy, including optional lockProxy, follows upstream; omit per-call proxy to use the configured route.
Direct local PDF access extracts Markdown only, not upstream's structured extract mode; remote PDFs
use upstream handling. web_access stays registered directly: upstream dynamic tool-loading settings
do not defer or remove this entrypoint.
Context footprint (character proxy)
| Package | Registered character proxy |
|---|---|
| @gfgghgftgffg/pi-web-access-lean | 149 |
| pi-web-access | 1110 |
Fixed ceil(characters / 4), not provider billing tokens.
Development
See the development and maintenance guide and MAINTENANCE.md for adaptation details.