@xynogen/pix-web
Provider-neutral web fetch and search tools with plain-text output for Pi
Package details
Install @xynogen/pix-web from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@xynogen/pix-web- Package
@xynogen/pix-web- Version
0.2.4- Published
- Oct 6, 2026
- Downloads
- 690/mo · 39/wk
- Author
- xynogen
- License
- MIT
- Types
- extension
- Size
- 58.1 KB
- Dependencies
- 2 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
pix-web
Provider-neutral fetch tool for Pi. It returns plain text for model input.
Built-in providers:
- Exa through
EXA_API_KEY - Tavily through
TAVILY_API_KEY - Firecrawl through
FIRECRAWL_API_KEY - Jina Reader through
JINA_API_KEY(key is optional) - Ollama through
OLLAMA_API_KEYandOLLAMA_URL - You.com through
YDC_API_KEY - 9Router through
NINEROUTER_URLandNINEROUTER_KEY curl, a basic HTTP provider
The model calls fetch with three fields only:
fetch({
url: string,
format?: "markdown" | "text" | "html",
max_characters?: number,
});
The user picks the provider, not the model. Use /web to set the default
fetch provider and the 9Router fetch model. When no API provider is configured,
automatic selection uses curl. Other packages can register providers through
@xynogen/pix-web/providers.
/web sets the fetch and search defaults in one settings view.
The settings live in ~/.pi/agent/pix.json under fetch. This example shows the section value:
{
"provider": "9router",
"nineRouterModel": "exa"
}
Set the 9Router URL and API key in the shell environment:
export NINEROUTER_URL="https://9router.example.com/v1"
export NINEROUTER_KEY="your-api-key"
Replace the example URL and key with the values for your 9Router server.
import { registerFetchProvider } from "@xynogen/pix-web/providers";
registerFetchProvider({
id: "example",
isConfigured: () => Boolean(process.env.EXAMPLE_API_KEY),
fetch: async ({ url }) => ({
url,
content: "Example page text",
}),
});
The public adapter contract uses normalized responses:
interface FetchProvider {
id: string;
isConfigured?: () => boolean;
fetch: (request: FetchRequest) => Promise<FetchResponse>;
}
Web search
The same package registers a provider-neutral search tool. It returns web or
news results as plain text.
Built-in search providers:
- SearXNG through
SEARXNG_URL(no API key) - Exa through
EXA_API_KEY - Tavily through
TAVILY_API_KEY - Perplexity through
PERPLEXITY_API_KEY - Serper through
SERPER_API_KEY - Brave Search through
BRAVE_API_KEY - You.com through
YDC_API_KEY - Google PSE through
GOOGLE_PSE_API_KEYandGOOGLE_PSE_CX - SearchAPI through
SEARCHAPI_API_KEY - Linkup through
LINKUP_API_KEY - Xquik (X posts) through
XQUIK_API_KEY - Ollama Search through
OLLAMA_API_KEY - GLM (z.ai Coding plan) through
ZAI_API_KEY - 9Router through
NINEROUTER_URLandNINEROUTER_KEY
The model calls search with three fields only:
search({
query: string,
search_type?: "web" | "news",
max_results?: number,
});
The user picks the provider, not the model. Use /web to set the default
search provider and the 9Router search model. The 9Router provider handles its
own fallback. When no API provider is configured, automatic selection uses
SearXNG.
Search settings live in ~/.pi/agent/pix.json under search. This example shows the section value:
{
"provider": "exa",
"nineRouterModel": "exa"
}
Other packages can register search providers through
@xynogen/pix-web/search-providers.
Install
pi install npm:@xynogen/pix-web
Standalone and opt-in.
@xynogen/pix-coredoes not bundle it. Most providers need an API key.
Full distro
This package is part of Pix. The installer sets up Pi and the full distro. See Install for the notes for each OS.
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.ps1 | iex
License
MIT. See LICENSE.