hermes-agent-self-evolution  by NousResearch

Evolutionary optimization for AI agent components

Created 1 month ago
839 stars

Top 42.3% on SourcePulse

GitHubView on GitHub
Project Summary

This repository offers an automated system for the evolutionary self-improvement of the Hermes Agent, focusing on optimizing its skills, prompts, and code. It targets developers and users within the Hermes Agent ecosystem seeking enhanced agent performance. The primary benefit is achieving measurably better agent versions through reflective evolutionary search, operating entirely via API calls without requiring GPU training, with estimated costs of $2-10 per optimization run.

How It Works

The project employs DSPy combined with GEPA (Genetic-Pareto Prompt Evolution) to drive an evolutionary search process. It iteratively mutates text-based components like skills, tool descriptions, and system prompts. Candidate variants are generated, evaluated against execution traces and defined guardrails, and the best performing ones are selected. This approach allows the system to understand why failures occur and propose targeted improvements, operating via API calls for mutation and evaluation.

Quick Start & Requirements

  • Installation: Clone the repository, navigate into the directory, and install using pip install -e ".[dev]".
  • Prerequisites: Set the HERMES_AGENT_REPO environment variable to point to your hermes-agent repository (e.g., export HERMES_AGENT_REPO=~/.hermes/hermes-agent).
  • Execution: Run skill evolution with synthetic data via python -m evolution.skills.evolve_skill --skill github-code-review --iterations 10 --eval-source synthetic, or use real session history with --eval-source sessiondb.
  • Documentation: A comprehensive plan is available at PLAN.md.

Highlighted Details

  • Optimization Targets: Currently implements optimization for Skill files (SKILL.md) using DSPy + GEPA. Tool descriptions, system prompt sections, and tool implementation code are planned for future phases.
  • Engines: Utilizes DSPy + GEPA (MIT License) for reflective prompt evolution based on execution traces. A "Darwinian Evolver" is planned for code evolution, licensed under AGPL v3 (external CLI only).
  • Guardrails: All evolved variants must pass a full pytest suite, adhere to size limits (Skills ≤15KB, tool descriptions ≤500 chars), maintain caching compatibility, ensure semantic preservation, and undergo human review via Pull Requests.

Maintenance & Community

The project is associated with Nous Research and has been presented at ICLR 2026. No specific community links (Discord, Slack) or details on active maintenance beyond the planned phases are provided in the README.

Licensing & Compatibility

The core project and its DSPy + GEPA engine are released under the permissive MIT License, suitable for commercial use. However, the planned "Darwinian Evolver" component carries an AGPL v3 license, which may impose copyleft restrictions if integrated or modified, particularly concerning its use as an external CLI.

Limitations & Caveats

Phases 2 through 5, covering optimization of tool descriptions, system prompts, tool code, and establishing a continuous improvement loop, are currently planned but not yet implemented. The AGPL v3 license of the Darwinian Evolver may present compatibility challenges for some commercial applications. All code changes require human review via PR before merging.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
10
Issues (30d)
6
Star History
665 stars in the last 30 days

Explore Similar Projects

Starred by Bryan Helmig Bryan Helmig(Cofounder of Zapier) and Jared Palmer Jared Palmer(SVP at GitHub; Founder of Turborepo; Author of Formik, TSDX).

dspyground by karthikscale3

0.3%
307
Optimize AI agent prompts with DSPy GEPA
Created 6 months ago
Updated 2 months ago
Starred by Zhiqiang Xie Zhiqiang Xie(Coauthor of SGLang), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
3 more.

Trace by microsoft

1.9%
728
AutoDiff-like tool for end-to-end AI agent training with general feedback
Created 1 year ago
Updated 4 months ago
Starred by Shyamal Anadkat Shyamal Anadkat(Research Scientist at OpenAI), Will Brown Will Brown(Research Lead at Prime Intellect), and
2 more.

gepa by gepa-ai

4.4%
3k
AI-driven evolution for system text components
Created 8 months ago
Updated 1 day ago
Feedback? Help us improve.