Skip to content

Hermes AI Agent | Setup & Configuration Guide

Hermes AI Agent - Complete Setup Guide

Hermes is an autonomous AI agent that runs in your terminal, designed to help with coding, research, automation, and complex multi-step tasks.

Overview

Hermes combines multiple AI capabilities in a CLI environment:

  • Multi-tool orchestration - Coordinates various tools and APIs
  • Autonomous task execution - Handles complex workflows independently
  • Code-aware - Understands project structure and context
  • Extensible - Plugin system for custom capabilities

Key Features

FeatureDescription
Terminal NativeRuns directly in your shell environment
Multi-ProviderWorks with OpenAI, Anthropic, Google, Groq, and more
Tool IntegrationBuilt-in support for 100+ tools (file, web, git, etc.)
Persistent MemoryRemembers context across sessions
Sub-agentsCan spawn specialized sub-agents for parallel work

Installation

Prerequisites

  • Node.js 18+ or Python 3.10+
  • API key from at least one provider

Install via npm

Terminal window
npm install -g @hermes/agent

Install via pip

Terminal window
pip install hermes-agent

Configuration

Basic Config File (~/.hermes/config.yaml)

# Provider settings
provider: openai # or anthropic, google, groq, etc.
api_key: ${OPENAI_API_KEY}
model: gpt-4o
# Agent behavior
max_iterations: 50
auto_confirm: false # Set to true for fully autonomous mode
# Tools configuration
tools:
- file
- web_search
- git
- terminal
- code_execution
# Memory settings
memory:
enabled: true
storage: local # or redis, postgres

Environment Variables

Terminal window
export OPENAI_API_KEY="sk-..."
# or
export ANTHROPIC_API_KEY="sk-ant-..."
# or
export GEMINI_API_KEY="..."

Usage

Interactive Mode

Terminal window
hermes
# or
hermes --interactive

Single Task Mode

Terminal window
hermes "Create a Python script that fetches weather data"

File-based Tasks

Terminal window
hermes --file task.md

With Specific Provider

Terminal window
hermes --provider anthropic --model claude-sonnet-4 "Review this code"

Common Workflows

Code Review

Terminal window
hermes "Review the src/ directory for potential bugs and suggest improvements"

Research Task

Terminal window
hermes "Research the latest React server components best practices and summarize findings"

Automation Script

Terminal window
hermes "Create a bash script that backs up all .md files to a dated folder"

Multi-step Project

Terminal window
hermes --file project-spec.md # File contains detailed project requirements

Advanced Features

Sub-agents

Hermes can spawn specialized sub-agents:

Terminal window
hermes "Create a React app with sub-agents for frontend, backend, and testing"

Skills

Enable pre-built skill packs:

config.yaml
skills:
- web_development
- data_analysis
- devops
- security

MCP Integration

Connect to Model Context Protocol servers:

mcp_servers:
filesystem:
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
git:
command: uvx
args: ["mcp-server-git"]

Provider-Specific Configuration

OpenAI

provider: openai
api_key: ${OPENAI_API_KEY}
model: gpt-4o
max_tokens: 4096
temperature: 0.7

Anthropic Claude

provider: anthropic
api_key: ${ANTHROPIC_API_KEY}
model: claude-sonnet-4-20250514
max_tokens: 8192

Google Gemini

provider: google
api_key: ${GEMINI_API_KEY}
model: gemini-2.5-pro
max_tokens: 8192

Groq

provider: groq
api_key: ${GROQ_API_KEY}
model: llama-3.3-70b-versatile

Comparison with Other Agents

FeatureHermesClaude CodeOpenCodeCodex
Terminal-based
Multi-provider
Sub-agents
Plugin system
Free tierPartialPaid onlyPartial

Troubleshooting

”No provider configured”

Set your API key:

Terminal window
export OPENAI_API_KEY="your-key-here"

“Rate limit exceeded”

  • Switch to a different provider
  • Add rate limiting to config: rate_limit: 10/minute
  • Use Groq for higher rate limits

”Tool not found”

Install required tool dependencies:

Terminal window
pip install hermes-agent[all-tools]
# or
npm install -g @hermes/agent-tools

Context too long

  • Switch to a model with larger context window
  • Use summarize: true in config
  • Clear conversation: hermes --reset

Best Practices

  1. Start with specific prompts - Clear instructions yield better results
  2. Use file mode for complex tasks - Write requirements in a .md file
  3. Enable auto-confirm carefully - Only in trusted environments
  4. Set iteration limits - Prevent runaway tasks with max_iterations
  5. Use sub-agents for parallel work - Faster completion of multi-part tasks

Resources