tavily-best-practices

Implement Tavily web search, extraction, crawling, and research APIs in agentic workflows.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/flemx/salesforce-langgraph-agent --skill tavily-best-practices-flemx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tavily-best-practices
Source: https://github.com/flemx/salesforce-langgraph-agent/tree/main/.agents/skills/tavily-best-practices
Command: npx skills add https://github.com/flemx/salesforce-langgraph-agent --skill tavily-best-practices-flemx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers building AI agents and RAG systems need reliable access to real-time web data, but integrating search, extraction, and crawling APIs correctly requires knowing which endpoint to use, how to tune parameters, and how to avoid context window explosion and runaway costs. ## Core Features & Use Cases - Method Selection Guidance: Maps tasks to the right Tavily method—search() for web results, extract() for URL content, crawl() and map() for site-wide discovery, and research() for end-to-end AI-synthesized reports. - Parameter Optimization: Documents search depth tradeoffs, query and chunks_per_source targeting, domain and path filtering, and async parallel patterns for Python and JavaScript SDKs. - Framework Integrations: Provides ready-to-use patterns for LangChain, LlamaIndex, CrewAI, Pydantic AI, Agno, Vercel AI SDK, Google ADK, and OpenAI/Anthropic tool calling. - Use Case: An engineer building a research agent uses the search-then-extract pipeline with score-based filtering and chunked extraction to gather focused, citation-ready web content without overflowing the model's context. ## Quick Start Ask your coding assistant to implement a Tavily web search integration for your agent following the best practices in this skill.

Frequently Asked Questions about tavily-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add web search to an AI agent with Tavily?

Install tavily-python or @tavily/core, initialize the client with your TAVILY_API_KEY, and call client.search() with a query under 400 characters. For LangChain agents, use the langchain-tavily package's TavilySearch tool directly.

What is the difference between Tavily search, extract, crawl, and map?

Search returns ranked web results for a query, extract pulls content from up to 20 specific URLs, crawl traverses a site returning full page content, and map returns only discovered URLs. Use research() for end-to-end AI-synthesized reports.

Which Tavily search depth should I use?

Use ultra-fast for latency-critical cases like autocomplete, fast or basic for balanced general queries, and advanced for precision-focused queries. Advanced returns reranked content chunks and is suitable for most use cases despite higher cost.

Does Tavily work with LangChain and CrewAI?

Yes. LangChain uses the official langchain-tavily package with TavilySearch, TavilyExtract, TavilyCrawl, TavilyMap, and TavilyResearch tools. CrewAI provides TavilySearchTool and TavilyExtractTool via the crewai-tools package.

How do I prevent context window explosion when extracting web content?

Pass a query parameter with chunks_per_source (1-5) to extract() or instructions with chunks_per_source to crawl(). This returns only the most relevant chunks of up to 500 characters each instead of full page content.

Why does Tavily extraction fail on some pages?

Basic extraction fails on JavaScript-rendered or complex pages. Retry failed URLs with extract_depth="advanced", and increase the timeout up to 60 seconds for slow pages. Monitor the failed_results array in the response.