Hermes Agent Self-Evolution
An official Nous Research project that 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 agents through reflective evolutionary search.

What Is It
Hermes Agent Self-Evolution is an official Nous Research project that makes Hermes Agent improve itself. It uses DSPy + GEPA (Genetic-Pareto Prompt Evolution, an ICLR 2026 Oral paper) to automatically evolve and optimize the agent’s skills, tool descriptions, system prompts, and code — producing measurably better versions through reflective evolutionary search.
The key insight: instead of manually tuning prompts, the system reads execution traces to understand why things fail (not just that they failed), then proposes targeted improvements and evaluates them automatically.
No GPU training required. Everything operates via API calls — mutating text, evaluating results, and selecting the best variants. A typical optimization run costs around $2–10.
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
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: DSPy + GEPA for reflective prompt evolution; Darwinian Evolver for code evolution with Git-based organism tracking.
Guardrails: a full test suite (pytest tests/ -q) must pass 100%, and size limits are enforced (skills ≤15KB, tool descriptions ≤500 chars) so evolved variants never regress quality.
Quick Start
git clone https://github.com/NousResearch/hermes-agent-self-evolution.git
cd hermes-agent-self-evolution
pip install -r requirements.txt
# Configure your LLM API, then run an evolution pass over a skill
python evolve.py --target skill --name my-skill
Why It Matters for Hermes Users
Hermes Agent already writes and saves its own skills from experience. Self-Evolution takes that further: it applies a rigorous, automated optimization loop — with constraint gates and test suites — so skills, prompts, and eventually code improve measurably over time. It’s the most direct example of the project’s “the agent that grows with you” philosophy, and it runs entirely on API calls, so any Hermes user can try it without owning a GPU.