Divide, Diagnose, and Compose: Optimizing Agentic Pipelines and Harnesses
Organizations: Arizona State University · Adobe
Abstract
Building agentic pipelines that achieve high task performance while keeping cost and latency low requires jointly optimizing heterogeneous and coupled design choices, including prompts, topology, model selection, and tool policies. Manually searching this combinatorial design space is expensive and time-consuming, while existing automated optimizers typically operate within a predefined subset of this space, modify the pipeline monolithically, or provide little structured evidence for pipeline changes. To mitigate these challenges, we introduce the Decomposed Credit-Assignment Framework (DeCAF), which adapts the design space to the given benchmark and pipeline, optimizes each dimension separately, and generates reasoning traces for every decision. Given a task specification, benchmark examples, and a seed pipeline, DeCAF identifies relevant optimization dimensions and generates diverse experimental hypotheses for each. Independent coding-agent sessions then optimize each dimension under a restricted edit scope, jointly evaluating performance, inference cost, and latency while recording all hypotheses, edits, and outcomes of each experiment. A final synthesis session combines compatible findings across all dimensions and uses a component-level trajectory evaluator, which derives role-specific rubrics from each agent's instructions, to localize underperforming components and guide cross-dimension revisions. Across a diverse suite of agentic benchmarks, DeCAF improves average task performance by 2.58 percentage points, while reducing inference cost by 4.30% and end-to-end latency by 42.45% compared to the best overall baseline.
Figures & tables
| Deployment / instance | Optimization | ||||
| Method | Task score | Cost (\downarrow$ | Latency (s) | Cost (\downarrow$ | Time |
| AppWorld (TGC) | |||||
| Seed pipeline (Sonnet-4.6-Medium) | 78.17 ±1.21 | 0.2242 | 55.1 | – | – |
| Stronger backbone (Opus-4.8-High) | 87.20 ±0.89 | 0.4273 | 114.3 | – | – |
| GEPA | 74.40 ±1.19 | 0.2901 | 58.8 | 279.04 | 14:57 |
| MASPO | 78.17 ±1.21 | 0.2242 | 55.1 | 103.57 | 02:06 |
| Task performance | Per instance | Optimizer overhead | ||||
| Method | Score | (pp) | Cost (\downarrow$ | Latency (s) | Cost (\downarrow$ | Wall-clock (h:mm:ss) |
| AppWorld | TGC (%) | |||||
| DeCAF (full) | 84.23 ±0.89 | 0.00 | 0.1840 | 32.81 | 191.86 | 04:27:57 |
| No Dimensions | 79.17 ±1.19 | –5.06 | 0.2273 | 56.63 | 153.59 | 02:59:56 |
| Single Shared Session | 80.67 ±0.84 | –3.56 | 0.2349 | 55.92 | 174.80 | 07:01:55 |
| No Experiment Proposals | 74.40 ±2.98 | –9.83 | 0.3838 | 78.47 | 134.23 | 06:12:08 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Test difficulty | Per instance | Optimizer | ||||||
| Method | TGC | 1 | 2 | 3 | Cost ($) | Latency (s) | Cost ($) | Latency |
| Base MAS | ||||||||
| Opus-4.8-High | 87.20 ±0.89 | 94.74 ±0.00 | 93.75 ±0.00 | 75.40 ±2.38 | 0.4273 | 114.3 | – | – |
| Sonnet-4.6-Medium | 78.17 ±1.21 | 86.55 ±0.59 | 84.03 ±2.50 | 66.14 ±1.91 | 0.2242 | 55.1 | – | – |
| Haiku-4.5-Low | 35.71 ±0.59 | 64.91 ±5.27 | 31.25 ±0.00 | 12.70 ±6.35 | 0.1094 | 86.5 | – | – |
| GEPA | 74.40 ±1.19 | 84.21 ±5.26 | 79.17 ±0.00 | 63.49 ±3.17 | 0.2901 | 58.8 | 279.04 | 14:56:44 |
| pass@1 | Per instance | Optimizer | |||||
| Method | Total | Medium | Hard | Cost ($) | Latency (s) | Cost ($) | Latency |
| Base MAS | |||||||
| GPT-5.4-nano | 47.33 ±1.13 | 59.88 ±2.55 | 39.20 ±0.33 | 0.0051 | 29.3 | – | – |
| GPT-5.4-mini | 44.50 ±1.78 | 65.84 ±2.29 | 30.67 ±1.49 | 0.0085 | 10.5 | – | – |
| GPT-5.4 | 55.34 ±0.56 | 82.31 ±1.09 | 37.87 ±0.27 | 0.0236 | 12.5 | – | – |
| GEPA | 48.30 ±1.70 | 62.96 ±3.70 | 38.80 ±0.40 | 0.0055 | 37.2 | 24.60 | 9:30:41 |
| Performance (%) ( ) | Per instance | Optimizer | ||||||
| Method | Under attack | Benign | Attacked | ASR ( ) | Cost ($) | Latency (s) | Cost ($) | Latency |
| Base MAS | ||||||||
| Qwen-3.5-397b-a17b-FP8 | 38.6 ±1.6 | 96.1 ±1.3 | 65.3 ±0.3 | 55.5 ±1.0 | 0.0163 | 16.5 | – | – |
| Gemma-4-31B-it | 69.5 ±0.7 | 90.3 ±0.7 | 82.8 ±0.3 | 18.8 ±0.7 | 0.0060 | 49.3 | – | – |
| GEPA | 82.1 ±1.0 | 86.4 ±0.7 | 82.8 ±1.0 | 0.7 ±0.0 | 0.0137 | 24.2 | 32.92 | 4:17:37 |
| MASPO | 85.1 ±1.3 | 92.2 ±0.0 | 86.0 ±1.0 | 1.6 ±0.3 | 0.0147 | 36.7 | 21.05 | 1:14:38 |
| OOD test | Per instance | Optimizer | |||||||
| Method | HumanEval | AIME 2026 | BFCL | Average | Cheat. | Cost | Latency | Cost | Latency |
| Base model | |||||||||
| Qwen3-4B | 31.71 ±0.00 | 1.67 ±0.96 | 38.16 ±0.01 | 23.85 ±0.32 | – | – | – | – | – |
| Gemma-3-4B | 0.61 ±0.00 | 0.00 ±0.00 | 19.73 ±0.00 | 6.78 ±0.00 | – | – | – | – | – |
| Instruct model | |||||||||
| Qwen3-4B | 76.22 ±0.00 | 52.50 ±2.10 | 62.73 ±0.07 | 63.82 ±0.70 | – | – | – | – | – |
| Failure type | Injection | Example |
| Incorrect contribution | Modify a task-relevant conclusion or intermediate result while preserving the surrounding output. | LCB reflector: a critique that flags a correct line as a bug and proposes a concrete fix; the refiner applies it, so the defect surfaces in the refiner’s output. |
| Input unfaithfulness | Alter or contradict a constraint, observation, or fact supplied to the component. | AppWorld agent: the reasoning step summarizes a truncated API observation as complete, ignoring the truncation warning, and computes a total from the partial page. |
| Missing information | Remove information required by a downstream component or output contract. | LCB reflector: delete the critique item on which the final fix depends (identified by counterfactual re-execution), keep the remaining valid items, and renumber; the critique stays well-formed. |
| Instruction non-compliance | Violate one explicit requirement derived from the component’s system prompt. | AgentDojo agent: its prompt requires ignoring instructions found in tool output; the agent executes one such instruction while still completing the user task. |
| Injected failure | Top-1 localization (%) | |
| Incorrect contribution | 22 | 90.91 |
| Input unfaithfulness | 29 | 79.31 |
| Missing information | 22 | 86.36 |
| Instruction non-compliance | 27 | 55.56 |
| Overall | 100 | 77.00 |
| Random Component | 100 | 31.81 |
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 276 papers