@tavily/pi-extension
Official Tavily extension for the Pi coding agent
Package details
Install @tavily/pi-extension from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@tavily/pi-extension- Package
@tavily/pi-extension- Version
0.1.2- Published
- May 19, 2026
- Downloads
- not available
- Author
- konstantintzt
- License
- unknown
- Types
- extension
- Size
- 33.6 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-tavily
Official Tavily extension for the Pi coding agent.
Published package name:
@tavily/pi-extension
Install in Pi with:
pi install npm:@tavily/pi-extension
What it adds
This extension adds two Tavily-powered tools to Pi:
web_search— search the web with Tavily Searchweb_fetch— extract content from one or more URLs with Tavily Extract
Authentication
v1 uses an API key via environment variable:
export TAVILY_API_KEY=tvly-...
OAuth / Pi-native login flow is not included yet.
Install
From npm
pi install npm:@tavily/pi-extension
Local development
From this repo:
npm install
pi -e ./index.ts
Isolated local testing
To test only this extension without other skills/extensions interfering:
pi --no-session --no-skills --no-prompt-templates --no-context-files --no-extensions -e ./index.ts
Example prompts
Search
Search the web for the latest Tavily announcements.
Search the web for recent Tavily news from the last month. Use news topic, advanced depth, include an answer, and include favicons.
Search the web for the exact phrase "Tavily Search" and exclude reddit.com.
Fetch / extract
Fetch https://docs.tavily.com and summarize it.
Fetch these pages and compare them:
https://docs.tavily.com/documentation/api-reference/endpoint/search
https://docs.tavily.com/documentation/api-reference/endpoint/extract
Fetch these URLs and extract only content relevant to API credits and pricing:
https://docs.tavily.com/documentation/api-reference/endpoint/search
https://docs.tavily.com/documentation/api-reference/endpoint/extract
Tool behavior
web_search
Backed by Tavily Search.
Supports the full v1 parameter surface defined in docs/tool-contract.md, including:
search_depthtopictime_rangestart_date/end_dateinclude_domains/exclude_domainsinclude_answerinclude_raw_contentinclude_imagesinclude_faviconauto_parametersexact_matchinclude_usage
web_fetch
Backed by Tavily Extract.
Supports the full v1 parameter surface defined in docs/tool-contract.md, including:
urlsquerychunks_per_sourceextract_depthformatinclude_imagesinclude_favicontimeoutinclude_usage
Validation rules
The extension currently enforces a few important contract rules:
web_search.chunks_per_sourcerequiressearch_depth: "advanced"web_search.countryis only valid withtopic: "general"web_fetch.chunks_per_sourcerequiresqueryweb_fetchallows a maximum of 20 URLs
Notes
- Public Pi tool parameters use Tavily-style
snake_case. - For deep page extraction, prefer
web_searchto discover URLs first, thenweb_fetchto extract selected pages. - Large outputs may be truncated for Pi context safety, with the full output saved to a temp file.
Releasing
See RELEASING.md for the local test, packaging, and npm publish workflow.
Contract
The public tool contract for v1 lives here:
docs/tool-contract.md
Repository name vs package name
This repository is named pi-tavily, while the published npm package is:
@tavily/pi-extension