Works beautifully. Here's what was upgraded:
| Flag | What it does |
|---|---|
-d <depth> | basic / advanced / fast / ultra-fast — controls latency vs. relevance |
-t <topic> | general / news / finance — topic-scoped search |
-r <range> | day / week / month / year — time filter |
--answer | Includes Tavily's AI-generated answer at the top |
--raw | Returns raw page content per result |
--include <d,d> | Restrict results to specific domains |
--exclude <d,d> | Block specific domains from results |
--json | Dumps the full raw JSON response |
Also now uses the proper Authorization: Bearer header (the new auth standard from the docs), and shows a relevance score per result.
Now I need to know your Tavily API key to proceed. Do you have one? If so, I'll update the skill to use Tavily's Search API instead of DuckDuckGo.
A few options for storing the key:
TAVILY_API_KEY in your shell profile (recommended)~/.pi/agent/skills/web-search/.envWhich do you prefer, and what's your API key?
No problem! Once you've added TAVILY_API_KEY to your shell profile, I'll update the skill. Let me do that now.
What's your Tavily API key?
Now I have a solid picture of all the parameters. Let me write the improved search tool:
Here's a summary of what's on the Tavily Docs Welcome page at https://docs.tavily.com/welcome:
Tavily provides a suite of web APIs designed for AI/LLM applications. Here's what's available:
pip install tavily-pythonnpm i @tavily/core| API | Description | Example |
|---|---|---|
| Search | Search the web | tavily_client.search("Who is Leo Messi?") |
| Extract | Extract content from a specific URL | tavily_client.extract("https://en.wikipedia.org/...") |
| Crawl | Crawl a site with natural language instructions | tavily_client.crawl("https://docs.tavily.com", instructions="...") |
| Map | Map all pages of a website | tavily_client.map("https://docs.tavily.com") |
| Research | Run an autonomous research task | tavily_client.research("Latest developments in AI?") |
All APIs use a simple client pattern: instantiate TavilyClient with your API key (tvly-YOUR_API_KEY) and call the relevant method. Would you like to dive deeper into any specific API or integrate Tavily into a project?
Working great! The advanced depth, news topic, weekly time range, and AI answer all fired correctly. Results are fresh (Feb 26–27, 2026) with relevance scores per result. The tool is solid.
Now let's test a few of the new options:
The page is JS-rendered. Let me fetch the actual search API endpoint docs directly via the Tavily API itself, and also try a curl approach to get the raw content.
Let me read the relevant skill files first to understand the current setup.
Works perfectly! Tavily returned 5 clean results with titles, URLs, and snippets. The API key is set correctly and the switch from DuckDuckGo is fully working. 🎉
Done! Here's what changed:
search.js — now calls the Tavily /search API (POST https://api.tavily.com/search) using your TAVILY_API_KEY env var, with the same -n flag for result countSKILL.md — updated description and added the TAVILY_API_KEY requirementOnce you've added the key to your shell profile and reloaded it (source ~/.bashrc / source ~/.zshrc), it'll work automatically.