๐Ÿงฌ Hermes Agent Self-Evolution

March 29, 2026 ยท View on GitHub

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

PhaseTargetEngineStatus
Phase 1Skill files (SKILL.md)DSPy + GEPAโœ… Implemented
Phase 2Tool descriptionsDSPy + GEPA๐Ÿ”ฒ Planned
Phase 3System prompt sectionsDSPy + GEPA๐Ÿ”ฒ Planned
Phase 4Tool implementation codeDarwinian Evolver๐Ÿ”ฒ Planned
Phase 5Continuous improvement loopAutomated pipeline๐Ÿ”ฒ Planned

Engines

EngineWhat It DoesLicense
DSPy + GEPAReflective prompt evolution โ€” reads execution traces, proposes targeted mutationsMIT
Darwinian EvolverCode evolution with Git-based organismsAGPL 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