@gagansd/pi-web-search
One search tool for public web/code, URL extraction, and local evidence continuation. Cited, context-efficient, and keyless by default.
Package details
Install @gagansd/pi-web-search from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@gagansd/pi-web-search- Package
@gagansd/pi-web-search- Version
0.5.0- Published
- Nov 29, 2026
- Downloads
- 3,947/mo · 700/wk
- Author
- tiredhades
- License
- MIT
- Types
- extension
- Size
- 460.4 KB
- Dependencies
- 5 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
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 |
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.