Un fil r/Agent_AI a demandé des alternatives à Tavily. Pour les agents LangChain, la migration prend typiquement 10 minutes. Ce guide détaille l'échange, le calcul des prix et les cas où il est préférable de conserver Tavily.
Prérequis
- Agent LangChain existant utilisant Tavily
- Clé API Scavio
- langchain-scavio installé (pip install langchain-scavio)
Parcours
Étape 1: Remplacez l'import Tavily par Scavio
Échange en une ligne.
# Before
from langchain_tavily import TavilySearchResults
tool = TavilySearchResults(max_results=5)
# After
from langchain_scavio import ScavioSearchTool
tool = ScavioSearchTool(max_results=5)Étape 2: Définissez la variable d'environnement
L'en-tête x-api-key se trouve dans SCAVIO_API_KEY.
export SCAVIO_API_KEY=sk_live_xxx
# Tavily was TAVILY_API_KEYÉtape 3: Connectez l'outil à votre agent
Même structure que le câblage Tavily.
from langchain.agents import create_react_agent
agent = create_react_agent(llm, [tool], prompt)Étape 4: Confirmez la forme de la réponse
Scavio renvoie organic_results[i].link/.snippet/.title.
results = tool.invoke({'query': 'best ai agent frameworks 2026'})
for r in results:
print(r['title'], r['link'])Étape 5: Vérifiez le coût de la migration
PAYG : Tavily 0,008 $/crédit ; Scavio 0,0043 $ sur le palier à 30 $ ou 0,005 $ en PAYG.
# 5,000 calls/mo:
# Tavily PAYG: $40
# Scavio Project tier: $30 flat (7K credits, 2K headroom)Exemple Python
from langchain_scavio import ScavioSearchTool
tool = ScavioSearchTool(max_results=5, include_ai_overview=True)
result = tool.invoke({'query': 'tavily alternatives 2026'})Exemple JavaScript
// JS-side: use fetch directly to https://api.scavio.dev/api/v1/search
const res = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query: 'tavily alternatives 2026' })
}).then(r => r.json());Sortie attendue
Same agent loop, lower per-call cost, plus access to reddit_search/youtube_search from the same key. Keep Tavily if the agent specifically needs Tavily's pre-summarized output shape.