Agentic Research

Cross-layer Configuration of Tavily Search API in Agent Frameworks

2026/05/1010 min readBryan Chan閱讀中文原文
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

FrameworkPurposeTrigger
Hermes AgentBackground daily information gatheringAutomatically triggered by scheduled tasks
OpenClawReal-time search during tasksNatural language or slash commands
Claude CodeUsed by OpenClaw for orchestrationIndirectly 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

ParameterDescriptionRecommended Value
max_resultsNumber of returned results5-10
search_depthbasic or advancedUse advanced for important cases
include_domainsRestrict to domainsOptional
exclude_domainsExclude domainsOptional

Cost Control

Tavily's free tier provides 1000 calls per month. Recommendations:

  • Hermes daily collection: use basic mode (30 times/day)
  • OpenClaw real-time search: use advanced mode (on demand)
  • Keep monthly usage under 900 calls

Related Articles