Skip to content

About

βš’ Evolutionary self-improvement for Hermes Agent β€” optimize skills, prompts, and code using DSPy + GEPA

Resources

Stars

5.7k stars

Watchers

51 watching

Forks

Latest commit

Β 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧬 Hermes Agent Self-Evolution

Evolutionary self-improvement for Hermes Agent.

Hermes Agent Self-Evolution uses DSPy + GEPA (Genetic-Pareto Prompt Evolution) to automatically evolve and optimize Hermes Agent's skills, tool descriptions, system prompts, and code β€” producing measurably better versions through reflective evolutionary search.

No GPU training required. Everything operates via API calls β€” mutating text, evaluating results, and selecting the best variants. ~$2-10 per optimization run.

How It Works

Read current skill/prompt/tool ──► Generate eval dataset
                                        β”‚
                                        β–Ό
                                   GEPA Optimizer ◄── Execution traces
                                        β”‚                    β–²
                                        β–Ό                    β”‚
                                   Candidate variants ──► Evaluate
                                        β”‚
                                   Constraint gates (tests, size limits, benchmarks)
                                        β”‚
                                        β–Ό
                                   Best variant ──► PR against hermes-agent

GEPA reads execution traces to understand why things fail (not just that they failed), then proposes targeted improvements. ICLR 2026 Oral, MIT licensed.

Quick Start

# Install
git clone https://github.com/NousResearch/hermes-agent-self-evolution.git
cd hermes-agent-self-evolution
pip install -e ".[dev]"

# Point at your hermes-agent repo
export HERMES_AGENT_REPO=~/.hermes/hermes-agent

# Evolve a skill (synthetic eval data)
python -m evolution.skills.evolve_skill \
    --skill github-code-review \
    --iterations 10 \
    --eval-source synthetic

# Or use real session history from Claude Code, Copilot, and Hermes
python -m evolution.skills.evolve_skill \
    --skill github-code-review \
    --iterations 10 \
    --eval-source sessiondb

What It Optimizes

Phase Target Engine Status
Phase 1 Skill files (SKILL.md) DSPy + GEPA βœ… Implemented
Phase 2 Tool descriptions DSPy + GEPA πŸ”² Planned
Phase 3 System prompt sections DSPy + GEPA πŸ”² Planned
Phase 4 Tool implementation code Darwinian Evolver πŸ”² Planned
Phase 5 Continuous improvement loop Automated pipeline πŸ”² Planned

Engines

Engine What It Does License
DSPy + GEPA Reflective prompt evolution β€” reads execution traces, proposes targeted mutations MIT
Darwinian Evolver Code evolution with Git-based organisms AGPL v3 (external CLI only)

Guardrails

Every evolved variant must pass:

  1. Full test suite β€” pytest tests/ -q must pass 100%
  2. Size limits β€” Skills ≀15KB, tool descriptions ≀500 chars
  3. Caching compatibility β€” No mid-conversation changes
  4. Semantic preservation β€” Must not drift from original purpose
  5. PR review β€” All changes go through human review, never direct commit

Full Plan

See PLAN.md for the complete architecture, evaluation data strategy, constraints, benchmarks integration, and phased timeline.

License

MIT β€” Β© 2026 Nous Research

About

βš’ Evolutionary self-improvement for Hermes Agent β€” optimize skills, prompts, and code using DSPy + GEPA

Resources

Stars

5.7k stars

Watchers

51 watching

Forks

Releases

Packages

Contributors

Languages