AGL-SKILL: Coding Harnesses as Agentic Optimizers
Organizations: Microsoft Research Asia
Abstract
Frontier models are increasingly used through harnesses as agents, with growing autonomy to do useful work. Agent performance can often be enhanced by the use of skills: reusable workflows, code, and prompts that provide task-related information or guide the behaviour of the model. Skills, being textual in nature, present themselves as another editable surface to be optimized; current methods have improved on handcrafting and one-shot generation by treating skill development as an iterative process, using score-driven search to tweak and improve performance. In this paper, we demonstrate the efficacy of the agents themselves as optimizers: across five benchmarks, a coding agent without guidance substantially improves every target and outperforms published skill-optimization methods. More broadly, this shows the capability of agents to do such work and to refine their own behaviour to provide task-specific context, as long as they are given a metric to measure against.
Figures & tables
| Optimizer models | claude-opus-5 (Claude Code), gpt-5.6-sol (Codex, GitHub Copilot) |
|---|---|
| Target model | gpt-5.4-mini |
| Harnesses | Claude Code CLI 2.1.175, OpenAI Codex SDK 0.144.1, GitHub Copilot CLI 1.0.71 |
| Budgets | 10, $25 |
| Reasoning effort | high (optimizer), medium (target) by default |
| Target | Task | Train/test | Score |
|---|---|---|---|
| SpreadsheetBench | Edit Excel workbooks by generating and executing Python | 120/280 | Official cell- and sheet-level comparison |
| ALFWorld | Complete text-based household tasks through sequential actions | 3,553/134 | Success on official valid_unseen games |
| OfficeQA | Retrieve Treasury Bulletin evidence and answer numerical questions | 50/172 | Normalized exact match |
| SearchQA | Answer questions from noisy retrieved web snippets | 400/1,400 | SQuAD-style exact match |
| LiveMath | Solve theorem-level five-choice mathematics questions | 35/125 | Exact choice accuracy |
| Method | Spreadsheet | OfficeQA | ALFWorld | SearchQA | LiveMath |
|---|---|---|---|---|---|
| Baseline | 0.361 | 0.221 | 0.731 | 0.759 | 0.147 |
| Human skill | 0.429 | 0.459 | 0.567 | 0.772 | 0.288 |
| LLM skill | 0.368 | 0.366 | 0.657 | 0.761 | 0.280 |
| Trace2Skill | 0.407 | 0.209 | 0.828 | 0.786 | 0.328 |
| TextGrad | 0.382 | 0.300 | 0.709 | 0.775 | 0.272 |
| GEPA | 0.425 | 0.453 | 0.813 | 0.794 | 0.272 |
| Method | Budget | Spreadsheet | OfficeQA | ALFWorld | SearchQA | LiveMath |
|---|---|---|---|---|---|---|
| Vanilla | $5 | 6.46 / 3.94 | 5.34 / 3.33 | 5.34 / 0.35 | 5.07 / 2.55 | 4.91 / 2.38 |
| $10 | 9.76 / 4.70 | 9.95 / 3.51 | 9.74 / 0.00 | 8.96 / 2.39 | 9.32 / 1.22 | |
| $25 | 22.96 / 3.51 | 23.52 / 3.94 | 23.27 / 0.52 | 20.32 / 2.40 | 19.96 / 0.78 | |
| Two-phase | $5 | 4.49 / 3.76 | 4.78 / 3.21 | 4.24 / 0.92 | 5.08 / 2.46 | 3.87 / 1.22 |
| $10 | 9.97 / 4.98 | 7.35 / 3.44 | 6.33 / 0.69 | 7.11 / 2.55 | 4.75 / 1.29 | |
| $25 | 16.04 / 5.16 | 17.26 / 3.33 | 12.25 / 0.73 | 10.08 / 2.89 | 8.00 / 1.08 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Vanilla | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Claude Code | Codex | Copilot | |||||||
| Benchmark | $5 | $10 | $25 | $5 | $10 | $25 | $5 | $10 | $25 |
| SpreadsheetBench | 0.658 | 0.688 | 0.678 | 0.727 | 0.715 | 0.718 | 0.669 | 0.657 | 0.731 |
| OfficeQA | 0.527 | 0.568 | 0.568 | 0.498 | 0.527 | 0.533 | 0.541 | 0.554 | 0.537 |
| ALFWorld | 0.998 | 1.000 | 0.998 | 1.000 | 1.000 | 0.990 | 1.000 | 1.000 | 1.000 |
| SearchQA | 0.823 | 0.818 | 0.839 | 0.812 | 0.821 | 0.827 | 0.821 | 0.833 | 0.825 |
| Two-phase | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Claude Code | Codex | Copilot | |||||||
| Benchmark | $5 | $10 | $25 | $5 | $10 | $25 | $5 | $10 | $25 |
| SpreadsheetBench | 0.647 | 0.676 | 0.700 | 0.665 | 0.679 | 0.683 | 0.394 | 0.722 | 0.555 |
| OfficeQA | 0.547 | 0.558 | 0.558 | 0.554 | 0.496 | 0.535 | 0.543 | 0.562 | 0.560 |
| ALFWorld | 0.861 | 0.652 | 0.998 | 0.998 | 1.000 | 0.993 | 0.995 | 1.000 | 0.998 |
| SearchQA | 0.805 | 0.815 | 0.837 | 0.834 | 0.834 | 0.814 | 0.820 | 0.833 | 0.815 |
| Agent Lightning skill | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Claude Code | Codex | Copilot | |||||||
| Benchmark | $5 | $10 | $25 | $5 | $10 | $25 | $5 | $10 | $25 |
| SpreadsheetBench | 0.638 | 0.677 | 0.717 | 0.655 | 0.646 | 0.629 | 0.663 | 0.693 | 0.687 |
| OfficeQA | 0.568 | 0.626 | 0.603 | 0.498 | 0.541 | 0.508 | 0.516 | 0.537 | 0.512 |
| ALFWorld | 0.945 | 0.731 | 0.998 | 0.948 | 1.000 | 0.978 | 0.928 | 1.000 | 0.998 |
| SearchQA | 0.829 | 0.825 | – | 0.813 | 0.802 | 0.816 | 0.806 | 0.826 | 0.833 |
| Subagents ($10) | |||
|---|---|---|---|
| Benchmark | Claude Code | Codex | Copilot |
| SpreadsheetBench | 0.444 | 0.462 | 0.669 |
| OfficeQA | 0.494 | 0.508 | 0.543 |
| ALFWorld | 0.978 | 0.998 | 0.938 |
| SearchQA | 0.812 | 0.819 | 0.819 |
| LiveMath | 0.429 | 0.661 | 0.624 |
| Git worktrees ($10) | |||
|---|---|---|---|
| Benchmark | Claude Code | Codex | Copilot |
| SpreadsheetBench | 0.748 | 0.634 | 0.689 |
| OfficeQA | 0.529 | 0.496 | 0.529 |
| ALFWorld | 0.978 | 0.998 | 1.000 |
| SearchQA | 0.823 | 0.813 | 0.822 |
| LiveMath | 0.485 | 0.707 | 0.789 |
| Vanilla | Two-phase | ||||||
|---|---|---|---|---|---|---|---|
| Benchmark | Budget | Optimizer | Target | Finale | Optimizer | Target | Finale |
| SpreadsheetBench | $5 | 3.78 | 2.68 | 3.94 | 2.34 | 2.15 | 3.76 |
| $10 | 5.80 | 3.96 | 4.70 | 5.27 | 4.70 | 4.98 | |
| $25 | 15.42 | 7.55 | 3.51 | 8.64 | 7.39 | 5.16 | |
| OfficeQA | $5 | 3.05 | 2.29 | 3.33 | 2.40 | 2.37 | 3.21 |
| $10 | 6.48 | 3.47 | 3.51 | 3.83 | 3.52 | 3.44 | |
LLM Agent Skill Learning
Large language model agent skill learning studies how agents acquire, represent, reuse, and refine procedures for multi-step tasks.
See all 444 papers