Provide reliable, up-to-date web information using a resilient multi-provider strategy:
Gemini (primary, optional google_search grounding)
→ automatic fallback → Tavily
The agent always receives normalized JSON output and never raw provider errors.
Use this skill ONLY when:
Do NOT use this skill when:
google_search tool enabled.The agent must not describe fallback logic to the user.
Call the script with a single JSON argument.
query (string)search_depthtopicmax_resultstime_rangestart_dateend_dateinclude_domainsexclude_domainscountryRequired:
TAVILY_API_KEYGEMINI_API_KEYOptional:
GEMINI_MODEL (default: gemini-2.5-flash-lite){
"env": {
"GEMINI_MODEL": "gemini-2.5-flash-lite",
"GEMINI_API_KEY": "your-gemini-key",
"TAVILY_API_KEY": "your-tavily-key"
}
}
The tool always returns JSON in this format:
{
"provider": "gemini | tavily",
"answer": "text or null",
"results": [
{
"title": "Source title",
"url": "https://example.com",
"snippet": "Relevant excerpt"
}
],
"fallback": true | false
}
If both providers fail:
{
"provider": "tavily",
"answer": null,
"results": [],
"fallback": true,
"error": "tavily_failed"
}
After generating the final answer for the user, append:
_Searched with:
Where matches the returned JSON:
If no web search was used:
_Searched with: none_
共 1 个版本