arXiv:2611.08723cs.MANov 2026

Manuscript Offprint

arXiv:2611.08723

Divide, Diagnose, and Compose: Optimizing Agentic Pipelines and Harnesses

Divij Handa, Christopher Tensmeyer, Jihyung Kil, Vlad I. Morariu

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.

1 INTRODUCTION

Large language models (LLMs) are increasingly deployed not as isolated models but as components of larger agentic pipelines and harnesses that combine multiple model calls with tools, memory, retrieval, verification, and control flow. The behavior of such pipelines depends on substantially more than just the choice of a base model. Developers must decide what instructions each component receives, how components exchange information, which models serve which roles, how much inference-time computation each call receives, what context is retained or discarded, and when intermediate outputs should be verified or revised. These design choices are cou-

pled: a cheaper model may demand stronger scaffolding, and an added verifier increases both cost and latency. Therefore, manually tuning an agentic pipeline for competing objectives such as performance, cost, and latency is expensive and requires substantial task-specific expertise (Zhou et al., 2025; Hua et al., 2026). As a result, a growing body of work shows that autonomously optimizing all prompts, demonstrations, workflow structure, model selection, context, or agent roles can

Figure

Figure 1: Improvements of DECAF over Meta-Harness (best baseline) across all benchmarks.

*Work done during internship at Adobe

Figure

Figure 2: Given task details, development examples, seed agentic pipeline, and objectives, DECAF first identifies task-relevant optimization dimensions and generates diverse experimental hypotheses for each (Divide). Independent coding-agent sessions then optimize copies of the seed pipeline under dimension-specific edit constraints, producing Pareto candidates, execution trajectories, and structured findings (Diagnose). Finally, a synthesis optimizer combines compatible dimension-level findings and performs targeted cross-dimension revisions to produce a unified pipeline on the performance-cost-latency frontier with the help of a component or node-level diagnosis tool (Compose).

each produce meaningful gains in multi-LLM agentic pipelines (Wu et al., 2026; Saeidi et al., 2026; Zhang et al., 2025b; Agrawal et al., 2025; Opsahl-Ong et al., 2024).

These techniques, however, exhibit one or more of the following limitations. First, several optimizers are constrained by design to a narrow set of dimensions. For example, GEPA (Agrawal et al., 2025) optimizes just the prompts of all agents, while AFlow (Zhang et al., 2025b) works by optimizing the topology of the pipeline. Optimizing multiple dimensions jointly has been shown to outperform optimizing just a single dimension (Zhou et al., 2025). Second, LLMs tend to produce solutions that lack diversity (Handa et al., 2026; Brown et al., 2024), a weakness that is amplified when they act as optimizers and must propose genuinely distinct candidate edits to a pipeline (Lee et al., 2026). Third, several optimizers proceed by trial and error without producing a reasoning trace, which makes the resulting changes difficult to understand, audit, or build upon (Zhang et al., 2025a). Finally, recent work argues that measuring each agent's individual contribution provides a more informative reward than a single final binary outcome score (Wang et al., 2026). Such fine-grained credit reveals which component is responsible for a failed or successful trajectory. To address these challenges, we introduce the Decomposed Credit-Assignment Framework (DECAF) for optimizing multi-agent pipelines and harnesses. Figure 2 illustrates its overall workflow.

DECAF begins by reading the task description, a few development examples, the seed agentic pipeline to be optimized, and the objectives (or metrics) it has to achieve. We treat each pipeline as a computational graph G=(V,E)G = (V, E), where each node v∈Vv \in V is an executable component of the pipeline, such as an LLM agent initialized with a particular role. Conditioned on the benchmark and seed pipeline information, DECAF starts by proposing the dimensions along which the pipeline can be optimized. Then for each dimension it iteratively generates diverse experiments (Handa et al., 2026) to improve exploration of ideas to test. Each dimension's experiments are executed by an independent coding-agent session that is restricted to edits within that dimension's scope. The findings of all dimension-specific sessions are recorded and passed to a final stage, in which a single coding agent optimizes the whole pipeline using the accumulated evidence. This synthesis agent is additionally given a node_eval tool, which reads trajectories generated by the current pipeline and produces a detailed score for each component, localizing the agents most in need of revision.

DECAF's main contribution is the way it organizes open-ended search for optimization. Rather than restricting optimization to a predefined design axis or tasking a single optimizer to modify the full pipeline monolithically, DECAF (i) adaptively decomposes the search space into task and pipeline-specific dimensions that are explored in independent coding-agent sessions, (ii) forces exploration within each dimension by generating diverse experiment hypothesis, and (iii) recomposes all dimension-level findings in a final synthesis stage using component-level trajectory feedback. Together, these mechanisms make pipeline optimization more structured, traceable, and amenable to localized diagnosis. Across held-out evaluations on a diverse suite of agentic benchmarks, DECAF improves the performance-cost-latency frontier over baselines. Compared to the strongest overall baseline, Meta-Harness (Lee et al., 2026), it improves task performance by an average of 2.58pp, while reducing per-task inference cost by 4.30% and end-to-end latency by 42.45% (Figure 1).