La habilidad de búsqueda web incorporada de Hermes Agent utiliza el raspado DuckDuckGo, que con frecuencia falla con resultados vacíos, limitación de velocidad o tiempos de espera. Este tutorial lo reemplaza con un backend API de búsqueda confiable a través de MCP, solucionando permanentemente el error "web_search no arrojó resultados".
Requisitos previos
- Agente Hermes instalado (v0.10+)
- Una clave API de Scavio de scavio.dev
Guia paso a paso
Paso 1: Diagnosticar el problema
Hermes web_search falla porque DuckDuckGo limita las solicitudes automáticas. Consulte sus registros de Hermes para ver el patrón de error.
# Common error in Hermes logs:
# [WARN] web_search: DuckDuckGo returned 0 results for query 'python fastapi'
# [ERROR] web_search: Request timed out after 10s
# [WARN] web_search: Rate limited by DuckDuckGo (429)
# Check your Hermes config:
cat ~/.hermes/config.yaml | grep -A5 web_searchPaso 2: Añadir Scavio MCP como proveedor de búsqueda
Configure Hermes para utilizar el servidor Scavio MCP para búsquedas web en lugar de DuckDuckGo.
# In ~/.hermes/config.yaml, add MCP server:
mcp_servers:
scavio:
url: "https://mcp.scavio.dev/mcp"
headers:
x-api-key: "your_scavio_api_key"
tools:
- google_search
- reddit_search
- youtube_searchPaso 3: Crear una anulación de habilidad de búsqueda
Anule la habilidad web_search predeterminada para utilizar la herramienta google_search proporcionada por MCP.
# Create ~/.hermes/skills/reliable_search.yaml:
name: reliable_search
description: Web search using Scavio API (replaces DuckDuckGo)
trigger: "search for|look up|find information about|web search"
action: |
Use the google_search tool from the scavio MCP server.
For Reddit-specific queries, use reddit_search instead.
For video content, use youtube_search.
Always return the top 5 results with title, URL, and snippet.Paso 4: Deshabilitar la búsqueda web predeterminada
Evite que Hermes vuelva a caer sobre el raspador DuckDuckGo roto.
# In ~/.hermes/config.yaml, disable built-in web_search:
skills:
disabled:
- web_search # Disable DuckDuckGo-based search
# reliable_search skill (above) will handle search queries insteadPaso 5: Pruebe la solución
Verifique que la búsqueda funcione de manera confiable con el nuevo backend.
# In Hermes chat:
> Search for best Python web framework 2026
# Expected: Hermes uses scavio google_search tool, returns results
# Previously: Empty results or timeout from DuckDuckGo
# Test Reddit search:
> Search Reddit for Python framework recommendations
# Test YouTube search:
> Find YouTube tutorials about FastAPIEjemplo en Python
import requests, os
def hermes_search(query: str, platform: str = 'google') -> list:
resp = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'},
json={'platform': platform, 'query': query}, timeout=10)
return resp.json().get('organic', [])[:5]Ejemplo en JavaScript
async function hermesSearch(query, platform = 'google') {
const resp = 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({platform, query})
});
return (await resp.json()).organic?.slice(0, 5) || [];
}Salida esperada
Hermes Agent with reliable web search via Scavio MCP, replacing the broken DuckDuckGo scraper with a managed API backend.