MCPInstall

hermes-agent-framework

Hermes Agent framework by Nous Research - self-improving AI agent with built-in learning loop, three-layer memory, and automatic skill evolution

Installs
222
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/reason-machines/hermes-skills --skill hermes-agent-framework
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads hermes-agent-framework automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Hermes Agent Framework

Skill by ara.so — Hermes Skills collection.

Hermes Agent is an open-source AI Agent framework by Nous Research that features a built-in self-improving learning loop, three-layer memory system (episodic, semantic, procedural), and automatic Skill creation and evolution. Unlike traditional agentic frameworks, Hermes continuously learns from interactions and builds up capabilities over time.

Installation

Prerequisites

  • Python 3.9+
  • API key for LLM provider (OpenAI, Anthropic, etc.)

Basic Installation

# Clone the repository
git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent

# Install dependencies
pip install -r requirements.txt

# Or install via pip (if published)
pip install hermes-agent

Configuration

Create a .env file in the project root:

# LLM Provider Configuration
OPENAI_API_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here

# Agent Configuration
HERMES_MODEL=gpt-4
HERMES_MEMORY_PATH=./memory
HERMES_SKILLS_PATH=./skills

Core Concepts

Three-Layer Memory System

  1. Episodic Memory: Stores conversation history and interaction sequences
  2. Semantic Memory: Long-term knowledge and facts extracted from experiences
  3. Procedural Memory: Skills and learned procedures (how to do things)

Learning Loop

Hermes operates in a continuous cycle:

  1. Perceive: Receive user input and context
  2. Reflect: Analyze what happened and extract learnings
  3. Learn: Update memory systems and create/modify Skills
  4. Act: Execute tasks using available tools and Skills

Skills

Skills are reusable capabilities that Hermes creates and refines automatically. They're stored as structured modules in the procedural memory.

Basic Usage

Starting a Hermes Agent

from hermes_agent import HermesAgent, Config

# Initialize configuration
config = Config(
    model="gpt-4",
    memory_path="./memory",
    skills_path="./skills",
    temperature=0.7
)

# Create agent instance
agent = HermesAgent(config)

# Start conversation
response = agent.chat("Help me analyze this CSV file and create visualizations")
print(response)

With Custom System Prompt

from hermes_agent import HermesAgent, Config

config = Config(
    model="claude-3-5-sonnet-20241022",
    system_prompt="""You are a specialized data analysis agent.
    Focus on statistical rigor and clear visualizations.
    Always explain your analytical choices."""
)

agent = HermesAgent(config)

Enabling Memory Persistence

from hermes_agent import HermesAgent, Config, MemoryConfig

memory_config = MemoryConfig(
    episodic_enabled=True,
    semantic_enabled=True,
    procedural_enabled=True,
    retention_days=90,
    auto_consolidate=True
)

config = Config(
    model="gpt-4",
    memory_config=memory_config
)

agent = HermesAgent(config)

# Memory is automatically saved and loaded
agent.chat("Remember that I prefer Python over JavaScript")
# Later sessions will recall this preference

Working with Skills

Creating a Custom Skill

from hermes_agent import Skill, SkillParameter

# Define a custom skill
web_scraper_skill = Skill(
    name="web_scraper",
    description="Scrape and extract structured data from websites",
    parameters=[
        SkillParameter(name="url", type="string", required=True),
        SkillParameter(name="selectors", type="object", required=False)
    ],
    implementation="""
import requests
from bs4 import BeautifulSoup

def execute(url, selectors=None):
    response = requests.get(url)
    soup = BeautifulSoup(response.content, 'html.parser')
    
    if selectors:
        results = {}
        for key, selector in selectors.items():
            results[key] = soup.select(selector)
        return results
    
    return soup.get_text()
"""
)

# Register skill with agent
agent.register_skill(web_scraper_skill)

Loading Skills from Directory

from hermes_agent import HermesAgent, Config

config = Config(
    model="gpt-4",
    skills_path="./my_custom_skills"
)

agent = HermesAgent(config)

# Agent automatically loads all skills from directory
# Skills are available for use in conversations

Skill Auto-Evolution

from hermes_agent import HermesAgent, Config, LearningConfig

learning_config = LearningConfig(
    auto_create_skills=True,
    skill_refinement=True,
    min_usage_for_creation=3  # Create skill after pattern used 3+ times
)

config = Config(
    model="gpt-4",
    learning_config=learning_config
)

agent = HermesAgent(config)

# As agent performs repeated tasks, it automatically creates reusable skills
agent.chat("Convert this JSON to CSV format")
agent.chat("Convert this other JSON to CSV")
agent.chat("And convert this JSON to CSV too")

# After 3rd usage, Hermes creates a "json_to_csv" skill automatically

Tool Integration

Registering External Tools

from hermes_agent import HermesAgent, Tool

def search_api(query: str) -> dict:
    """Search using external API"""
    import os
    import requests
    
    api_key = os.getenv("SEARCH_API_KEY")
    response = requests.get(
        "https://api.example.com/search",
        params={"q": query, "key": api_key}
    )
    return response.json()

# Register as tool
search_tool = Tool(
    name="web_search",
    description="Search the web for current information",
    function=search_api,
    parameters={
        "query": {"type": "string", "description": "Search query"}
    }
)

agent = HermesAgent(config)
agent.register_tool(search_tool)

Built-in Tool Categories

from hermes_agent import HermesAgent, Config, ToolConfig

tool_config = ToolConfig(
    enable_file_operations=True,
    enable_web_browsing=True,
    enable_code_execution=True,
    enable_shell_commands=False,  # Disabled by default for security
    allowed_domains=["*.example.com", "api.trusted.com"]
)

config = Config(
    model="gpt-4",
    tool_config=tool_config
)

agent = HermesAgent(config)

Multi-Agent Orchestration

Creating Agent Teams

from hermes_agent import HermesAgent, AgentTeam, Config

# Create specialized agents
researcher = HermesAgent(Config(
    model="gpt-4",
    system_prompt="You are a research specialist. Focus on gathering and analyzing information."
))

coder = HermesAgent(Config(
    model="claude-3-5-sonnet-20241022",
    system_prompt="You are a coding specialist. Write clean, efficient code."
))

writer = HermesAgent(Config(
    model="gpt-4",
    system_prompt="You are a technical writer. Create clear documentation."
))

# Create team
team = AgentTeam(
    agents=[researcher, coder, writer],
    coordinator=HermesAgent(Config(
        model="gpt-4",
        system_prompt="Coordinate agent activities and synthesize results."
    ))
)

# Execute team task
result = team.execute(
    "Research best practices for API design, implement a sample API, and document it"
)

Agent Communication

from hermes_agent import HermesAgent, AgentChannel

# Create communication channel
channel = AgentChannel()

agent_a = HermesAgent(config)
agent_b = HermesAgent(config)

# Connect agents to channel
agent_a.connect(channel)
agent_b.connect(channel)

# Agents can now share context and learnings
agent_a.chat("Learn about Python async patterns")
# agent_b automatically has access to what agent_a learned
agent_b.chat("Use async patterns to build a web scraper")

Advanced Configuration

Feedback Loop Customization

from hermes_agent import HermesAgent, Config, FeedbackConfig

feedback_config = FeedbackConfig(
    enable_self_critique=True,
    reflection_frequency="after_task",  # or "periodic", "never"
    quality_threshold=0.8,
    auto_correction=True
)

config = Config(
    model="gpt-4",
    feedback_config=feedback_config
)

agent = HermesAgent(config)

Constraints and Safety

from hermes_agent import HermesAgent, Config, ConstraintConfig

constraints = ConstraintConfig(
    max_iterations=10,
    timeout_seconds=300,
    max_tool_calls_per_turn=5,
    blocked_operations=["rm -rf", "DROP TABLE"],
    require_approval_for=["file_delete", "api_payment"]
)

config = Config(
    model="gpt-4",
    constraint_config=constraints
)

agent = HermesAgent(config)

Memory Management

from hermes_agent import HermesAgent, Config

config = Config(model="gpt-4")
agent = HermesAgent(config)

# Inspect memory
episodic = agent.memory.get_episodic(last_n=10)
semantic = agent.memory.get_semantic(topic="python programming")
skills = agent.memory.get_skills()

# Clear specific memory types
agent.memory.clear_episodic()  # Clear conversation history
agent.memory.clear_semantic(topic="outdated_info")

# Export/Import memory
agent.memory.export("backup.json")
agent.memory.import_from("backup.json")

Real-World Examples

Personal Knowledge Assistant

from hermes_agent import HermesAgent, Config, MemoryConfig, ToolConfig

memory_config = MemoryConfig(
    episodic_enabled=True,
    semantic_enabled=True,
    retention_days=365,
    auto_consolidate=True
)

tool_config = ToolConfig(
    enable_file_operations=True,
    enable_web_browsing=True
)

config = Config(
    model="gpt-4",
    memory_config=memory_config,
    tool_config=tool_config,
    system_prompt="""You are a personal knowledge assistant.
    Learn from all our interactions and help me recall information,
    make connections, and build on past conversations."""
)

agent = HermesAgent(config)

# Over time, agent builds up knowledge about user preferences, projects, etc.
agent.chat("I'm working on a new Python project for data analysis")
# Days later...
agent.chat("What was that project I mentioned last week?")

Development Automation Agent

from hermes_agent import HermesAgent, Config, ToolConfig, LearningConfig

tool_config = ToolConfig(
    enable_code_execution=True,
    enable_file_operations=True,
    enable_shell_commands=True
)

learning_config = LearningConfig(
    auto_create_skills=True,
    skill_refinement=True
)

config = Config(
    model="claude-3-5-sonnet-20241022",
    tool_config=tool_config,
    learning_config=learning_config,
    system_prompt="You are a development automation specialist."
)

agent = HermesAgent(config)

# Agent learns common development patterns and creates skills
agent.chat("Set up a new FastAPI project with PostgreSQL")
agent.chat("Add authentication with JWT")
agent.chat("Create CRUD endpoints for a User model")
# Agent creates reusable skills for these common patterns

Content Creation Pipeline

from hermes_agent import HermesAgent, AgentTeam, Config

researcher = HermesAgent(Config(
    model="gpt-4",
    system_prompt="Research topics and gather information.",
    tool_config=ToolConfig(enable_web_browsing=True)
))

writer = HermesAgent(Config(
    model="claude-3-5-sonnet-20241022",
    system_prompt="Create engaging, well-structured content."
))

editor = HermesAgent(Config(
    model="gpt-4",
    system_prompt="Review and refine content for clarity and quality."
))

team = AgentTeam(agents=[researcher, writer, editor])

# Automated content pipeline
result = team.execute(
    "Create a comprehensive blog post about Hermes Agent framework"
)

CLI Usage

If Hermes provides a command-line interface:

# Start interactive session
hermes chat

# With specific model
hermes chat --model gpt-4

# Load skills from directory
hermes chat --skills ./my_skills

# Enable debug mode
hermes chat --debug

# One-off command
hermes exec "analyze this CSV: data.csv"

# Manage memory
hermes memory export backup.json
hermes memory import backup.json
hermes memory clear --episodic

# List learned skills
hermes skills list

# Export a skill
hermes skills export web_scraper > web_scraper.py

Troubleshooting

Memory Not Persisting

# Ensure memory path is writable
import os
from hermes_agent import HermesAgent, Config

memory_path = "./hermes_memory"
os.makedirs(memory_path, exist_ok=True)

config = Config(
    model="gpt-4",
    memory_path=memory_path,
    auto_save=True  # Enable automatic saving
)

agent = HermesAgent(config)

Skills Not Loading

# Verify skills directory structure
from hermes_agent import HermesAgent, Config

config = Config(
    model="gpt-4",
    skills_path="./skills",
    debug=True  # Enable debug logging
)

agent = HermesAgent(config)

# Check loaded skills
print(agent.list_skills())

High Token Usage

from hermes_agent import HermesAgent, Config, MemoryConfig

# Optimize memory retrieval
memory_config = MemoryConfig(
    max_episodic_context=5,  # Limit conversation history
    semantic_relevance_threshold=0.7,  # Only retrieve relevant memories
    consolidation_frequency="daily"  # Compress old memories
)

config = Config(
    model="gpt-4",
    memory_config=memory_config,
    max_tokens=2000  # Limit response length
)

agent = HermesAgent(config)

Tool Execution Failures

from hermes_agent import HermesAgent, Config, ToolConfig

tool_config = ToolConfig(
    timeout_seconds=30,
    retry_attempts=3,
    error_handling="graceful",  # vs "strict"
    log_tool_calls=True
)

config = Config(
    model="gpt-4",
    tool_config=tool_config
)

agent = HermesAgent(config)

Rate Limiting Issues

from hermes_agent import HermesAgent, Config

config = Config(
    model="gpt-4",
    rate_limit_rpm=20,  # Requests per minute
    backoff_strategy="exponential",
    retry_on_rate_limit=True
)

agent = HermesAgent(config)

Best Practices

  1. Start Simple: Begin with basic configuration and add complexity as needed
  2. Enable Memory: Hermes's strength is learning over time - enable all memory systems
  3. Curate Skills: Review auto-created skills periodically and refine them
  4. Set Constraints: Always configure safety constraints for production use
  5. Monitor Token Usage: Use memory consolidation to manage costs
  6. Version Skills: Export and version control important skills
  7. Use Teams Wisely: Specialized agents work better than one generalist for complex tasks
  8. Provide Feedback: The more feedback in the loop, the better Hermes learns

Resources

FAQ

What does the hermes-agent-framework skill do?

Hermes Agent framework by Nous Research - self-improving AI agent with built-in learning loop, three-layer memory, and automatic skill evolution

How do I install hermes-agent-framework?

Run npx skills add https://github.com/reason-machines/hermes-skills --skill hermes-agent-framework in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/hermes-agent-framework/ (personal) or .claude/skills/hermes-agent-framework/ (project).

Which AI agents can use hermes-agent-framework?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is hermes-agent-framework safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains hermes-agent-framework?

It is published by reason-machines in reason-machines/hermes-skills. It has 222 recorded installs.

More from reason-machines/hermes-skills

View all →

hermes-agent-self-evolution

reason-machines/hermes-skills

Evolutionary self-improvement for Hermes Agent using DSPy + GEPA to optimize skills, prompts, and code

AI & Agents323 installs

hermes-webui-agent

reason-machines/hermes-skills

Expert in deploying, configuring, and using Hermes WebUI—a web interface for Hermes Agent with persistent memory, scheduled jobs, and multi-platform messaging.

267 installs

awesome-hermes-agent-ecosystem

reason-machines/hermes-skills

Open the skill to read its SKILL.md instructions.

232 installs

hermes-workspace-ai-agent-ui

reason-machines/hermes-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design213 installs

hermes-desktop-companion

reason-machines/hermes-skills

Desktop GUI companion for Hermes Agent - install, configure, chat with AI assistant featuring tool use, memory, skills, and multi-platform messaging

210 installs

hermes-web-ui-dashboard

reason-machines/hermes-skills

Open the skill to read its SKILL.md instructions.

Frontend & Design206 installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs