[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KQSPNHNV5MWMP23K0EW4YP":3,"skill-same:01M6KQSPNHNV5MWMP23K0EW4YP":115},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":61,"commitSha":62,"skillDirectory":63,"forksCount":13,"repositoryHtmlUrl":64,"repositoryHomepageUrl":6,"ownerHtmlUrl":65,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":66,"install":67,"resources":80},"01M6KQSPNHNV5MWMP23K0EW4YP","evolving-ai-agents",null,"Provides guidance for automatically evolving and optimizing AI agents across any domain using LLM-driven evolution algorithms. Use when building self-improving agents, optimizing agent prompts and skills against benchmarks, or implementing automated agent evaluation loops.","endman100\u002Fskill-router-nexus","endman100","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F31997019?v=4","01M6KPDX17BYDWW4RRB0TNGGMX","01M6KPDX64Y2QBEWVFG5W5PWPF",0,"MIT","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"ai agents","evolving ai agents","self","when","for","implementing","lab","self-improving","loops","Prompt Optimization","across","algorithms","agentic","domain","skill discovery","evolve","discovery","Evaluation","Optimization","benchmark","agentic ai","2026-11-10 10:12:30",false,"---\nname: evolving-ai-agents\ndescription: Provides guidance for automatically evolving and optimizing AI agents across any domain using LLM-driven evolution algorithms. Use when building self-improving agents, optimizing agent prompts and skills against benchmarks, or implementing automated agent evaluation loops.\nversion: 1.0.0\nauthor: A-EVO Lab\nlicense: MIT\ntags: [Agent Evolution, Self-Improving Agents, Prompt Optimization, LLM, Benchmark Evaluation, Skill Discovery, Agentic AI]\ndependencies: [a-evolve>=0.1.0, pyyaml>=6.0]\n---\n\n# Evolving AI Agents with A-Evolve\n\n## Overview\n\nA-Evolve is universal infrastructure for evolving any AI agent across any domain using any evolution algorithm with zero manual engineering. It represents all evolvable agent state as files (prompts, skills, memory, tools), runs iterative solve-observe-evolve cycles against benchmarks, and uses LLM-driven mutation to improve agent performance automatically.\n\n**Benchmark results** (Claude Opus 4.6):\n- MCP-Atlas: 79.4% (#1)\n- SWE-bench Verified: 76.8% (~#5)\n- Terminal-Bench 2.0: 76.5% (~#7)\n- SkillsBench: 34.9% (#2)\n\n## When to Use A-Evolve\n\n**Use A-Evolve when:**\n- Optimizing agent prompts, skills, or memory against a measurable benchmark\n- Building self-improving agents with automated gating and rollback\n- Evolving domain-specific tool usage and procedures through LLM-driven mutation\n- Running iterative solve-observe-evolve loops to maximize agent performance\n- Needing reproducible, git-versioned evolution history for every change\n\n**Key differentiator**: Other frameworks _build_ agents; A-Evolve _optimizes_ them. It sits on top of any agent framework and makes it better through automated evolution.\n\n**Do NOT use A-Evolve for:**\n- Building multi-agent orchestration from scratch (use CrewAI, LangGraph)\n- One-shot agent tasks with no iteration needed (use LangChain, LlamaIndex)\n- RAG pipeline optimization (use LlamaIndex, Chroma)\n- Prompt-only optimization without skill\u002Fmemory evolution (use DSPy)\n\n## Quick Start\n\n### Installation\n\n```bash\npip install a-evolve                    # Core\npip install a-evolve[anthropic]         # With Claude support\npip install a-evolve[all]               # All providers\n```\n\n### Three-Line Evolution\n\n```python\nimport agent_evolve as ae\n\nevolver = ae.Evolver(agent=\"swe\", benchmark=\"swe-verified\")\nresults = evolver.run(cycles=10)\nprint(f\"Final score: {results.final_score}\")\n```\n\nThis copies the built-in SWE seed workspace, runs 10 evolution cycles against SWE-bench Verified, and returns the optimized agent.\n\n## Core Concepts\n\n### The Agent Workspace\n\nAll evolvable state lives as files in a workspace directory:\n\n```\nmy-agent\u002F\n├── manifest.yaml          # Metadata + entrypoint\n├── prompts\u002F\n│   ├── system.md          # Main system prompt (evolved)\n│   └── fragments\u002F         # Modular prompt pieces\n├── skills\u002F\n│   └── skill-name\u002F\n│       └── SKILL.md       # Reusable procedure with frontmatter\n├── memory\u002F\n│   ├── episodic.jsonl     # Lessons from failures\n│   └── semantic.jsonl     # General knowledge\n├── tools\u002F\n│   ├── registry.yaml      # Tool manifest\n│   └── tool_name.py       # Tool implementations\n└── evolution\u002F             # Managed by engine (metrics, history)\n```\n\n### The Evolution Loop\n\nEach cycle follows five phases:\n\n1. **Solve** — Agent processes a batch of tasks from the benchmark\n2. **Observe** — Benchmark evaluates trajectories, producing (task, trajectory, feedback) triples\n3. **Evolve** — Evolution engine mutates workspace files based on observations\n4. **Gate** — Validate mutations (git snapshot before\u002Fafter for rollback)\n5. **Reload** — Agent reinitializes from evolved filesystem state\n\n### Three Pluggable Interfaces\n\n```python\n# 1. Agent — implements solve()\nclass MyAgent(ae.BaseAgent):\n    def solve(self, task: ae.Task) -> ae.Trajectory:\n        # Domain-specific solving logic\n        return ae.Trajectory(task_id=task.id, output=result, steps=steps)\n\n# 2. Benchmark — implements get_tasks() and evaluate()\nclass MyBenchmark(ae.BenchmarkAdapter):\n    def get_tasks(self, split=\"train\", limit=None) -> list[ae.Task]:\n        return [ae.Task(id=\"1\", input=\"...\")]\n\n    def evaluate(self, task: ae.Task, trajectory: ae.Trajectory) -> ae.Feedback:\n        return ae.Feedback(success=True, score=0.95, detail=\"Passed\")\n\n# 3. Engine — implements step()\nclass MyEngine(ae.EvolutionEngine):\n    def step(self, workspace, observations, history, trial):\n        # Mutate workspace based on observations\n        return ae.StepResult(mutated=True, summary=\"Updated prompts\")\n```\n\n## Workflow 1: Evolve an Existing Agent\n\n**Use when**: You have a working agent and want to optimize it against a benchmark.\n\n**Critical Requirements:**\n- [ ] Agent implements `BaseAgent.solve()` returning `Trajectory`\n- [ ] Benchmark implements `BenchmarkAdapter` with `get_tasks()` and `evaluate()`\n- [ ] Seed workspace has `manifest.yaml` with entrypoint and evolvable layers\n- [ ] System prompt exists at `prompts\u002Fsystem.md`\n- [ ] Workspace is a git repo (run `git init && git add -A && git commit -m \"init\"`)\n\n### Steps\n\n```python\nimport agent_evolve as ae\n\n# Configure evolution parameters\nconfig = ae.EvolveConfig(\n    batch_size=10,           # Tasks per solve round\n    max_cycles=20,           # Maximum evolution iterations\n    evolve_prompts=True,     # Mutate system prompt\n    evolve_skills=True,      # Discover and refine skills\n    evolve_memory=True,      # Build episodic memory\n    evolver_model=\"us.anthropic.claude-opus-4-6-v1\",\n)\n\n# Point to your agent workspace and benchmark\nevolver = ae.Evolver(\n    agent=\".\u002Fmy-agent-workspace\",\n    benchmark=\"swe-verified\",     # Or custom BenchmarkAdapter instance\n    config=config,\n)\n\n# Run evolution\nresults = evolver.run(cycles=10)\n\n# Inspect results\nprint(f\"Cycles completed: {results.cycles_completed}\")\nprint(f\"Final score: {results.final_score}\")\nprint(f\"Converged: {results.converged}\")\nfor cycle_num, score in enumerate(results.score_history):\n    print(f\"  Cycle {cycle_num + 1}: {score:.3f}\")\n```\n\n### Post-Evolution\n\nThe workspace is now optimized. Inspect what changed:\n\n```bash\ncd my-agent-workspace\ngit log --oneline              # See evo-1, evo-2, ... tags\ngit diff evo-1 evo-10          # Compare first and last evolution\ncat prompts\u002Fsystem.md          # Read evolved prompt\nls skills\u002F                     # See discovered skills\n```\n\n## Workflow 2: Add a Custom Benchmark\n\n**Use when**: You want to evolve agents on your own domain-specific tasks.\n\n**Critical Requirements:**\n- [ ] Define task format (inputs, expected outputs)\n- [ ] Implement scoring logic (0.0–1.0 scale)\n- [ ] Prepare task dataset (train + holdout split)\n\n### Steps\n\n```python\nimport agent_evolve as ae\n\nclass CodeReviewBenchmark(ae.BenchmarkAdapter):\n    \"\"\"Evaluate agents on code review quality.\"\"\"\n\n    def get_tasks(self, split=\"train\", limit=None):\n        tasks = load_review_dataset(split)\n        if limit:\n            tasks = tasks[:limit]\n        return [\n            ae.Task(id=t[\"id\"], input=t[\"diff\"], metadata={\"expected\": t[\"comments\"]})\n            for t in tasks\n        ]\n\n    def evaluate(self, task, trajectory):\n        expected = task.metadata[\"expected\"]\n        actual = trajectory.output\n        precision, recall = compute_review_metrics(expected, actual)\n        f1 = 2 * precision * recall \u002F (precision + recall + 1e-9)\n        return ae.Feedback(\n            success=f1 > 0.7,\n            score=f1,\n            detail=f\"P={precision:.2f} R={recall:.2f} F1={f1:.2f}\",\n        )\n\n# Use with any agent\nevolver = ae.Evolver(agent=\".\u002Fmy-agent\", benchmark=CodeReviewBenchmark())\nresults = evolver.run(cycles=5)\n```\n\n## Workflow 3: Create a Custom Evolution Engine\n\n**Use when**: The default LLM-driven mutation doesn't suit your domain.\n\n### Steps\n\n```python\nimport agent_evolve as ae\n\nclass RuleBasedEngine(ae.EvolutionEngine):\n    def step(self, workspace, observations, history, trial):\n        failures = [o for o in observations if not o.feedback.success]\n        if not failures:\n            return ae.StepResult(mutated=False, summary=\"No failures to address\")\n\n        # Analyze failure patterns\n        error_types = categorize_errors(failures)\n        prompt = workspace.read_prompt()\n\n        # Append learned rules to prompt\n        new_rules = generate_rules(error_types)\n        workspace.write_prompt(prompt + \"\\n\" + new_rules)\n\n        return ae.StepResult(\n            mutated=True,\n            summary=f\"Added {len(new_rules)} rules from {len(failures)} failures\",\n        )\n\nevolver = ae.Evolver(\n    agent=\".\u002Fmy-agent\",\n    benchmark=\"my-benchmark\",\n    engine=RuleBasedEngine(),\n)\n```\n\n## Built-in Components\n\n### Seed Agents\n\n| Agent | Domain | Model | Key Feature |\n|-------|--------|-------|-------------|\n| `swe` | SWE-bench | Claude Opus 4.6 | Verify-fix loop, skill proposals |\n| `terminal` | Terminal-Bench | Claude Sonnet 4 | Concurrent timeout, env discovery |\n| `mcp` | MCP-Atlas | Claude Opus 4.6 | MCP server integration |\n\n### Benchmarks\n\n| Name | Domain | Metric |\n|------|--------|--------|\n| `swe-verified` | Code patching | Pass rate |\n| `mcp-atlas` | Tool calling | Accuracy |\n| `terminal2` | Shell tasks | Pass rate |\n| `skill-bench` | Multi-step procedures | Accuracy |\n| `arc-agi-3` | Interactive games | RHAE score |\n\n### Evolution Algorithms\n\n| Algorithm | Strategy | Best For |\n|-----------|----------|----------|\n| A-Evolve\u002FSkillForge | LLM-driven workspace mutation | General-purpose |\n| Guided Synthesis | Memory-first, curated skills | Skill discovery |\n| Adaptive Evolution | Reward tracking, filtered observations | Fine-grained control |\n| Adaptive Skill | Skill-centric refinement | Skill-heavy domains |\n\n## Configuration Reference\n\n```python\nae.EvolveConfig(\n    batch_size=10,              # Tasks per solve round\n    max_cycles=20,              # Max evolution iterations\n    holdout_ratio=0.2,          # Test set split for gating\n    evolve_prompts=True,        # Mutate system prompts\n    evolve_skills=True,         # Discover\u002Frefine skills\n    evolve_memory=True,         # Build episodic memory\n    evolve_tools=False,         # Mutate tool implementations\n    trajectory_only=False,      # Hide scores from evolver\n    evolver_model=\"us.anthropic.claude-opus-4-6-v1\",\n    evolver_max_tokens=16384,\n    egl_threshold=0.05,         # Convergence epsilon\n    egl_window=3,               # Cycles for plateau detection\n)\n```\n\n**Convergence**: Evolution stops early when score improvement is less than `egl_threshold` over the last `egl_window` cycles.\n\n## Skill Format\n\nSkills are reusable procedures discovered and refined during evolution:\n\n```markdown\n---\nname: verify-edge-cases\ndescription: \"TRIGGER when: checking boundary conditions. DO NOT TRIGGER: for happy-path tests.\"\n---\n\n## Pattern\nTest all falsy-but-valid values: 0, False, \"\", [], {}\n\n## Process\n1. List all input boundaries\n2. Run each against the implementation\n3. Check both output AND side effects\n```\n\nSkills accumulate in the workspace `skills\u002F` directory. The evolver curates them: ACCEPT new skills, MERGE overlapping ones, SKIP redundant proposals. Target: 5–10 broad skills, not 30 narrow ones.\n\n## Common Issues\n\n### Evolution score plateaus early\n\n**Cause**: Batch size too small or evolver doesn't see enough failure diversity.\n**Fix**: Increase `batch_size` (try 15–20) and ensure benchmark tasks cover diverse failure modes. Set `trajectory_only=False` so the evolver sees scores.\n\n### Agent workspace grows too large\n\n**Cause**: Skill library bloat from accepting every proposal.\n**Fix**: The default SkillForge engine curates skills automatically. If using a custom engine, implement merging logic to consolidate overlapping skills.\n\n### Git conflicts during evolution\n\n**Cause**: Multiple evolution runs on the same workspace.\n**Fix**: Each `evolver.run()` should operate on its own workspace copy. Use `Evolver(agent=\"seed-name\")` to auto-copy the seed each time.\n\n### LLM provider errors during evolution\n\n**Cause**: Rate limits or authentication issues with the evolver model.\n**Fix**: Check `evolver_model` config. For Bedrock, ensure AWS credentials are configured. For Anthropic, set `ANTHROPIC_API_KEY`.\n\n### Custom agent not picking up evolved state\n\n**Cause**: Agent doesn't implement `reload_from_fs()`.\n**Fix**: Override `reload_from_fs()` in your `BaseAgent` subclass to re-read prompts, skills, and memory from the workspace after each evolution cycle.\n\n## Usage Instructions for Agents\n\nWhen this skill is loaded:\n\n1. **Read this entire file** before implementing any evolution workflow\n2. **Start with the Quick Start** — get a minimal evolution running before customizing\n3. **Use built-in seeds when possible** — `\"swe\"`, `\"terminal\"`, `\"mcp\"` have battle-tested configurations\n4. **Always initialize git** in custom workspaces before running evolution\n5. **Check convergence settings** — default `egl_threshold=0.05` with `egl_window=3` may be too aggressive for your domain\n6. **Inspect evolved state** after each run — read `prompts\u002Fsystem.md` and `skills\u002F` to understand what the evolver learned\n\n**Pro Tips:**\n- Set `trajectory_only=False` (default) so the evolver sees scores — this accelerates learning\n- Start with `batch_size=10` and adjust based on task diversity\n- Use `holdout_ratio=0.2` to prevent overfitting to training tasks\n- After evolution, `git diff evo-1 evo-N` shows the cumulative effect of all mutations\n- If the evolver isn't finding skills, enrich `feedback.detail` strings with specific failure reasons\n\n**Warning Signs:**\n- Score oscillating between cycles → benchmark evaluation may be non-deterministic\n- Skills directory growing past 15+ skills → engine isn't merging\u002Fcurating properly\n- Prompt growing past 10K chars → evolution is appending without refactoring\n- `converged=True` after 2-3 cycles → increase `egl_window` and decrease `egl_threshold`\n\n## References\n\n- **Architecture deep dive**: See [references\u002Farchitecture.md](references\u002Farchitecture.md)\n- **API reference**: See [references\u002Fapi.md](references\u002Fapi.md)\n- **Step-by-step tutorials**: See [references\u002Ftutorials.md](references\u002Ftutorials.md)\n- **Real-world examples**: See [references\u002Fexamples.md](references\u002Fexamples.md)\n- **GitHub issues & solutions**: See [references\u002Fissues.md](references\u002Fissues.md)\n- **Design patterns**: See [references\u002Fdesign-patterns.md](references\u002Fdesign-patterns.md)\n- **Release history**: See [references\u002Freleases.md](references\u002Freleases.md)\n","# Evolving AI Agents with A-Evolve\n\n## Overview\n\nA-Evolve is universal infrastructure for evolving any AI agent across any domain using any evolution algorithm with zero manual engineering. It represents all evolvable agent state as files (prompts, skills, memory, tools), runs iterative solve-observe-evolve cycles against benchmarks, and uses LLM-driven mutation to improve agent performance automatically.\n\n**Benchmark results** (Claude Opus 4.6):\n- MCP-Atlas: 79.4% (#1)\n- SWE-bench Verified: 76.8% (~#5)\n- Terminal-Bench 2.0: 76.5% (~#7)\n- SkillsBench: 34.9% (#2)\n\n## When to Use A-Evolve\n\n**Use A-Evolve when:**\n- Optimizing agent prompts, skills, or memory against a measurable benchmark\n- Building self-improving agents with automated gating and rollback\n- Evolving domain-specific tool usage and procedures through LLM-driven mutation\n- Running iterative solve-observe-evolve loops to maximize agent performance\n- Needing reproducible, git-versioned evolution history for every change\n\n**Key differentiator**: Other frameworks _build_ agents; A-Evolve _optimizes_ them. It sits on top of any agent framework and makes it better through automated evolution.\n\n**Do NOT use A-Evolve for:**\n- Building multi-agent orchestration from scratch (use CrewAI, LangGraph)\n- One-shot agent tasks with no iteration needed (use LangChain, LlamaIndex)\n- RAG pipeline optimization (use LlamaIndex, Chroma)\n- Prompt-only optimization without skill\u002Fmemory evolution (use DSPy)\n\n## Quick Start\n\n### Installation\n\n```bash\npip install a-evolve                    # Core\npip install a-evolve[anthropic]         # With Claude support\npip install a-evolve[all]               # All providers\n```\n\n### Three-Line Evolution\n\n```python\nimport agent_evolve as ae\n\nevolver = ae.Evolver(agent=\"swe\", benchmark=\"swe-verified\")\nresults = evolver.run(cycles=10)\nprint(f\"Final score: {results.final_score}\")\n```\n\nThis copies the built-in SWE seed workspace, runs 10 evolution cycles against SWE-bench Verified, and returns the optimized agent.\n\n## Core Concepts\n\n### The Agent Workspace\n\nAll evolvable state lives as files in a workspace directory:\n\n```\nmy-agent\u002F\n├── manifest.yaml          # Metadata + entrypoint\n├── prompts\u002F\n│   ├── system.md          # Main system prompt (evolved)\n│   └── fragments\u002F         # Modular prompt pieces\n├── skills\u002F\n│   └── skill-name\u002F\n│       └── SKILL.md       # Reusable procedure with frontmatter\n├── memory\u002F\n│   ├── episodic.jsonl     # Lessons from failures\n│   └── semantic.jsonl     # General knowledge\n├── tools\u002F\n│   ├── registry.yaml      # Tool manifest\n│   └── tool_name.py       # Tool implementations\n└── evolution\u002F             # Managed by engine (metrics, history)\n```\n\n### The Evolution Loop\n\nEach cycle follows five phases:\n\n1. **Solve** — Agent processes a batch of tasks from the benchmark\n2. **Observe** — Benchmark evaluates trajectories, producing (task, trajectory, feedback) triples\n3. **Evolve** — Evolution engine mutates workspace files based on observations\n4. **Gate** — Validate mutations (git snapshot before\u002Fafter for rollback)\n5. **Reload** — Agent reinitializes from evolved filesystem state\n\n### Three Pluggable Interfaces\n\n```python\n# 1. Agent — implements solve()\nclass MyAgent(ae.BaseAgent):\n    def solve(self, task: ae.Task) -> ae.Trajectory:\n        # Domain-specific solving logic\n        return ae.Trajectory(task_id=task.id, output=result, steps=steps)\n\n# 2. Benchmark — implements get_tasks() and evaluate()\nclass MyBenchmark(ae.BenchmarkAdapter):\n    def get_tasks(self, split=\"train\", limit=None) -> list[ae.Task]:\n        return [ae.Task(id=\"1\", input=\"...\")]\n\n    def evaluate(self, task: ae.Task, trajectory: ae.Trajectory) -> ae.Feedback:\n        return ae.Feedback(success=True, score=0.95, detail=\"Passed\")\n\n# 3. Engine — implements step()\nclass MyEngine(ae.EvolutionEngine):\n    def step(self, workspace, observations, history, trial):\n        # Mutate workspace based on observations\n        return ae.StepResult(mutated=True, summary=\"Updated prompts\")\n```\n\n## Workflow 1: Evolve an Existing Agent\n\n**Use when**: You have a working agent and want to optimize it against a benchmark.\n\n**Critical Requirements:**\n- [ ] Agent implements `BaseAgent.solve()` returning `Trajectory`\n- [ ] Benchmark implements `BenchmarkAdapter` with `get_tasks()` and `evaluate()`\n- [ ] Seed workspace has `manifest.yaml` with entrypoint and evolvable layers\n- [ ] System prompt exists at `prompts\u002Fsystem.md`\n- [ ] Workspace is a git repo (run `git init && git add -A && git commit -m \"init\"`)\n\n### Steps\n\n```python\nimport agent_evolve as ae\n\n# Configure evolution parameters\nconfig = ae.EvolveConfig(\n    batch_size=10,           # Tasks per solve round\n    max_cycles=20,           # Maximum evolution iterations\n    evolve_prompts=True,     # Mutate system prompt\n    evolve_skills=True,      # Discover and refine skills\n    evolve_memory=True,      # Build episodic memory\n    evolver_model=\"us.anthropic.claude-opus-4-6-v1\",\n)\n\n# Point to your agent workspace and benchmark\nevolver = ae.Evolver(\n    agent=\".\u002Fmy-agent-workspace\",\n    benchmark=\"swe-verified\",     # Or custom BenchmarkAdapter instance\n    config=config,\n)\n\n# Run evolution\nresults = evolver.run(cycles=10)\n\n# Inspect results\nprint(f\"Cycles completed: {results.cycles_completed}\")\nprint(f\"Final score: {results.final_score}\")\nprint(f\"Converged: {results.converged}\")\nfor cycle_num, score in enumerate(results.score_history):\n    print(f\"  Cycle {cycle_num + 1}: {score:.3f}\")\n```\n\n### Post-Evolution\n\nThe workspace is now optimized. Inspect what changed:\n\n```bash\ncd my-agent-workspace\ngit log --oneline              # See evo-1, evo-2, ... tags\ngit diff evo-1 evo-10          # Compare first and last evolution\ncat prompts\u002Fsystem.md          # Read evolved prompt\nls skills\u002F                     # See discovered skills\n```\n\n## Workflow 2: Add a Custom Benchmark\n\n**Use when**: You want to evolve agents on your own domain-specific tasks.\n\n**Critical Requirements:**\n- [ ] Define task format (inputs, expected outputs)\n- [ ] Implement scoring logic (0.0–1.0 scale)\n- [ ] Prepare task dataset (train + holdout split)\n\n### Steps\n\n```python\nimport agent_evolve as ae\n\nclass CodeReviewBenchmark(ae.BenchmarkAdapter):\n    \"\"\"Evaluate agents on code review quality.\"\"\"\n\n    def get_tasks(self, split=\"train\", limit=None):\n        tasks = load_review_dataset(split)\n        if limit:\n            tasks = tasks[:limit]\n        return [\n            ae.Task(id=t[\"id\"], input=t[\"diff\"], metadata={\"expected\": t[\"comments\"]})\n            for t in tasks\n        ]\n\n    def evaluate(self, task, trajectory):\n        expected = task.metadata[\"expected\"]\n        actual = trajectory.output\n        precision, recall = compute_review_metrics(expected, actual)\n        f1 = 2 * precision * recall \u002F (precision + recall + 1e-9)\n        return ae.Feedback(\n            success=f1 > 0.7,\n            score=f1,\n            detail=f\"P={precision:.2f} R={recall:.2f} F1={f1:.2f}\",\n        )\n\n# Use with any agent\nevolver = ae.Evolver(agent=\".\u002Fmy-agent\", benchmark=CodeReviewBenchmark())\nresults = evolver.run(cycles=5)\n```\n\n## Workflow 3: Create a Custom Evolution Engine\n\n**Use when**: The default LLM-driven mutation doesn't suit your domain.\n\n### Steps\n\n```python\nimport agent_evolve as ae\n\nclass RuleBasedEngine(ae.EvolutionEngine):\n    def step(self, workspace, observations, history, trial):\n        failures = [o for o in observations if not o.feedback.success]\n        if not failures:\n            return ae.StepResult(mutated=False, summary=\"No failures to address\")\n\n        # Analyze failure patterns\n        error_types = categorize_errors(failures)\n        prompt = workspace.read_prompt()\n\n        # Append learned rules to prompt\n        new_rules = generate_rules(error_types)\n        workspace.write_prompt(prompt + \"\\n\" + new_rules)\n\n        return ae.StepResult(\n            mutated=True,\n            summary=f\"Added {len(new_rules)} rules from {len(failures)} failures\",\n        )\n\nevolver = ae.Evolver(\n    agent=\".\u002Fmy-agent\",\n    benchmark=\"my-benchmark\",\n    engine=RuleBasedEngine(),\n)\n```\n\n## Built-in Components\n\n### Seed Agents\n\n| Agent | Domain | Model | Key Feature |\n|-------|--------|-------|-------------|\n| `swe` | SWE-bench | Claude Opus 4.6 | Verify-fix loop, skill proposals |\n| `terminal` | Terminal-Bench | Claude Sonnet 4 | Concurrent timeout, env discovery |\n| `mcp` | MCP-Atlas | Claude Opus 4.6 | MCP server integration |\n\n### Benchmarks\n\n| Name | Domain | Metric |\n|------|--------|--------|\n| `swe-verified` | Code patching | Pass rate |\n| `mcp-atlas` | Tool calling | Accuracy |\n| `terminal2` | Shell tasks | Pass rate |\n| `skill-bench` | Multi-step procedures | Accuracy |\n| `arc-agi-3` | Interactive games | RHAE score |\n\n### Evolution Algorithms\n\n| Algorithm | Strategy | Best For |\n|-----------|----------|----------|\n| A-Evolve\u002FSkillForge | LLM-driven workspace mutation | General-purpose |\n| Guided Synthesis | Memory-first, curated skills | Skill discovery |\n| Adaptive Evolution | Reward tracking, filtered observations | Fine-grained control |\n| Adaptive Skill | Skill-centric refinement | Skill-heavy domains |\n\n## Configuration Reference\n\n```python\nae.EvolveConfig(\n    batch_size=10,              # Tasks per solve round\n    max_cycles=20,              # Max evolution iterations\n    holdout_ratio=0.2,          # Test set split for gating\n    evolve_prompts=True,        # Mutate system prompts\n    evolve_skills=True,         # Discover\u002Frefine skills\n    evolve_memory=True,         # Build episodic memory\n    evolve_tools=False,         # Mutate tool implementations\n    trajectory_only=False,      # Hide scores from evolver\n    evolver_model=\"us.anthropic.claude-opus-4-6-v1\",\n    evolver_max_tokens=16384,\n    egl_threshold=0.05,         # Convergence epsilon\n    egl_window=3,               # Cycles for plateau detection\n)\n```\n\n**Convergence**: Evolution stops early when score improvement is less than `egl_threshold` over the last `egl_window` cycles.\n\n## Skill Format\n\nSkills are reusable procedures discovered and refined during evolution:\n\n```markdown\n---\nname: verify-edge-cases\ndescription: \"TRIGGER when: checking boundary conditions. DO NOT TRIGGER: for happy-path tests.\"\n---\n\n## Pattern\nTest all falsy-but-valid values: 0, False, \"\", [], {}\n\n## Process\n1. List all input boundaries\n2. Run each against the implementation\n3. Check both output AND side effects\n```\n\nSkills accumulate in the workspace `skills\u002F` directory. The evolver curates them: ACCEPT new skills, MERGE overlapping ones, SKIP redundant proposals. Target: 5–10 broad skills, not 30 narrow ones.\n\n## Common Issues\n\n### Evolution score plateaus early\n\n**Cause**: Batch size too small or evolver doesn't see enough failure diversity.\n**Fix**: Increase `batch_size` (try 15–20) and ensure benchmark tasks cover diverse failure modes. Set `trajectory_only=False` so the evolver sees scores.\n\n### Agent workspace grows too large\n\n**Cause**: Skill library bloat from accepting every proposal.\n**Fix**: The default SkillForge engine curates skills automatically. If using a custom engine, implement merging logic to consolidate overlapping skills.\n\n### Git conflicts during evolution\n\n**Cause**: Multiple evolution runs on the same workspace.\n**Fix**: Each `evolver.run()` should operate on its own workspace copy. Use `Evolver(agent=\"seed-name\")` to auto-copy the seed each time.\n\n### LLM provider errors during evolution\n\n**Cause**: Rate limits or authentication issues with the evolver model.\n**Fix**: Check `evolver_model` config. For Bedrock, ensure AWS credentials are configured. For Anthropic, set `ANTHROPIC_API_KEY`.\n\n### Custom agent not picking up evolved state\n\n**Cause**: Agent doesn't implement `reload_from_fs()`.\n**Fix**: Override `reload_from_fs()` in your `BaseAgent` subclass to re-read prompts, skills, and memory from the workspace after each evolution cycle.\n\n## Usage Instructions for Agents\n\nWhen this skill is loaded:\n\n1. **Read this entire file** before implementing any evolution workflow\n2. **Start with the Quick Start** — get a minimal evolution running before customizing\n3. **Use built-in seeds when possible** — `\"swe\"`, `\"terminal\"`, `\"mcp\"` have battle-tested configurations\n4. **Always initialize git** in custom workspaces before running evolution\n5. **Check convergence settings** — default `egl_threshold=0.05` with `egl_window=3` may be too aggressive for your domain\n6. **Inspect evolved state** after each run — read `prompts\u002Fsystem.md` and `skills\u002F` to understand what the evolver learned\n\n**Pro Tips:**\n- Set `trajectory_only=False` (default) so the evolver sees scores — this accelerates learning\n- Start with `batch_size=10` and adjust based on task diversity\n- Use `holdout_ratio=0.2` to prevent overfitting to training tasks\n- After evolution, `git diff evo-1 evo-N` shows the cumulative effect of all mutations\n- If the evolver isn't finding skills, enrich `feedback.detail` strings with specific failure reasons\n\n**Warning Signs:**\n- Score oscillating between cycles → benchmark evaluation may be non-deterministic\n- Skills directory growing past 15+ skills → engine isn't merging\u002Fcurating properly\n- Prompt growing past 10K chars → evolution is appending without refactoring\n- `converged=True` after 2-3 cycles → increase `egl_window` and decrease `egl_threshold`\n\n## References\n\n- **Architecture deep dive**: See [references\u002Farchitecture.md](references\u002Farchitecture.md)\n- **API reference**: See [references\u002Fapi.md](references\u002Fapi.md)\n- **Step-by-step tutorials**: See [references\u002Ftutorials.md](references\u002Ftutorials.md)\n- **Real-world examples**: See [references\u002Fexamples.md](references\u002Fexamples.md)\n- **GitHub issues & solutions**: See [references\u002Fissues.md](references\u002Fissues.md)\n- **Design patterns**: See [references\u002Fdesign-patterns.md](references\u002Fdesign-patterns.md)\n- **Release history**: See [references\u002Freleases.md](references\u002Freleases.md)\n",{"name":5,"tags":49,"author":56,"license":14,"version":57,"description":7,"dependencies":58},[50,51,32,52,53,54,55],"Agent Evolution","Self-Improving Agents","LLM","Benchmark Evaluation","Skill Discovery","Agentic AI","A-EVO Lab","1.0.0",[59,60],"a-evolve>=0.1.0","pyyaml>=6.0","main","f19b254e8975d0bfddb394686706106930d7964d","Agent-Execute\u002Fa-evolve","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus","https:\u002F\u002Fgithub.com\u002Fendman100","2026-11-11 18:19:10",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add endman100\u002Fskill-router-nexus --skill evolving-ai-agents",{"tool":73,"command":74},"bunx","bunx skills add endman100\u002Fskill-router-nexus --skill evolving-ai-agents",{"tool":76,"command":77},"pnpm","pnpm dlx skills add endman100\u002Fskill-router-nexus --skill evolving-ai-agents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002FSKILL.md",true,[81,87,91,95,99,103,107,111],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fapi.md","REFERENCE","参考文档",15810,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Fapi.md",{"path":88,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Farchitecture.md",15505,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Farchitecture.md",{"path":92,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fdesign-patterns.md",15192,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Fdesign-patterns.md",{"path":96,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fexamples.md",10015,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Fexamples.md",{"path":100,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fissues.md",16411,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Fissues.md",{"path":104,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002FREADME.md",27098,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002FREADME.md",{"path":108,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Freleases.md",4561,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Freleases.md",{"path":112,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Ftutorials.md",23161,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FAgent-Execute\u002Fa-evolve\u002Freferences\u002Ftutorials.md",[116,140,173,195,204,228],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":128,"publishedAt":44},"01M6MPCT5BXVER8HQZTW3QE9AS","create-master","基于佛教经典文献，生成特定高僧大德的 AI 教学角色","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FMetaphysics-and-Spirituality\u002FMaster-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FMetaphysics-and-Spirituality\u002FMaster-skill\u002FSKILL.md",[123],{"categoryNo":124,"categoryName":125,"taxonomyType":126,"taxonomyTypeDesc":127},"01JBSEEDCAT000000000000039","教师与教育","PROFESSION","适用职业",[129,130,131,132,133,134,135,136,137,138,139],"create master","master","create","生成","true","webfetch","edit","write","read","grep","Bash",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":144,"sourceHtmlUrl":145,"categories":146,"keywords":154,"publishedAt":44},"01M6M43AKE95Y64E1JRXEF5QQ3","writing-dna-skill","从至少 20 篇完整文章中蒸馏可复用的写作 DNA，分析语言、文章结构、选题逻辑、素材策略、认知框架和视觉风格，并生成 Writing-DNA.md；按该 DNA 写作时会读取全部蒸馏产物和 5 篇相关原文。用于中英文作者、账号、品牌或出版物的风格分析与一致性写作。 Distill reusable Writing DNA from at least 20 complete articles for Chinese or English authors, publications, brands, and accounts; use for language, structure, topic logic, source strategy, cognitive-frame, and visual-style analysis.","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fwriting-dna-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fwriting-dna-skill\u002FSKILL.md",[147,150,151],{"categoryNo":148,"categoryName":149,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":152,"categoryName":153,"taxonomyType":126,"taxonomyTypeDesc":127},"01JBSEEDCAT000000000000036","内容创作者",[155,156,157,158,159,160,161,162,163,164,165,166,167,132,168,169,170,27,171,172],"writing dna skill","DNA","writing","strategy","english","logic","visual","structure","chinese","reusable","use","style","distill","analysis","frame","source","at","complete",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":177,"sourceHtmlUrl":178,"categories":179,"keywords":182,"publishedAt":44},"01M6M428TTCGQ4ME3KY99VN037","stop-slop","Remove AI writing patterns from prose. Use when drafting, editing, or reviewing text to eliminate predictable AI tells.","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fstop-slop\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fstop-slop\u002FSKILL.md",[180,181],{"categoryNo":148,"categoryName":149,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":152,"categoryName":153,"taxonomyType":126,"taxonomyTypeDesc":127},[183,184,185,186,26,187,188,189,190,165,191,192,193,27,194,157],"slop","stop slop","stop","drafting","drafts","https","patterns","prose","remove","editing","text","content",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":199,"sourceHtmlUrl":200,"categories":201,"keywords":202,"publishedAt":44},"01M6M41X0B7EBX42TK435DMGGR","shuorenhua","检查和清理中英文文本里的 AI 套路，适用于“去 AI 味”“说人话”“自然一点”“别像模板”“先标问题”这类改写和审稿需求；按场景控制力度，同时保留事实、术语、语域和责任主体。","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fshuorenhua\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fshuorenhua\u002FSKILL.md",[],[197,203],"文本",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":208,"sourceHtmlUrl":209,"categories":210,"keywords":211,"publishedAt":44},"01M6M3ZD12WBEW5KXKDM4N6DFG","naming","Name products, SaaS, brands, open source projects, bots, and apps. Use when the user needs to name something, find a brand name, or pick a product name. Metaphor-driven process that produces memorable, meaningful names and avoids AI slop.","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fnaming-main\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fnaming-main\u002FSKILL.md",[],[206,212,213,214,215,216,165,217,137,170,218,219,220,221,139,222,223,224,225,26,226,227,183],"repo","websearch","product name","apps","bots","view","brand","pick","gh","projects","open","saas","open source","product","describe","ai slop",{"skillNo":229,"name":230,"nameZh":6,"description":231,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":232,"sourceHtmlUrl":233,"categories":234,"keywords":236,"publishedAt":44},"01M6M3YVXAFAAWJ7F6JMPFREYE","humanizer-zh","去除文本中的 AI 生成痕迹。适用于编辑或审阅文本，使其听起来更自然、更像人类书写。\n基于维基百科的\"AI 写作特征\"综合指南。检测并修复以下模式：夸大的象征意义、\n宣传性语言、以 -ing 结尾的肤浅分析、模糊的归因、破折号过度使用、三段式法则、\nAI 词汇、否定式排比、过多的连接性短语。","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fhumanizer-zh\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fhumanizer-zh\u002FSKILL.md",[235],{"categoryNo":148,"categoryName":149,"taxonomyType":20,"taxonomyTypeDesc":21},[237,238,239,137,136,135,157,132,203,240,183,185],"humanizer","zh","humanizer zh","翻译"]