NousResearch /hermes-agent-self-evolution
⚒ Evolutionary self-improvement for Hermes Agent — optimize skills, prompts, and code using DSPy + GEPA
★ 5,715⑂ 705👁 51⑃ 167● 36▤ 0
More from this author
+9
Daily
5,715
stars
705
forks
51
watchers
167
prs
36
issues
0
releases
README
🧬 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
bash
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 rTop issues
#93Bug: skill_structure validator always fails — passes evolved_body without frontmatter4 comments · 2026-05-27#141Skill evolution is a no-op: optimized_module.skill_text is the unchanged baseline3 comments · 2026-06-30#54Implement all-agent session ingestion and promotion gates3 comments · 2026-05-08#200Optimizer deletes critical incident-lesson content and scores higher — growth limit can't catch deletions2 comments · 2026-10-24#38Phase 1 SkillModule architecture prevents GEPA from mutating actual skill content + Nous API integration patches2 comments · 2026-04-24#37Project appears stalled — 19 PRs pending, no commits since March 92 comments · 2026-04-24#34Bug: validate_all checks evolved_body instead of evolved_full, causing all evolved skills to fail skill_structure2 comments · 2026-04-23#18Is the hermes-agent-self-evolution project integrated into hermes-agent?2 comments · 2026-04-13