@parallel-web/pi-extension
Add web search and web fetch to your pi agent
Package details
Install @parallel-web/pi-extension from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@parallel-web/pi-extension- Package
@parallel-web/pi-extension- Version
1.0.1- Published
- May 8, 2026
- Downloads
- 589/mo · 390/wk
- Author
- parallel-developers
- License
- MIT
- Types
- extension
- Size
- 52.1 KB
- Dependencies
- 2 dependencies · 1 peer
Pi manifest JSON
{
"image": "https://assets.parallel.ai/white-parallel-avatar-540.png",
"extensions": [
"./dist/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@parallel-web/pi-extension
Pi extension that adds web_search and web_fetch backed by Parallel.
Install it with:
pi install npm:@parallel-web/pi-extension
What It Does
- Registers
web_search - Registers
web_fetch - Adds a
parallel-logincommand for browser auth - Stores the resulting Parallel API key in Pi's auth store
Auth resolution order:
- Stored Pi auth for provider key
parallel PARALLEL_API_KEY
Dogfooding Locally
Build the extension first:
pnpm --filter @parallel-web/pi-extension build
Option 1: Load It Directly With pi -e
This is the fastest way to test a local checkout.
From the repo root:
pi --no-extensions --no-skills -e ./packages/pi-extension/dist/index.js
If the extension loads successfully, Pi will have:
- the
web_searchtool - the
web_fetchtool - the
parallel-logincommand - per-session Parallel
session_idreuse inside that Pi session
Option 2: Symlink It Into Pi Extensions
This is better if you want Pi to auto-discover it and support /reload.
First build it:
pnpm --filter @parallel-web/pi-extension build
Then symlink the package directory into Pi's global extensions folder:
mkdir -p ~/.pi/agent/extensions
ln -s \
parallel-npm-packages/packages/pi-extension \
~/.pi/agent/extensions/parallel-pi-extension
Then start Pi normally:
pi
After code changes, rebuild and run /reload inside Pi:
pnpm --filter @parallel-web/pi-extension build
Local Auth Testing
Use Stored Pi Auth
Inside Pi, run:
/parallel-login
That opens the browser for Parallel OAuth. On success, the API key is stored in Pi auth under parallel.
Use Environment Variable Instead
export PARALLEL_API_KEY=your_key_here
pi --no-extensions --no-skills -e ./packages/pi-extension/dist/index.js
Note: stored Pi auth is preferred over PARALLEL_API_KEY if both exist.
Override The OAuth Platform URL
For local or staging OAuth testing, set PARALLEL_PLATFORM_URL before starting Pi:
export PARALLEL_PLATFORM_URL=https://your-platform-host
pi --no-extensions --no-skills -e ./packages/pi-extension/dist/index.js
This changes the browser login endpoints used by parallel-login and on-demand auth.
Quick Smoke Test
Once Pi is running with the extension loaded, ask something that should force web usage, for example:
Search the web for the latest Parallel docs on OAuth and summarize them.
Or ask Pi to call the tool explicitly.
web_search requires search_queries.
web_fetch accepts multiple URLs in a single call, so the agent can batch extraction work instead of parallelizing many single-URL requests.
Dev Loop
pnpm --filter @parallel-web/pi-extension build
pnpm --filter @parallel-web/pi-extension test
pnpm --filter @parallel-web/pi-extension typecheck
Notes
- The extension uses the
parallel-webTypeScript SDK directly. - Search requests use Parallel SDK
basicmode. - Search requests include
client_modelwhen Pi has an active model selected. - Search and extract requests reuse a generated
session_idfor the life of the current Pi session. - The login flow tries to open your browser automatically.
- If automatic callback capture does not complete, the extension falls back to asking you to paste the callback URL.
- Skill suppression inside the extension is prompt-level only. If you want a clean dogfooding session without your usual skills list, start Pi with
--no-skills.