Agent skill

tavily-best-practices

Build production-ready Tavily integrations with best practices for web search, content extraction, crawling, and research in agentic workflows, RAG systems, and autonomous agents

Stars 12,831
Forks 1,123

Install this agent skill to your Project

npx add-skill https://github.com/andrewyng/context-hub/tree/main/content/tavily/skills/tavily-best-practices

Metadata

Additional technical details for this skill

tags
tavily,search,extract,crawl,research,ai,agents,rag,web-search,web-scraping,best-practices
source
maintainer
revision
1
updated on
2026-03-11

SKILL.md

Tavily

Tavily is a search API designed for LLMs, enabling AI applications to access real-time web data.

Installation

Python:

bash
pip install tavily-python

JavaScript:

bash
npm install @tavily/core

See references/sdk.md for complete SDK reference.

Client Initialization

python
from tavily import TavilyClient

# Uses TAVILY_API_KEY env var (recommended)
client = TavilyClient()

#With project tracking (for usage organization)
client = TavilyClient(project_id="your-project-id")

# Async client for parallel queries
from tavily import AsyncTavilyClient
async_client = AsyncTavilyClient()

Choosing the Right Method

For custom agents/workflows:

Need Method
Web search results search()
Content from specific URLs extract()
Content from entire site crawl()
URL discovery from site map()

For out-of-the-box research:

Need Method
End-to-end research with AI synthesis research()

Quick Reference

search() - Web Search

python
response = client.search(
    query="quantum computing breakthroughs",  # Keep under 400 chars
    max_results=10,
    search_depth="advanced"
)
print(response)

Key parameters: query, max_results, search_depth (ultra-fast/fast/basic/advanced), include_domains, exclude_domains, time_range

See references/search.md for complete search reference.

extract() - URL Content Extraction

python
# Simple one-step extraction
response = client.extract(
    urls=["https://docs.example.com"],
    extract_depth="advanced"
)
print(response)

Key parameters: urls (max 20), extract_depth, query, chunks_per_source (1-5)

See references/extract.md for complete extract reference.

crawl() - Site-Wide Extraction

python
response = client.crawl(
    url="https://docs.example.com",
    instructions="Find API documentation pages",  # Semantic focus
    extract_depth="advanced"
)
print(response)

Key parameters: url, max_depth, max_breadth, limit, instructions, chunks_per_source, select_paths, exclude_paths

See references/crawl.md for complete crawl reference.

map() - URL Discovery

python
response = client.map(
    url="https://docs.example.com"
)
print(response)

research() - AI-Powered Research

python
import time

# For comprehensive multi-topic research
result = client.research(
    input="Analyze competitive landscape for X in SMB market",
    model="pro"  # or "mini" for focused queries, "auto" when unsure
)
request_id = result["request_id"]

# Poll until completed
response = client.get_research(request_id)
while response["status"] not in ["completed", "failed"]:
    time.sleep(10)
    response = client.get_research(request_id)

print(response["content"])  # The research report

Key parameters: input, model ("mini"/"pro"/"auto"), stream, output_schema, citation_format

See references/research.md for complete research reference.

Detailed Guides

For complete parameters, response fields, patterns, and examples:

  • references/sdk.md - Python & JavaScript SDK reference, async patterns, Hybrid RAG
  • references/search.md - Query optimization, search depth selection, domain filtering, async patterns, post-filtering
  • references/extract.md - One-step vs two-step extraction, query/chunks for targeting, advanced mode
  • references/crawl.md - Crawl vs Map, instructions for semantic focus, use cases, Map-then-Extract pattern
  • references/research.md - Prompting best practices, model selection, streaming, structured output schemas
  • references/integrations.md - LangChain, LlamaIndex, CrewAI, Vercel AI SDK, and framework integrations

Expand your agent's capabilities with these related and highly-rated skills.

andrewyng/context-hub

login-flows

Common login automation patterns for web apps using Playwright

12,831 1,123
Explore
andrewyng/context-hub

document-extraction

Use this skill for intelligent document processing and content extraction using LandingAI's Agentic Document Extraction (ADE). Trigger when users need to (1) Parse documents (PDFs, images, spreadsheets, presentations) into structured Markdown with layout understanding, (2) Extract specific structured data from documents using schemas (invoice fields, form data, table data, etc.), (3) Classify and separate multi-document batches by type (invoices vs receipts, statements vs forms, etc.), (4) Process large documents asynchronously (up to 1GB/1000 pages), (5) Get visual grounding (bounding boxes, page numbers) for extracted content — use when users mention bounding boxes, word locations, grounding, highlighting extracted content, or showing where data appears in a document. Use this skill when the task involves understanding document content for a set of documents. In particular this skill can help you write code that run on sets of documents. This will increase speed, and reduce the cost of loading the documents on the Agent context window because you can use a single script to extract the information needed.

12,831 1,123
Explore
andrewyng/context-hub

document-workflows

Use this skill for building end-to-end document processing workflows and pipelines using LandingAI ADE. Trigger when users need to: (1) Process batches of documents in parallel or async, (2) Build classify-then-extract pipelines for mixed document types, (3) Prepare parsed documents for RAG systems with chunking and vector DB ingestion, (4) Load extraction results into databases like Snowflake or export to CSV/DataFrames, (5) Visualize extraction results: draw bounding box overlays on pages, crop chunk images, or highlight/annotate specific words or phrases found in documents, (6) Build Streamlit or web UIs for document processing, (7) Find and highlight specific terms within document sections using word-level grounding (e.g. highlight "L2S" in the Introduction, redact PII, annotate extracted values on the original page). This skill complements the document-extraction skill which covers ADE SDK basics. Use document-extraction to write code that executes parse/extract/split operations with more precision and less cost than adding the document image to the prompt and asking the LLM to find the relevant info. Use document-workflows when composing those operations into pipelines, or when you need visualization, annotation, or word-level grounding on parsed documents.

12,831 1,123
Explore
andrewyng/context-hub

new-project

Build a new AI agent with Olakai monitoring from scratch — project setup, SDK integration, KPI configuration, and end-to-end validation

12,831 1,123
Explore
andrewyng/context-hub

integrate

Add Olakai monitoring to existing AI code — wrap your LLM client, configure custom KPIs, and validate the integration end-to-end

12,831 1,123
Explore
andrewyng/context-hub

electronics-sourcing

Guide for AI agents to source electronic components using parts-mcp — tool sequencing, decision patterns, and multi-step workflows

12,831 1,123
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results