MCPcopy Index your code
hub / github.com/NousResearch/hermes-agent-self-evolution

github.com/NousResearch/hermes-agent-self-evolution @main sqlite

repository ↗ · DeepWiki ↗
238 symbols 763 edges 22 files 84 documented · 35%
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

# 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 suitepytest 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

Core symbols most depended-on inside this repo

_contains_secret
called by 43
evolution/core/external_importers.py
_validate_eval_example
called by 20
evolution/core/external_importers.py
extract_messages
called by 20
evolution/core/external_importers.py
_parse_scoring_json
called by 11
evolution/core/external_importers.py
filter_and_score
called by 10
evolution/core/external_importers.py
build_dataset_from_external
called by 10
evolution/core/external_importers.py
_is_relevant_to_skill
called by 9
evolution/core/external_importers.py
load_skill
called by 6
evolution/skills/skill_module.py

Shape

Method 167
Class 42
Function 28
Route 1

Languages

Python100%

Modules by API surface

tests/core/test_external_importers.py135 symbols
tests/core/test_constraints.py22 symbols
evolution/core/external_importers.py20 symbols
evolution/core/dataset_builder.py14 symbols
tests/skills/test_skill_module.py9 symbols
evolution/core/constraints.py9 symbols
evolution/core/fitness.py8 symbols
tests/core/test_config_repo_path.py7 symbols
evolution/skills/skill_module.py7 symbols
evolution/core/config.py4 symbols
evolution/skills/evolve_skill.py2 symbols
generate_report.py1 symbols

Dependencies from manifests, versioned

click8.0 · 1×
dspy3.0.0 · 1×
openai1.0.0 · 1×
pyyaml6.0 · 1×
rich13.0 · 1×

Datastores touched

dbDatabase · 1 repos

For agents

$ claude mcp add hermes-agent-self-evolution \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact