cap-evolve

Optimize agentic capabilities — with agents

cap-evolve improves an AI agent's prompts, tools, and skills by learning from failed evaluation traces. You bring the agent and the eval you already have. cap-evolve runs the loop — evaluate → diagnose → propose an edit → keep it only if it beats a held-out split by a significant margin → commit — and reports one honest number. It optimizes what your agent reads, not its weights.

beta (0.x) python 3.10+ 0 runtime deps Apache-2.0 18 agent skills
Made at IBM Red Hat

Try it in two minutes — no API key required

git clone https://github.com/skillberry-ai/cap-evolve.git
cd cap-evolve
python3 -m venv .venv && source .venv/bin/activate
pip install ./core
bash examples/toy_calc/run.sh

toy_calc is a deterministic zero-API stand-in: the seed prompt scores 0.0; the optimized prompt is gate-accepted and scores 1.0 on the sealed test split — no model is called. Full walkthrough: Getting started.

cap-evolve dashboard — a real τ²-bench airline run
A real τ²-bench airline run in the live dashboard — baseline → best, accepted vs rejected candidates, cost, and the fitness stair.

Why cap-evolve

Five things that shape how cap-evolve works — and how it differs from what came before.

Results

Numbers are cross-checked against committed run artifacts. Each is labeled fit metric (no holdout) or held-out (test scored once on ids the optimizer never saw). Full detail, models, task/trial counts, commits, and costs: Results.

Benchmark Split Baseline → Optimized Gain
toy_calc (zero-API) sealed test 0.0 → 1.0 deterministic proof
τ²-bench airline (policy + tools) val — fit metric 0.536 → 0.712 +0.176 / +32.8%
τ²-bench airline (held-out 30/10/10) sealed test 30.0 → 47.5 +17.5 pp / +58.3%
SkillsBench (skill package) sealed test (held-out) 0.556 → 0.667 +0.111 / +20.0%

What cap-evolve optimizes

Pick one — or combine them, e.g. [system-prompt, tools].

CapabilityWhat the optimizer may change
System prompts Rewrite / consolidate / add rules, examples, output contracts — never drop a needed rule
Tool implementations Edit tool code for deterministic enforcement; add/wrap/swap tools (never bare-remove)
MCP tool surfaces Safe edits only — tool docs, in-description examples, and which tools are exposed
Skill packages An Agent Skill dir — SKILL.md bodies, references, and executable scripts

Choose your path

Every path shares the same core install and the same honesty guarantees.

PathUse it whenStart
Claude Code plugin You use Claude Code and want slash commands + honesty hooks claude --plugin-dir ./plugins/cap-evolve
Another coding-agent host Codex, Gemini, opencode, Cursor, Droid, Copilot, Kimi, Pi, Antigravity, openclaw, IBM Bob, or bare ./install.sh --host <name>
Manual adapter + CLI You want to wire the adapter yourself and drive cap-evolve directly Optimize your own agent

Documentation

Hand-crafted pages for the four hero topics below; the rest are on GitHub, alongside the code they describe.