MCPcopy Create free account

hub / github.com/NousResearch/hermes-agent-self-evolution / functions

Functions195 in github.com/NousResearch/hermes-agent-self-evolution

↓ 43 callersFunction_contains_secret
Check if text contains potential API keys or tokens.
evolution/core/external_importers.py:78
↓ 20 callersFunction_validate_eval_example
Validate and normalize fields before creating an EvalExample. Returns: Dict of validated fields, or None if the example should be skipped
evolution/core/external_importers.py:83
↓ 20 callersMethodextract_messages
Read user/assistant message pairs from Copilot sessions. Args: limit: Maximum messages to return (0 = no limit). Returns
evolution/core/external_importers.py:225
↓ 11 callersFunction_parse_scoring_json
Extract a JSON object from LLM scoring output. Strategy: 1. Try direct json.loads (handles clean LLM output) 2. Fall back to regex ex
evolution/core/external_importers.py:546
↓ 10 callersFunctionbuild_dataset_from_external
Extract messages from external tools, filter for relevance, and save. This is the main entry point called by both the standalone CLI and evol
evolution/core/external_importers.py:606
↓ 10 callersMethodfilter_and_score
Filter messages by relevance and generate eval examples. Args: messages: Raw messages from importers. skill_name: Nam
evolution/core/external_importers.py:449
↓ 9 callersFunction_is_relevant_to_skill
Quick heuristic check if a message might be relevant to a skill. Uses keyword overlap between the message and skill description/name. This is
evolution/core/external_importers.py:121
↓ 6 callersFunctionload_skill
Load a skill file and parse its frontmatter + body. Returns: { "path": Path, "raw": str (full file content),
evolution/skills/skill_module.py:15
↓ 5 callersMethod_check_size
(self, text: str, artifact_type: str)
evolution/core/constraints.py:95
↓ 5 callersMethod_check_skill_structure
Check that a skill file has valid YAML frontmatter and markdown body.
evolution/core/constraints.py:150
↓ 5 callersFunction_load_skill_text
Load skill text from the installed Hermes skills directory. This is used by the standalone CLI only. When called via evolve_skill.py, skill l
evolution/core/external_importers.py:696
↓ 5 callersMethodload
Load dataset splits from JSONL files.
evolution/core/dataset_builder.py:63
↓ 4 callersMethod_check_growth
(self, text: str, baseline: str, artifact_type: str)
evolution/core/constraints.py:119
↓ 4 callersMethod_check_non_empty
(self, text: str)
evolution/core/constraints.py:136
↓ 4 callersFunction_parse_copilot_events
Parse a single Copilot events.jsonl into user/assistant pairs.
evolution/core/external_importers.py:273
↓ 4 callersFunction_read_copilot_workspace
Extract cwd from a Copilot workspace.yaml file.
evolution/core/external_importers.py:260
↓ 4 callersFunctionreassemble_skill
Reassemble a skill file from frontmatter and evolved body. Preserves the original YAML frontmatter (name, description, metadata) and replaces
evolution/skills/skill_module.py:117
↓ 4 callersFunctionresolve_hermes_agent_path
Return the hermes-agent repo path, honoring an explicit override. An explicit path (for example from ``--hermes-repo``) is expanded and used
evolution/core/config.py:91
↓ 4 callersMethodvalidate_all
Run all applicable constraints. Returns list of results.
evolution/core/constraints.py:30
↓ 3 callersFunction_parse_score
Parse a score value, handling various LLM output formats.
evolution/core/fitness.py:139
↓ 3 callersMethodfrom_dict
(cls, d: dict)
evolution/core/dataset_builder.py:39
↓ 3 callersMethodto_dict
(self)
evolution/core/dataset_builder.py:29
↓ 3 callersMethodto_dspy_examples
Convert a split to DSPy Example objects.
evolution/core/dataset_builder.py:77
↓ 2 callersFunctionget_hermes_agent_path
Discover the hermes-agent repo path. Priority: 1. HERMES_AGENT_REPO env var 2. ~/.hermes/hermes-agent (standard install location) 3.
evolution/core/config.py:63
↓ 2 callersMethodsave
Save dataset splits to JSONL files.
evolution/core/dataset_builder.py:54
↓ 2 callersFunctionskill_fitness_metric
DSPy-compatible metric function for skill optimization. This is what gets passed to dspy.GEPA(metric=...). Returns a float 0-1 score.
evolution/core/fitness.py:107
↓ 1 callersFunction_discover_hermes_agent_path
Best-effort hermes-agent repo discovery that never raises. Returns the discovered path, or None when no repo can be found. Used as the Evolut
evolution/core/config.py:50
↓ 1 callersFunction_make_skill_repo
Create a minimal hermes-agent-style repo with one skill.
tests/core/test_config_repo_path.py:23
↓ 1 callersFunctionbuild_report
(output_path: str = "reports/phase1_validation_report.pdf")
generate_report.py:16
↓ 1 callersFunctionevolve
Main evolution function — orchestrates the full optimization loop.
evolution/skills/evolve_skill.py:36
↓ 1 callersFunctionfind_skill
Find a skill by name in the hermes-agent skills directory. Searches recursively for a SKILL.md in a directory matching the skill name.
evolution/skills/skill_module.py:58
↓ 1 callersMethodgenerate
Generate a full eval dataset with train/val/holdout splits.
evolution/core/dataset_builder.py:115
↓ 1 callersFunctionmain
Import external session data into golden eval datasets for self-evolution.
evolution/core/external_importers.py:743
↓ 1 callersFunctionmain
Evolve a Hermes Agent skill using DSPy + GEPA optimization.
evolution/skills/evolve_skill.py:306
Method__init__
(self, config: EvolutionConfig)
evolution/core/dataset_builder.py:111
Method__init__
(self, model: str)
evolution/core/external_importers.py:445
Method__init__
(self, config: EvolutionConfig)
evolution/core/constraints.py:27
Method__init__
(self, config: EvolutionConfig)
evolution/core/fitness.py:60
Method__init__
(self, skill_text: str)
evolution/skills/skill_module.py:104
Methodall_examples
(self)
evolution/core/dataset_builder.py:51
Methodcomposite
Weighted composite score.
evolution/core/fitness.py:24
Methodextract_messages
Read user messages from Claude Code history. Args: limit: Maximum messages to return (0 = no limit). Returns:
evolution/core/external_importers.py:168
Methodextract_messages
Read user/assistant pairs from Hermes session files. Args: limit: Maximum messages to return (0 = no limit). Returns:
evolution/core/external_importers.py:349
Methodforward
(self, task_input: str)
evolution/skills/skill_module.py:109
Methodload
Load a golden dataset. If no splits exist, auto-split the single file.
evolution/core/dataset_builder.py:176
Methodmock_dspy
Mock dspy.LM and dspy.context to avoid real LLM calls.
tests/core/test_external_importers.py:594
Methodmock_dspy
(self)
tests/core/test_external_importers.py:1039
Methodrun_test_suite
Run the full hermes-agent test suite. Must pass 100%.
evolution/core/constraints.py:55
Methodscore
Score an agent output using LLM-as-judge.
evolution/core/fitness.py:64
Methodtest_acceptable_growth
(self, validator)
tests/core/test_constraints.py:34
Methodtest_all_valid_difficulties_accepted
(self)
tests/core/test_external_importers.py:1003
Methodtest_builds_dataset_with_splits
Verify end-to-end: import -> filter -> split -> save.
tests/core/test_external_importers.py:696
Methodtest_category_stripped
(self)
tests/core/test_external_importers.py:1030
Methodtest_clean_json
(self)
tests/core/test_external_importers.py:208
Functiontest_cli_dry_run_honors_explicit_repo
`evolve_skill --hermes-repo <path> --dry-run` must work when the default location is absent. This is the exact scenario the bug broke.
tests/core/test_config_repo_path.py:85
Functiontest_config_constructs_without_repo
A bare EvolutionConfig() must not raise when no repo is present.
tests/core/test_config_repo_path.py:64
Functiontest_config_preserves_explicit_path
An explicitly supplied path is kept as-is, never overwritten by discovery.
tests/core/test_config_repo_path.py:75
Methodtest_detects_anthropic_key
(self)
tests/core/test_external_importers.py:51
Methodtest_detects_aws_access_key
(self)
tests/core/test_external_importers.py:142
Methodtest_detects_aws_secret_env_var
(self)
tests/core/test_external_importers.py:149
Methodtest_detects_bearer_token
(self)
tests/core/test_external_importers.py:72
Methodtest_detects_database_url_env_var
(self)
tests/core/test_external_importers.py:152
Methodtest_detects_env_var_anthropic
(self)
tests/core/test_external_importers.py:75
Methodtest_detects_env_var_openai
(self)
tests/core/test_external_importers.py:78
Methodtest_detects_github_pat
(self)
tests/core/test_external_importers.py:57
Methodtest_detects_github_token_env_var
(self)
tests/core/test_external_importers.py:139
Methodtest_detects_github_user_token
(self)
tests/core/test_external_importers.py:60
Methodtest_detects_long_sk_prefix
(self)
tests/core/test_external_importers.py:81
Methodtest_detects_notion_token
(self)
tests/core/test_external_importers.py:69
Methodtest_detects_openrouter_env_var
(self)
tests/core/test_external_importers.py:133
Methodtest_detects_openrouter_key
(self)
tests/core/test_external_importers.py:54
Methodtest_detects_password_assignment
(self)
tests/core/test_external_importers.py:108
Methodtest_detects_pem_private_key
(self)
tests/core/test_external_importers.py:145
Methodtest_detects_secret_assignment
(self)
tests/core/test_external_importers.py:112
Methodtest_detects_slack_app_token
(self)
tests/core/test_external_importers.py:66
Methodtest_detects_slack_bot_token
(self)
tests/core/test_external_importers.py:63
Methodtest_detects_slack_bot_token_env_var
(self)
tests/core/test_external_importers.py:136
Methodtest_detects_token_assignment_long_value
(self)
tests/core/test_external_importers.py:116
Methodtest_difficulty_case_insensitive
(self)
tests/core/test_external_importers.py:995
Methodtest_difficulty_stripped
(self)
tests/core/test_external_importers.py:999
Methodtest_direct_parse_fast_path
Clean JSON should be parsed directly without regex fallback.
tests/core/test_external_importers.py:229
Methodtest_dry_run
(self, tmp_path)
tests/core/test_external_importers.py:1155
Methodtest_empty_category_defaults_to_general
(self)
tests/core/test_external_importers.py:1008
Methodtest_empty_difficulty_defaults_to_medium
(self)
tests/core/test_external_importers.py:987
Methodtest_empty_events_file
(self, tmp_path)
tests/core/test_external_importers.py:414
Methodtest_empty_expected_behavior_drops_example
LLM returns relevant=True but empty expected_behavior -> example dropped.
tests/core/test_external_importers.py:1045
Methodtest_empty_expected_behavior_returns_none
(self)
tests/core/test_external_importers.py:974
Methodtest_empty_fails
(self, validator)
tests/core/test_constraints.py:58
Methodtest_empty_skill_fails
(self, validator)
tests/core/test_constraints.py:95
Methodtest_empty_string_returns_none
(self)
tests/core/test_external_importers.py:250
Methodtest_empty_task_input_returns_none
(self)
tests/core/test_external_importers.py:965
Methodtest_evolved_body_replaces_original
(self)
tests/skills/test_skill_module.py:86
Methodtest_excessive_growth
(self, validator)
tests/core/test_constraints.py:40
Methodtest_expected_behavior_stripped
(self)
tests/core/test_external_importers.py:1026
Methodtest_filters_secrets
(self, tmp_path)
tests/core/test_external_importers.py:508
Methodtest_filters_secrets_from_copilot
(self, tmp_path)
tests/core/test_external_importers.py:349
Methodtest_full_pipeline_with_copilot_events
Create real Copilot events, import, filter (mocked), save, reload.
tests/core/test_external_importers.py:865
Methodtest_golden_jsonl_format
Verify output matches GoldenDatasetLoader expected format.
tests/core/test_external_importers.py:1218
Methodtest_handles_malformed_json
(self, tmp_path)
tests/core/test_external_importers.py:526
Methodtest_handles_missing_dir
(self, tmp_path)
tests/core/test_external_importers.py:367
next →1–100 of 195, ranked by callers