@gagansd/pi-web-search0.5.0
One search tool for public web/code, URL extraction, and local evidence continuation. Cited, context-efficient, and keyless by default.
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-search
Cited web and code search for Pi Coding Agent that works without API keys, with optional result ranking. One search tool covers the web, code, library docs and URLs.
Install
pi install npm:@gagansd/pi-web-search
Run /reload. The default sources need no key. Run /web-search to add keys or change settings.
Benchmark
Compared with the most popular web access package, npm:pi-web-access:
pi-web-access |
@gagansd/pi-web-search |
||
|---|---|---|---|
| Tool definition and prompt | 1,124 tokens | 383 tokens | 66% smaller |
| Typical search result | 1,470 tokens | 1,014 tokens | 31% smaller |
| Pages read, of 102 | 91 | 97 (95 locally) | 6 more pages |
Measured on 2026-11-29 with the same searches and URLs. Neither tool ranked results, so this measures context cost and page reading, not search quality. Method and full results.
Use
The agent sends exactly one of query, urls or ref:
{ "query": "AbortSignal.timeout" }
{ "query": "useSyncExternalStore repo:vercel/next.js", "scope": "code" }
{ "urls": ["https://example.com/docs"] }
{ "ref": "<resultId>:1", "find": "timeout" }
| Field | Use |
|---|---|
query |
One query, or up to three |
scope |
web (default), code or both |
recency, domains |
Filter web results by date or site |
urls |
Read up to 20 known pages |
ref |
Read a stored result again, without a network request |
effort |
fast (default) or thorough. Thorough queries several sources at once. |
Sources
| Scope | Default order | Optional |
|---|---|---|
| Web | Exa, then Parallel | Brave (key required) |
| Code | grep.app, Sourcegraph, then GitHub (token required) | Context7 library docs |
| URLs | Local reader, with Jina Reader as fallback |
If a source returns nothing or fails, the tool tries the next one.
Ranking
Ranking is off by default and applies to thorough searches. You can select any decision model that Pi registers, for example Jev. The model ranks results. It hides results that it confidently flags as harmful or as prompt injection. It also judges whether the evidence answers the query. Pi uses your existing login, so you need no extra key. Run /web-search classifier to select a model.
Data handling
- Each source receives the queries that the tool sends to it.
- An optional decision model receives the query and the result titles, URLs and excerpts.
- The tool never sends your workspace files or session history.
- Search results are untrusted content.
Full settings, credentials and limits: configuration · efficiency · ranking.