Hermes is a local-first AI agent framework that supports tool use, memory, and scheduled execution. Adding a search grounding tool transforms it from a conversational assistant into a research automation engine that can run daily without supervision. This tutorial configures a Hermes agent with a Scavio search tool, defines a daily research prompt template, and sets up a cron-triggered script that collects results into a structured daily briefing. The pattern works for competitor monitoring, industry news digests, regulatory change tracking, or any recurring research workflow.
Prerequisites
- Python 3.10 or higher installed
- Hermes agent framework installed
- requests library installed
- A Scavio API key from scavio.dev
Walkthrough
Step 1: Define the Scavio search tool for Hermes
Create a tool function that Hermes can call. It wraps the Scavio search API and returns results formatted for the agent context.
import os
import requests
API_KEY = os.environ.get("SCAVIO_API_KEY", "your_scavio_api_key")
def scavio_search(query: str, country: str = "us") -> str:
r = requests.post(
"https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={"query": query, "country_code": country}
)
r.raise_for_status()
data = r.json()
results = data.get("organic_results", [])[:5]
lines = []
for item in results:
lines.append(f"- {item['title']}: {item['link']}")
if item.get("snippet"):
lines.append(f" {item['snippet']}")
return "\n".join(lines) if lines else "No results found."Step 2: Configure the Hermes agent with the search tool
Register the search tool with the Hermes agent so it can call it during reasoning. Set a system prompt that instructs the agent to use search for factual claims.
SYSTEM_PROMPT = """You are a daily research assistant. Use the scavio_search tool to find current information.
For every claim, cite the source URL. Structure your output as a briefing with sections.
Today's date is {today}. Focus on developments from the past 24 hours."""
# Register tool with Hermes (pseudo-code, adapt to your Hermes version):
# agent = HermesAgent(
# system_prompt=SYSTEM_PROMPT,
# tools=[{"name": "scavio_search", "fn": scavio_search, "description": "Search the web via Scavio API"}]
# )Step 3: Define daily research topics
Create a list of research prompts that the agent will execute each day. These can be static or generated from a config file.
DAILY_TOPICS = [
"What are the latest developments in AI agent frameworks today?",
"Any new Google search API changes or announcements?",
"What are competitors like SerpApi, Tavily, and Serper announcing this week?",
"What trending discussions about MCP servers appeared on Reddit today?"
]Step 4: Run the daily briefing and save output
Execute each research topic through the agent, collect the responses, and write a dated briefing file.
import json
from datetime import date
def run_daily_briefing(agent, topics: list[str]) -> str:
today = str(date.today())
sections = []
for topic in topics:
prompt = topic.replace("{today}", today)
# response = agent.run(prompt) # Hermes agent call
response = f"[Agent would research: {topic}]" # placeholder
sections.append(f"## {topic}\n\n{response}")
briefing = f"# Daily Briefing - {today}\n\n" + "\n\n".join(sections)
output_file = f"briefing_{today}.md"
with open(output_file, "w") as f:
f.write(briefing)
print(f"Briefing saved to {output_file}")
return briefingPython Example
import os
import json
import requests
from datetime import date
API_KEY = os.environ.get("SCAVIO_API_KEY", "your_scavio_api_key")
ENDPOINT = "https://api.scavio.dev/api/v1/search"
def scavio_search(query: str, country: str = "us") -> str:
r = requests.post(
ENDPOINT,
headers={"x-api-key": API_KEY},
json={"query": query, "country_code": country}
)
r.raise_for_status()
data = r.json()
results = data.get("organic_results", [])[:5]
lines = []
for item in results:
lines.append(f"- {item['title']}: {item['link']}")
if item.get("snippet"):
lines.append(f" {item['snippet']}")
return "\n".join(lines) if lines else "No results found."
def run_research(topics: list[str]) -> dict:
today = str(date.today())
briefing = {"date": today, "sections": []}
for topic in topics:
print(f"Researching: {topic}")
search_results = scavio_search(topic)
briefing["sections"].append({"topic": topic, "findings": search_results})
return briefing
def save_briefing(briefing: dict, output: str = "") -> None:
if not output:
output = f"briefing_{briefing['date']}.json"
with open(output, "w") as f:
json.dump(briefing, f, indent=2)
print(f"Saved briefing to {output}")
if __name__ == "__main__":
topics = [
"latest AI agent framework releases 2026",
"google search api changes this week",
"MCP server trending discussions reddit"
]
result = run_research(topics)
save_briefing(result)JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY || "your_scavio_api_key";
const ENDPOINT = "https://api.scavio.dev/api/v1/search";
const fs = require("fs");
async function scavioSearch(query) {
const res = await fetch(ENDPOINT, {
method: "POST",
headers: { "x-api-key": API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ query, country_code: "us" })
});
const data = await res.json();
return (data.organic_results || []).slice(0, 5).map(r =>
`- ${r.title}: ${r.link}${r.snippet ? `\n ${r.snippet}` : ""}`
).join("\n") || "No results found.";
}
async function runResearch(topics) {
const today = new Date().toISOString().split("T")[0];
const sections = [];
for (const topic of topics) {
console.log(`Researching: ${topic}`);
const findings = await scavioSearch(topic);
sections.push({ topic, findings });
}
const briefing = { date: today, sections };
fs.writeFileSync(`briefing_${today}.json`, JSON.stringify(briefing, null, 2));
console.log(`Saved briefing for ${today}`);
}
runResearch([
"latest AI agent framework releases 2026",
"google search api changes this week"
]).catch(console.error);Expected Output
Researching: latest AI agent framework releases 2026
Researching: google search api changes this week
Researching: MCP server trending discussions reddit
Saved briefing to briefing_2026-05-17.json