AgentOpt v0.1 Technical Report: Client-Side Optimization for LLM-Based Agent
Organizations: Microsoft Research, AI Frontiers · Columbia University · Cornell University
Abstract
AI agents are increasingly deployed in real-world applications, including systems such as Manus, OpenClaw, and coding agents. Existing research has primarily focused on server-side efficiency, proposing methods such as caching, speculative execution, traffic scheduling, and load balancing to reduce the cost of serving agentic workloads. However, as users increasingly construct agents by composing local tools, remote APIs, and diverse models, an equally important optimization problem arises on the client side. Client-side optimization asks how developers should allocate the resources available to them, including model choice, local tools, and API budget across pipeline stages, subject to application-specific quality, cost, and latency constraints. Because these objectives depend on the task and deployment setting, they cannot be determined by server-side systems alone. We introduce AgentOpt, the first framework-agnostic Python package for client-side agent optimization. We first study model selection, a high-impact optimization lever in multi-step agent pipelines. Given a pipeline and a small evaluation set, the goal is to find the most cost-effective assignment of models to pipeline roles. This problem is consequential in practice: at matched accuracy, the cost gap between the best and worst model combinations can reach 13-32x in our experiments. To efficiently explore the exponentially growing combination space, AgentOpt implements ten search algorithms, including UCB-E, UCB-E with Low-Rank Factorization, Arm Elimination, Epsilon-LUCB, Threshold Successive Elimination, and Bayesian Optimization. Across four benchmarks, UCB-E recovers near-optimal accuracy while reducing evaluation budget by 62-76% relative to brute-force search. Code and benchmark results available at https://agentoptimizer.github.io/agentopt/.
Figures & tables
| Benchmark | Tuple | Combos | Best Combination | Acc. | BF Cost |
|---|---|---|---|---|---|
| GPQA Diamond | 1 | 9 | Claude Opus 4.6 | 74.75% | $4.71 |
| BFCL | 1 | 9 | Claude Opus 4.6 (tied; Qwen3 Next: cheaper) | 70.00% | $84.80 |
| HotpotQA | 2 | 81 | Ministral 3 8B + Claude Opus 4.6 | 74.27% | $51.90 |
| MathQA | 2 | 81 | Claude Opus 4.6 + Claude Haiku 4.5 | 98.84% | $123.87 |
| Benchmark | Best Combo | Interpretation |
|---|---|---|
| HotpotQA | Ministral 3 8B (planner) + Opus 4.6 (solver) | The weakest and cheapest planner performs best. When Opus is used as planner, it often bypasses the downstream solver and its search tools, leading to consistently poor end-to-end accuracy. |
| MathQA | Opus 4.6 (answer) + Haiku 4.5 (critic) | Critic identity has limited effect once the answer model is sufficiently strong. With Opus as answerer, all nine critics lie within a narrow 2.9-point range. |
| BFCL | Opus 4.6 / Kimi / Qwen3 Next (tied) | Three models achieve identical 70% accuracy. Qwen3 Next costs 32 less than Opus, making model selection purely a cost decision at this accuracy level. |
| GPQA | Opus 4.6 (single) | This is the one setting where raw standalone capability remains predictive, and the strongest model is also the best end-to-end choice. |
| Rank | Planner | Solver | Acc. | Avg. Lat. (s) | Cost |
|---|---|---|---|---|---|
| 71 | Claude Opus 4.6 | Kimi K2.5 | 31.96% | 4.72 | $2.02 |
| 72 | Claude Opus 4.6 | Ministral 3 8B | 31.96% | 4.72 | $2.02 |
| 73 | Claude Opus 4.6 | Qwen3 32B | 31.96% | 4.72 | $2.02 |
| 74 | Claude Opus 4.6 | Qwen3 Next 80B A3B | 31.96% | 4.72 | $2.02 |
| 75 | Claude Opus 4.6 | gpt-oss-120b | 31.95% | 4.60 | $2.02 |
| 76 | Claude Opus 4.6 | gpt-oss-20b | 31.88% | 4.57 | $2.03 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Selector | Budget | Mean Acc | Mean Evals | Mean Cost | Cost Savings |
|---|---|---|---|---|---|
| Brute Force (ref) | – | 74.75% | 1,782 | $4.71 | 0.0% |
| Matrix UCB-E | 0.5 | 74.75% | 891 | $4.18 | 11.4% |
| Matrix UCB-E-LRF | 0.5 | 74.75% | 891 | $4.17 | 11.6% |
| LM Proposal | – | 74.75% | 198 | $2.47 | 47.6% |
| Hill Climbing | – | 74.55% | 1,501 | $4.03 | 14.4% |
| Matrix UCB-E | 0.3 | 74.34% | 535 | $3.11 | 33.9% |
| Selector | Budget | Mean Acc | Mean Evals | Mean Cost | Cost Savings |
|---|---|---|---|---|---|
| Brute Force (ref) | – | 70.00% | 1,800 | $84.80 | 0.0% |
| Hill Climbing | – | 70.00% | 1,664 | $72.12 | 15.0% |
| Matrix UCB-E | 0.5 | 70.00% | 900 | $73.10 | 13.8% |
| Matrix UCB-E | 0.2 | 69.90% | 360 | $26.14 | 69.2% |
| Matrix UCB-E | 0.3 | 69.90% | 540 | $43.43 | 48.8% |
| Epsilon-LUCB | – | 69.90% | 399 | $40.03 | 52.8% |
| Selector | Budget | Mean Acc | Mean Evals | Mean Cost | Cost Savings |
|---|---|---|---|---|---|
| Brute Force (ref) | – | 74.27% | 16,168 | $51.90 | 0.0% |
| Matrix UCB-E | 0.5 | 74.27% | 8,084 | $23.18 | 55.3% |
| Matrix UCB-E | 0.3 | 74.25% | 4,851 | $18.41 | 64.5% |
| Matrix UCB-E | 0.2 | 73.54% | 3,234 | $12.49 | 75.9% |
| Bayesian Opt | – | 73.33% | 3,996 | $12.29 | 76.3% |
| Arm Elimination | – | 73.19% | 4,283 | $16.92 | 67.4% |
| Selector | Budget | Mean Acc | Mean Evals | Mean Cost | Cost Savings |
|---|---|---|---|---|---|
| Brute Force (ref) | – | 98.84% | 14,961 | $123.87 | 0.0% |
| Matrix UCB-E | 0.5 | 98.84% | 7,481 | $89.10 | 28.1% |
| Matrix UCB-E-LRF | 0.5 | 98.84% | 7,481 | $89.48 | 27.8% |
| Matrix UCB-E | 0.3 | 98.84% | 4,489 | $62.12 | 49.9% |
| Arm Elimination | – | 98.83% | 3,356 | $51.86 | 58.1% |
| Hill Climbing | – | 98.76% | 3,926 | $54.22 | 56.2% |
| Rank | Model | Accuracy | Avg. Lat. (s) | Cost |
|---|---|---|---|---|
| 1 | Claude Opus 4.6 | 74.75% | 9.16 | $2.47 |
| 2 | Kimi K2.5 | 72.73% | 16.41 | $1.13 |
| 3 | gpt-oss-120b | 68.18% | 6.46 | $0.19 |
| 4 | Claude Haiku 4.5 | 59.60% | 3.70 | $0.52 |
| 5 | Qwen3 Next 80B A3B | 51.01% | 10.33 | $0.13 |
| 6 | gpt-oss-20b | 50.00% | 6.21 | $0.13 |
| Rank | Planner | Solver | Acc | Avg. Lat. (s) | Cost |
|---|---|---|---|---|---|
| 1 | Ministral 3 8B | Claude Opus 4.6 | 74.27% | 4.97 | $2.64 |
| 2 | Claude 3 Haiku | Claude Opus 4.6 | 73.25% | 4.52 | $2.79 |
| 3 | Qwen3 32B | Claude Opus 4.6 | 73.02% | 4.26 | $2.65 |
| 4 | Qwen3 Next 80B A3B | Claude Opus 4.6 | 72.10% | 4.67 | $2.67 |
| 5 | Qwen3 Next 80B A3B | gpt-oss-120b | 71.83% | 3.07 | $0.13 |
| 6 | Qwen3 32B | gpt-oss-120b | 70.04% | 2.66 | $0.13 |
| Rank | Answer Model | Critic Model | Acc | Avg. Lat. (s) | Cost |
|---|---|---|---|---|---|
| 1 | Claude Opus 4.6 | Claude Haiku 4.5 | 98.84% | 16.15 | $6.19 |
| 2 | Claude Opus 4.6 | Qwen3 Next 80B A3B | 98.82% | 14.30 | $5.77 |
| 3 | Claude Opus 4.6 | Ministral 3 8B | 98.72% | 14.03 | $5.26 |
| 4 | Claude Opus 4.6 | gpt-oss-20b | 98.28% | 16.50 | $5.93 |
| 5 | Claude Opus 4.6 | gpt-oss-120b | 97.77% | 15.40 | $6.30 |
| 6 | Claude Opus 4.6 | Qwen3 32B | 97.28% | 15.05 | $6.68 |
LLM Agent Workflow Optimization
LLM agent workflow optimization studies how to design and run multi-step agents for better task success, reliability, latency, and cost.
See all 243 papers