TRACE: Capability-Targeted Agentic Training
| Authors | Hangoo Kang et al. |
| Year | 2026 |
| HF Upvotes | 13 |
| arXiv | 2604.05336 |
| Download | |
| HF Page | View on Hugging Face |
Abstract
Large Language Models (LLMs) deployed in agentic environments must exercise multiple capabilities across different task instances, where a capability is performing one or more actions in a trajectory that are necessary for successfully solving a subset of tasks in the environment. Many existing approaches either rely on synthetic training data that is not targeted to the model's actual capability deficits in the target environment or train directly on the target environment, where the model needs to implicitly learn the capabilities across tasks. We introduce TRACE (Turning Recurrent Agent failures into Capability-targeted training Environments), an end-to-end system for environment-specific agent self-improvement. TRACE contrasts successful and failed trajectories to automatically identify lacking capabilities, synthesizes a targeted training environment for each that rewards whether the capability was exercised, and trains a LoRA adapter via RL on each synthetic environment, routing to the relevant adapter at inference. Empirically, TRACE generalizes across different environments, improving over the base agent by +14.1 points on τ^2-bench (customer service) and +7 perfect scores on ToolSandbox (tool use), outperforming the strongest baseline by +7.4 points and +4 perfect scores, respectively. Given the same number of rollouts, TRACE scales more efficiently than baselines, outperforming GRPO and GEPA by +9.2 and +7.4 points on τ^2-bench.
Engineering Breakdown
Plain English
TRACE is a system that automatically improves LLM agents by analyzing their failures in target environments and generating capability-targeted training data without relying on expensive synthetic datasets. The core insight is that agent failures reveal specific capability gaps—discrete skills needed to solve subsets of tasks—which can be isolated and trained directly rather than letting models implicitly learn across mixed tasks. The system contrasts successful and failed trajectories to identify exactly which capabilities an agent lacks, then creates focused training environments to address those deficits. This approach aims to bridge the gap between expensive synthetic data generation and naive direct environment training, enabling environment-specific self-improvement with better sample efficiency.
Core Technical Contribution
TRACE's technical novelty lies in its failure-driven capability identification mechanism: rather than training on all trajectories equally or generating synthetic data broadly, it performs contrastive analysis between successful and failed agent paths to surface the specific, minimal capabilities needed to close performance gaps in a given environment. The system treats capabilities as compositional units—sequences of actions within trajectories that are individually necessary for task success—and uses this decomposition to create targeted training environments that isolate each capability gap. This is fundamentally different from prior approaches that either assume fixed capability sets (curriculum learning) or train end-to-end without explicit capability modeling. The innovation is operationalizing the implicit idea that agent failures encode high-signal training targets when properly analyzed.
How It Works
TRACE operates in a closed loop: (1) an LLM agent attempts tasks in the target environment and generates trajectories (both successful and failed), (2) the system performs failure analysis by contrasting failed trajectories against successful ones to identify which actions or action sequences were missing or incorrect, (3) from this analysis, it isolates specific capability deficits—e.g., 'retrieve and parse database results' or 'validate output format'—that appear across multiple failed task instances, (4) for each identified capability gap, TRACE generates or constructs a minimal training environment that requires precisely that capability to succeed, (5) the agent is fine-tuned on demonstrations or trajectories from these synthetic capability-targeted environments, (6) the improved agent is then re-deployed in the target environment to validate capability improvement and identify remaining gaps. The key architectural insight is that the synthetic data generation is not broad or task-generic but laser-focused on observed failure modes.
Production Impact
For teams running LLM agents in production, TRACE offers a scalable alternative to manual failure analysis and data labeling: instead of engineers manually inspecting agent logs to identify why tasks failed, the system automates this diagnosis and generates remedial training data automatically. This directly reduces the iteration cycle for agentic system improvement—you run agents, TRACE identifies capability gaps, you fine-tune on targeted synthetic data, and redeploy, all without collecting expensive human-annotated trajectories from the target domain. However, adoption requires investment in building the contrastive analysis infrastructure and capability identification logic (likely domain-specific), and the approach assumes your target environment is instrumented to record detailed trajectories and supports generating synthetic task variants for isolated capability training. The compute cost shifts from data labeling to automated synthetic data generation and potentially multiple fine-tuning cycles, but the sample efficiency gains (fewer trajectories needed to improve) likely offset this for large-scale deployments.
Limitations and When Not to Use This
TRACE assumes that failed trajectories contain sufficient signal to identify specific capability gaps, which may not hold in environments where failures are noisy or caused by rare edge cases rather than systematic capability absence. The approach requires the ability to construct synthetic training environments for each isolated capability, which is non-trivial in complex domains where task structure is tightly coupled; it's unclear how well this scales to domains where capabilities are deeply entangled or where synthetic environments differ significantly from the target distribution. The paper does not deeply address how to handle capabilities that require long-horizon reasoning or multi-step dependencies, nor does it specify how to detect when capability identification has reached diminishing returns. Additionally, the method assumes you have access to a target environment where you can run agents repeatedly; it may not apply to fine-tuning-only scenarios or environments where inference is expensive or subject to external constraints.
Research Context
TRACE builds on the agentic learning literature (ReAct, in-context learning for agents) and curriculum learning research, but shifts focus from task-level curricula to capability-level curricula defined by failure analysis. It extends self-improvement frameworks like iterative agent refinement by making the failure-to-training-data pipeline explicit and automated rather than relying on broad synthetic data generation (e.g., using LLMs to generate diverse tasks). The work relates to recent interest in interpretable agent reasoning and trajectory analysis, as well as to capability evaluation frameworks that decompose agent tasks into discrete skills. This opens a research direction toward automated, failure-driven curriculum design for agents—moving away from hand-crafted task sequences toward data-driven identification of learning priorities.
:::tip Subscribe Get weekly breakdowns of papers like this in AI Letters - the newsletter for engineers building production AI systems. :::
