Documentation Index
Fetch the complete documentation index at: https://docs.tavily.com/llms.txt
Use this file to discover all available pages before exploring further.

Introduction
LibreChat is an open-source chat platform that supports multiple AI providers, agents, and a configurable web search system. Tavily integrates with LibreChat in three ways:- Web search provider for the built-in
Web Searchfeature. - Scraper / extract provider for fetching page contents alongside search.
- Built-in agent tool (
Tavily Search) inside the LibreChat Agent Builder.
Prerequisites
- A running LibreChat instance (self-hosted or cloud-based). See the LibreChat docs for installation.
- A Tavily API key.
Web search in LibreChat
LibreChat’s Web Search feature uses a pluggable pipeline of search provider → scraper → reranker. Tavily can power both the search and scrape stages.Configure Tavily as a provider
Add your Tavily API key
Set the environment variable in your LibreChat LibreChat picks this up automatically for both the search and extract roles.
.env file:(Optional) Configure via librechat.yaml
If you prefer to manage configuration centrally, reference the environment variable in your Only reference environment variable names in YAML - for best practices, never embed your API key directly.
librechat.yaml:Why use Tavily for both stages
Tavily can serve as the search provider and the scraper provider simultaneously, so you can run the full web search pipeline with a single API key:| Stage | Tavily capability |
|---|---|
| Search | Agent-optimized results with configurable search depth, time-based filtering, and domain include/exclude. |
| Extract | Clean page content with configurable extract depth, plus image and favicon extraction. |
librechat.yaml if you want an additional ranking stage on top of Tavily’s results.
Tavily as a built-in agent tool
LibreChat’s Agent Builder ships withTavily Search as a built-in tool, so any custom agent you build can call Tavily directly.
Create or open an agent
Select Agents from the endpoint menu, then open the Agent Builder in the side panel. Set the agent’s name, avatar, model, and instructions.
Enable Tavily Search
In the agent’s tool list, toggle on Tavily Search. If
TAVILY_API_KEY is not set in the environment, LibreChat will prompt for the key in the UI the first time the tool is used.Best practices
- Use one Tavily key end-to-end — the same key powers Web Search and the built-in agent tool, which keeps usage and billing in one place.
- Combine search + extract — let Tavily search for sources and extract the most relevant pages before sending content to the model, which keeps context windows tight.
- Pick the right surface — use Web Search for ad-hoc chat queries and the built-in
Tavily Searchtool for simple agents. You can also connect the Tavily MCP server when an agent needs the full research workflow.