@lwlee2608/pi-web0.1.0
Web search and page reads for Pi with no API key and no dependencies.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
Pi Web
Web search and page reads for Pi. It works right after install: no API key, no configuration, and no runtime dependencies.
Install
pi install npm:@lwlee2608/pi-web
Run /reload after installation. Requires Node.js 22.19 or newer and Pi 1.0.0.
Tools
| Tool | What it does |
|---|---|
web_search |
Searches the web and returns the title, URL, and key passages of up to 10 results (5 by default). Each result is cut to about 1,500 characters to keep context small. |
web_fetch |
Reads one page as text, 20,000 characters at a time. When a page is longer, the result tells the agent which offset to ask for next. |
How it works
web_search ──► Exa (mcp.exa.ai)
web_fetch ──► private URL? ──yes──► direct fetch, raw text
│ no
▼
Exa: clean markdown ──fails──► direct fetch, raw text
Both tools use Exa's free hosted endpoint. Search queries and public URLs go to Exa.
These URLs never go to Exa. Pi Web fetches them directly:
localhostand single-label hosts such ashttp://intranet/.local,.internal,.lan, and.home.arpanames- loopback, private, link-local, and CGNAT addresses, including hostnames that resolve to them
A direct fetch returns the raw response body (HTML, JSON, or text), up to 5 MB. Binary files such as PDFs and images are rejected.
URLs that contain a user name or password are rejected before any request.
Limits
The free Exa endpoint has a rate limit that Exa does not publish. When the limit is reached, set EXA_API_KEY to your Exa key:
export EXA_API_KEY=...
Signed-in pages read through Exa fail, because Exa cannot see your session.
When Exa cannot read a public page, Pi Web fetches it directly and follows up to 5 redirects. It refuses a redirect to a private address. It checks each address with its own DNS lookup, so it does not stop DNS rebinding.
Do not load this package together with another extension that registers web_search or web_fetch, such as pi-web-search or pi-web-access.
License
MIT