Tavily Search
Configure Tavily Search as an agent tool in LibreChat
Tavily Search is a built-in agent tool for current web research. It returns structured search results and can optionally include answers, images, raw page content, domain filters, and recency filters.
Setup
Get a Tavily API Key
Create a Tavily account and copy your API key from app.tavily.com.
Restart LibreChat
| Deployment | Command |
|---|---|
| Docker | docker compose down && docker compose up -d |
| Local | Stop the server, then run npm run backend again |
Add Tavily to an Agent
In LibreChat, select Agents, create or edit an agent, open the agent's Tools list, select Tavily Search, and save the agent.
Parameters
| Parameter | Description |
|---|---|
query | Search query. Required. |
max_results | Number of results to return, from 1 to 10. Defaults to 5. |
search_depth | basic for faster results or advanced for higher quality results. Advanced searches count as 2 requests. |
include_answer | Include Tavily's generated answer in the response. |
include_images | Include image results. |
include_image_descriptions | Include descriptions for returned images when images are enabled. |
include_raw_content | Include raw page content in the result. |
include_domains | Limit results to specific domains. |
exclude_domains | Exclude specific domains. |
topic | general, news, or finance. |
time_range | Limit results to a recent period such as day, week, month, or year. |
days | Number of days back to include for news searches. |
Notes
- Tavily Search is an agent tool. LibreChat can also use Tavily as a Web Search provider or scraper, which is configured separately.
- Tavily requests use the global
PROXYenvironment variable when it is configured. - If the tool does not appear in the Agent Builder, confirm
TAVILY_API_KEYis set and checkincludedToolsorfilteredTools.
How is this guide?