Cross-layer Configuration of Tavily Search API in Agent Frameworks
TopicsTavilySearchAgentHermesOpenClaw
What is Tavily?
Tavily is a search API designed specifically for AI Agents. It returns structured results instead of lists of HTML pages, making it suitable for direct consumption by Agents.
- 🔗 tavily.com
- API Key acquisition: generate it in the Dashboard after registration
Role in Each Framework
| Framework | Purpose | Trigger |
|---|---|---|
| Hermes Agent | Background daily information gathering | Automatically triggered by scheduled tasks |
| OpenClaw | Real-time search during tasks | Natural language or slash commands |
| Claude Code | Used by OpenClaw for orchestration | Indirectly invoked via OC |
Hermes Agent Configuration
Background Gathering Script
# ~/hermes/scripts/daily_briefing.py
from tavily import TavilyClient
tavily = TavilyClient(api_key="tvly-xxx")
topics = [
"AI agent framework 2026",
"LLM release this week",
"open source AI trending",
"DeepSeek latest update",
"Qwen 3 new features"
]
for topic in topics:
result = tavily.search(topic, max_results=5)
print(f"## {topic}")
for r in result['results']:
print(f"- [{r['title']}]({r['url']})")
Hermes Scheduled Task
# ~/.hermes/config.yaml
cron:
- schedule: "0 7 * * *"
task: "python ~/hermes/scripts/daily_briefing.py"
save_to: "~/.hermes/briefings/"
OpenClaw Configuration
Skill Definition
OpenClaw can wrap Tavily as a Skill:
# ~/.openclaw/skills/tavily-search/SKILL.md
---
name: tavily-search
description: Search the web for information using the Tavily API
---
## Trigger
- "search" "look up" "help me find" "search for"
- Slash command: /tavily
## Execution
Invoke the Tavily API to search for specified keywords and return structured results.
API Key Configuration
// ~/.openclaw/openclaw.json
{
"skills": {
"tavily-search": {
"api_key": "tvly-xxx",
"max_results": 5,
"search_depth": "advanced"
}
}
}
Claude Code Configuration
Invocation via OpenClaw
Claude Code does not directly call Tavily; instead, OpenClaw's Claude Code Bridge passes the search results:
You → OpenClaw: "Search for the latest DeepSeek V4 benchmark"
OpenClaw → Tavily API → retrieves results
OpenClaw → Claude Code Bridge: "Generate an analysis based on the following search results..."
Claude Code → generates report → returns to OpenClaw
Tavily API Parameter Description
| Parameter | Description | Recommended Value |
|---|---|---|
max_results | Number of returned results | 5-10 |
search_depth | basic or advanced | Use advanced for important cases |
include_domains | Restrict to domains | Optional |
exclude_domains | Exclude domains | Optional |
Cost Control
Tavily's free tier provides 1000 calls per month. Recommendations:
- Hermes daily collection: use
basicmode (30 times/day) - OpenClaw real-time search: use
advancedmode (on demand) - Keep monthly usage under 900 calls
Related Articles
More in Tools
- PaddleOCR in Practice: Extracting Hong Kong Stock Annual Report Financial Data in 83 Seconds
- Webb-Site: The Essential Hidden Treasure for Hong Kong Stock Research, a One-Click Tool to Get Annual Report PDFs for All Listed Companies
- Academic Research Skills Deep Technical Breakdown: How 45+ Agents Collaborate to Complete the Full Workflow from Literature Review to Peer Review
- AI Engineering from Scratch Deep Dive: 435 Lessons × 20 Stages