MCPcopy Create free account
hub / github.com/NousResearch/hermes-agent-self-evolution / EvolutionConfig

Class EvolutionConfig

evolution/core/config.py:10–47  ·  view source on GitHub ↗

Configuration for a self-evolution optimization run.

Source from the content-addressed store, hash-verified

8
9@dataclass
10class EvolutionConfig:
11 """Configuration for a self-evolution optimization run."""
12
13 # hermes-agent repo path. Discovered lazily and non-fatally so the config
14 # can be constructed even when no repo is present (e.g. unit tests, or
15 # callers that pass an explicit path). Use resolve_hermes_agent_path() when
16 # an explicit override should win, or get_hermes_agent_path() to require one.
17 hermes_agent_path: Optional[Path] = field(default_factory=lambda: _discover_hermes_agent_path())
18
19 # Optimization parameters
20 iterations: int = 10
21 population_size: int = 5
22
23 # LLM configuration
24 optimizer_model: str = "openai/gpt-4.1" # Model for GEPA reflections
25 eval_model: str = "openai/gpt-4.1-mini" # Model for LLM-as-judge scoring
26 judge_model: str = "openai/gpt-4.1" # Model for dataset generation
27
28 # Constraints
29 max_skill_size: int = 15_000 # 15KB default
30 max_tool_desc_size: int = 500 # chars
31 max_param_desc_size: int = 200 # chars
32 max_prompt_growth: float = 0.2 # 20% max growth over baseline
33
34 # Eval dataset
35 eval_dataset_size: int = 20 # Total examples to generate
36 train_ratio: float = 0.5
37 val_ratio: float = 0.25
38 holdout_ratio: float = 0.25
39
40 # Benchmark gating
41 run_pytest: bool = True
42 run_tblite: bool = False # Expensive — opt-in
43 tblite_regression_threshold: float = 0.02 # Max 2% regression allowed
44
45 # Output
46 output_dir: Path = field(default_factory=lambda: Path("./output"))
47 create_pr: bool = True
48
49
50def _discover_hermes_agent_path() -> Optional[Path]:

Callers 4

validatorFunction · 0.90
evolveFunction · 0.90

Calls 1

Tested by 3

validatorFunction · 0.72