COBRA-Skills: Contextual Bandits for Efficient Agent Skill Optimization (Open Source)
COBRA-Skills: Contextual Bandits for Efficient Agent Skill Optimization (Open Source)

COBRA-Skills: Contextual Bandits for Efficient Agent Skill Optimization (Open Source)

We’ve been exploring how to make Agent Skill optimization more efficient.

A lot of existing methods follow a generate–execute–analyze–refine loop: candidate skills are executed on real tasks, failure traces are analyzed, and the skills are repeatedly rewritten. This can work well, but it also gets expensive quickly.

COBRA-Skills treats this as a sequential budget-allocation problem: which skill is most worth evaluating next?

Our loop is roughly:

  • Maintain a population of candidate skills
  • Use a neural predictor to estimate skill utility
  • Use LinearUCB to balance exploitation and exploration
  • Evaluate only the selected skill on the target agent
  • Reuse execution feedback for scheduled regeneration, mutation, and crossover

We tested it on 6 agent benchmarks spanning search QA, spreadsheets, document understanding, math reasoning, social reasoning, and embodied tasks, across 3 target models.

Main results:

  • Best average performance among the compared methods
  • ~55–58% lower optimization cost than SkillOpt
  • Only 50 optimization examples per benchmark
  • Still works under Codex and Claude Code harnesses
  • Also remains effective when the target model itself is used for skill generation and refinement

One thing we found interesting is that the main gain is not simply from reducing target-agent executions. A large part of the cost reduction comes from avoiding repeated LLM-based trajectory analysis and skill rewriting.

Paper: https://arxiv.org/abs/2609.11682
Code: https://github.com/Jerry-LuP/COBRA-Skills
HF: https://huggingface.co/papers/2609.11682

Would be interested in feedback, especially from people working on Agent Skills, prompt optimization, or contextual bandits.

submitted by /u/GardenDelicious1476
[link] [comments]