@feniix/pi-exa
v3.4.2
Published
Exa API extension for pi — web search, content fetching, and advanced search via Exa AI
Downloads
2,666
Maintainers
Readme
@feniix/pi-exa
Exa AI extension for pi with search, fetch, research, and answer capabilities.
Features
- web_search_exa: default web search (highlights + short text snippets).
- web_fetch_exa: fetch page content by URL.
- web_search_advanced_exa: advanced search options and category filters (disabled by default).
- web_research_exa: deep-research synthesis (disabled by default).
- web_answer_exa: quick grounded answers.
- web_find_similar_exa: discover related URLs.
Install
pi install npm:@feniix/pi-exaFor ephemeral use:
pi -e npm:@feniix/pi-exaConfiguration
You need an Exa API key from dashboard.exa.ai/api-keys.
Recommended: environment variable
export EXA_API_KEY="your-key"Recommended for private overrides: explicit config file
Use a private config file when you want to store an API key outside shared project settings:
{
"apiKey": "your-key",
"enabledTools": ["web_search_exa", "web_fetch_exa", "web_answer_exa", "web_find_similar_exa"],
"advancedEnabled": false,
"researchEnabled": false
}Then run pi with:
pi -e npm:@feniix/pi-exa -- --exa-config-file ~/.config/pi/exa.jsonShared non-secret settings
Supports standard pi settings locations:
- project:
.pi/settings.json - global:
~/.pi/agent/settings.json
Example:
{
"pi-exa": {
"enabledTools": ["web_search_exa", "web_fetch_exa", "web_answer_exa", "web_find_similar_exa"],
"advancedEnabled": false,
"researchEnabled": false
}
}apiKey is accepted in settings files for compatibility, but pi-exa will warn when it is loaded there. Prefer EXA_API_KEY or --exa-config-file for secrets.
CLI flags
--exa-api-key <key>: API key override.--exa-enable-advanced: enableweb_search_advanced_exa.--exa-enable-research: enableweb_research_exa.--exa-config-file <path>: load configuration from file.--exa-config <path>(deprecated alias for--exa-config-file).
Tools
web_search_exa
Params: query (required), numResults.
Returns: formatted snippets with optional highlights and metadata (costDollars, searchTime, resolvedSearchType).
web_fetch_exa
Params: urls (required array), maxCharacters, highlights, summary (query), maxAgeHours.
web_search_advanced_exa
Params include query, numResults, category, type (auto|neural|..., no deep types), date filters, domain filters, textMaxCharacters, and highlight controls.
Notes:
- Deep types are rejected here. Use
web_research_exafordeep-reasoning,deep-lite, ordeep. - Invalid categories return an error instead of silently falling back to an unfiltered search.
web_research_exa
Params include:
query(required)type:deep-reasoning | deep-lite | deepsystemPromptoutputSchema(typemay be"object"or"text", default"object")- optional
additionalQueries, filters,numResults, andtextMaxCharacters
web_answer_exa
Params include query (required), systemPrompt, text, and outputSchema.
web_find_similar_exa
Params include url (required), numResults, textMaxCharacters, excludeSourceDomain, date filters, and domain filters.
Integration tests
Live integration coverage is available for web_search_exa, web_fetch_exa, and web_research_exa.
These tests are:
- skipped by default
- only enabled when you opt in manually
- always skipped in CI
Run them locally with a real API key:
EXA_API_KEY=your-key npx vitest run packages/pi-exa/__tests__/integration.test.ts -- --exa-liveYou can also enable them with an environment variable instead of the CLI flag:
PI_EXA_LIVE=1 EXA_API_KEY=your-key npx vitest run packages/pi-exa/__tests__/integration.test.tsNotes
web_search_advanced_exaandweb_research_exaare opt-in and disabled by default.- Research/tool output may include both
textanddetails.parsedOutputdepending onoutputSchema.type.
