Install
openclaw skills install tavily-alTeach AI to perform precise live web searches, content extraction, crawling, site mapping, and source evaluation using Tavily with proper citation and error...
openclaw skills install tavily-alInstructional knowledge that teaches an AI agent when and how to use Tavily for live web search, content extraction, crawling, and site mapping — including source evaluation, citation discipline, query planning, error handling, cost control, and security.
This is a skill, not a server. It is Markdown knowledge, not executable code. It assumes Tavily is already reachable through tools (e.g. the
tavily-mcpserver exposingtavily_search,tavily_extract,tavily_crawl,tavily_map) or through an HTTP client againsthttps://api.tavily.com. SeeREADME.mdfor the MCP-vs-skill distinction.
tavily-web-search-skill — Tavily research and retrieval skill for agents.
Teach the agent to retrieve fresh, factual, well-sourced information from the live web using Tavily, and to turn that information into cited, verifiable answers. Concretely, the skill governs:
Use Tavily when the answer depends on information that is outside your training data or may have changed. Trigger conditions:
Reasoning summary: prefer retrieval over guessing whenever a wrong answer would mislead the user and the truth is publicly available online.
Do not call Tavily when:
Reasoning summary: every call costs credits and latency and introduces untrusted content; do not call when you already know or can derive the answer.
| Variable | Required | Purpose |
|---|---|---|
TAVILY_API_KEY | Yes | Authenticates all Tavily requests. Sent as Authorization: Bearer <TAVILY_API_KEY>. |
Rules:
TAVILY_API_KEY is missing/invalid. Do not retry blindly.tavily-mcp tools, the key is injected by the server — you usually do not handle it directly. When calling HTTP yourself, read it from the environment at call time.Tavily exposes these endpoints (via tools or https://api.tavily.com/<endpoint>):
| Operation | Tool name (typical) | Endpoint | Use it to... |
|---|---|---|---|
| Search | tavily_search | /search | Find relevant web results (and an optional synthesized answer) for a query. Primary operation. |
| Extract | tavily_extract | /extract | Pull clean full content from one or more known URLs. |
| Crawl (beta) | tavily_crawl | /crawl | Follow links from a starting URL to gather many pages of a site. |
| Map (beta) | tavily_map | /map | Discover the URL structure of a site without fetching full content. |
| Usage | (HTTP) | /usage | Check remaining credits / account usage. |
Pick the narrowest operation that answers the need. See sections 7-10 and reference/endpoints.md.
Use tavily_search / /search as the default entry point for any "find / look up / verify" task.
Steps:
search_depth: "basic" (cheaper/faster). Escalate to "advanced" only when basic results are weak, the topic is hard, or high precision is required.topic. Use "general" by default; use "news" for current-events / breaking topics. With topic: "news" you may set days (look-back window).time_range (day | week | month | year) for recency-sensitive queries.max_results (0-20, default 5). Use the smallest count that gives enough coverage — 3-5 for simple facts, up to 10 for surveys.include_domains to restrict to trusted sites; exclude_domains to drop spam/low-quality ones.include_answer. Use false when you will synthesize yourself (default and preferred for citable answers); use "basic" / "advanced" for a quick synthesized summary — but still cite the underlying results URLs, not the answer blob.include_raw_content unless needed — it increases payload and cost. If you need full text of a result, prefer a targeted extract on its URL.score, domain, recency, and content snippet.[n] citations to the source URLs.Use tavily_extract / /extract when you already have specific URLs and want their clean content.
Steps:
results[].url, or provided by the user).urls as a single string or an array (batch multiple URLs in one call to save round-trips).extract_depth: "basic" for normal pages; "advanced" for complex/heavy pages where basic returns too little.format: "markdown" (preferred — preserves structure for the agent) or "text".results[].raw_content. Check failed_results for URLs that could not be fetched and handle them (skip, retry once, or tell the user).When to extract vs search: search to find pages; extract to read a page you already trust or were given.
Use tavily_crawl / /crawl to gather many pages from one site (docs, knowledge bases, a product's pages).
Steps:
url to the starting page (usually a section root or homepage).max_depth — how many link hops to follow from the start.limit — maximum number of pages to fetch.instructions (natural-language guidance) to steer which pages matter, when supported.results[] (each with url + raw_content) and the returned base_url.Crawl is beta. Treat its parameter names and limits as subject to change. Verification needed: confirm exact crawl parameters and limits with https://docs.tavily.com
Use tavily_map / /map to discover a site's URL structure without downloading full page content — cheaper than crawl when you only need the link inventory.
Steps:
url to the site/section root.results[] (a list of URLs) and base_url.extract or crawl next — map first, then fetch selectively. This is the cost-efficient pattern for large sites.Map is beta. Verification needed: confirm exact map parameters and limits with https://docs.tavily.com
Never treat a hit as truth just because Tavily returned it. For every result you rely on:
score. It is a relevance score in [0, 1]. Prefer higher-scoring results; be skeptical of low-scoring ones. score measures relevance to the query, not factual correctness — do not equate a high score with truth.Grounding is mandatory. For any claim derived from the web:
results[].url (or the extracted/crawled page URL).[n] at the point of each claim, numbered in order of first appearance.[n] Title — URL. Deduplicate identical URLs to one number.answer blob. If you used include_answer, still attribute to the real source pages.[n] must actually support the sentence it is attached to.Good retrieval starts with good queries.
time_range and, for news, days, when recency matters.include_domains (force authoritative sites) and exclude_domains (kill known noise).topic general↔news, (d) raise search_depth to advanced, (e) adjust domain filters. Limit to ~2-3 refinements before reporting what you could and could not find.React to each failure deterministically. See reference/common-errors.md for shapes.
TAVILY_API_KEY is missing or invalid and stop. Never print the key.max_results, malformed urls). Fix the request, then retry — do not retry the same bad payload. Read the error body to see which field is invalid.basic depth and fewer results to reduce cost.failed_results in extract/crawl: Skip or retry those specific URLs once; report any that remain unreachable.General: distinguish fix-don't-retry (4xx caused by your request: 401, 422) from retry-with-backoff (429/5xx/timeout). Never enter an infinite retry loop.
Minimize credits and latency without sacrificing correctness.
basic search_depth / extract_depth; escalate to advanced only when justified. (Advanced costs more credits than basic.)max_results to the smallest count that covers the question (often 3-5).include_raw_content unless you truly need full text; prefer a targeted extract afterward.extract call rather than many calls.Credit cost (approximate): basic search ≈ 1 credit; advanced search ≈ 2 credits. Extract/crawl/map costs scale with depth and number of pages. Verification needed: confirm exact credit costs per operation with https://docs.tavily.com
For anything that changes over time:
topic: "news" for breaking/current events; pair with days to bound the look-back window.time_range (day/week/month/year) to force recent results.TAVILY_API_KEY in chat, logs, citations, tool arguments, or error messages. It is injected by the environment/host.include_domains/exclude_domains to steer toward trustworthy sources and away from known-malicious or low-quality ones.Before answering, confirm:
basic depth and minimal max_results?score, domain, and recency for each source used?[n] + a Sources list of real URLs?A. "What's the latest stable version of <library> and when was it released?"
tavily_search with topic: "news" or time_range: "month", search_depth: "basic", max_results: 5, ideally include_domains set to the project's official site / release page.score, authoritative domain, recent date).tavily_extract that release page (format: "markdown").[1].B. "Summarize the key points of this article: <URL>."
tavily_extract with urls: "<URL>", extract_depth: "basic", format: "markdown".failed_results includes it, retry once with extract_depth: "advanced"; if still failing, report it.[1].C. "Compare what three vendors say about feature X across their docs."
tavily_search with include_domains: ["<vendor-docs-domain>"], max_results: 3.tavily_map a docs site to find the right page, then tavily_extract the chosen URLs (batch them).[1][2][3].advanced depth everywhere by default (overspending).max_results high "just in case" (noise + cost).score without checking the domain/recency or cross-checking.score as a truth/quality measure instead of relevance.answer blob instead of the underlying source pages, or fabricating citations.limit/max_depth or regard for robots/Terms.reference/ files elaborate; if they ever disagree, SKILL.md wins and the reference file must be corrected.> Verification needed: ..., and never introduce hardcoded keys or placeholder secrets.CLAUDE.md for rules on editing this skill, adding recipes/prompts/examples, and avoiding hallucinated behavior.