TL;DR
Agentic systems, while powerful, generate complex execution traces that are difficult to debug. TraceSIR introduces a novel multi-agent framework that structures these traces, enabling fine-grained analysis, root cause identification, and actionable reporting, significantly outperforming existing methods.
What Problem Does This Paper Address?
Modern AI systems, particularly those leveraging Large Language Models (LLMs) augmented with external tools and iterative decision-making (often called "agentic systems"), are capable of tackling increasingly complex tasks. However, the sheer length and intricacy of their execution traces—the step-by-step record of their actions, thoughts, and observations—make debugging and understanding failures incredibly challenging. Manually sifting through thousands of tool calls and sub-agent interactions is infeasible. While LLMs can process text, their input length limitations and potential for unreliable reasoning hinder direct analysis of raw traces. Simply looking at the final outcome of a task misses crucial behavioral information needed for effective diagnosis. This paper addresses the critical need for a scalable and structured approach to analyze these agentic execution traces, identify the root causes of failures, and generate useful reports for developers.
Methods
TraceSIR employs a three-agent, multi-agent architecture:
- StructureAgent: This agent's primary role is to create a novel, compressed representation of execution traces called TraceFormat. It abstracts away redundant information while preserving essential behavioral signals, effectively reducing the trace's complexity without losing critical context. This is achieved through a deterministic parsing function that transforms the raw message sequence into a structured format of "Thought, Action, Observation" rounds.
- InsightAgent: Built upon the structured traces from StructureAgent, this agent performs fine-grained, instance-level diagnostic analysis. It goes beyond just looking at the final outcome to uncover behavioral issues and performance limitations by reasoning over the entire trace. It provides structured outputs including an overall assessment, error identification, weakness analysis, root cause analysis, and actionable optimization suggestions.
- ReportAgent: This agent operates at a higher level, aggregating insights from multiple task instances. It determines when a report is warranted, performs statistical analysis on aggregated diagnostics (like error frequency and score distribution), and generates comprehensive, evidence-grounded analysis reports in a structured format (Markdown). It aims to provide systematic and detailed insights to support decision-making.
Datasets
The authors introduce TraceBench, a new benchmark designed for evaluating agentic execution trace analysis. TraceBench is constructed from 150 failed task instances collected from three representative real-world agentic benchmarks:
- BrowseComp (Deep Research)
- Tau2Bench (Function Calling)
- SWE-bench (Agentic Coding)
These traces were collected using the GLM-4.6 model and represent failure cases where the gold score was 0.
Key Insights and Ideas
- TraceFormat is Crucial: The core innovation is the TraceFormat, which effectively balances trace compression with the preservation of essential behavioral information. This structured representation is key to overcoming LLM input length limitations and enabling deeper analysis.
- Multi-Agent Specialization Works: The separation of concerns into StructureAgent, InsightAgent, and ReportAgent allows for a more robust and scalable analysis pipeline, handling both individual trace complexity and cross-case aggregation effectively.
- Beyond Outcome-Only Evaluation: The paper strongly advocates for and demonstrates the superiority of analyzing the entire execution trace rather than just the final outcome, which is essential for accurate root cause analysis.
- Industry-Relevant Reporting: The introduction of ReportEval, a protocol for evaluating the quality and usability of analysis reports, highlights the practical need for actionable insights that align with industry requirements.
Key Results
Experiments conducted on the TraceBench benchmark and evaluated using the ReportEval protocol showed that TraceSIR consistently and significantly outperforms the baseline method (ClaudeCode).
- Human Evaluation: TraceSIR achieved a 9.7% relative improvement in overall report quality compared to ClaudeCode.
- LLM-as-a-Judge Evaluation: TraceSIR showed a 7.5% relative improvement over ClaudeCode.
- Specific improvements were noted across various dimensions, with particularly pronounced gains in error analysis and root cause analysis.
- The system demonstrated robustness, producing high-quality reports even with weaker LLM backbones.
Limitations and Future Work
The authors acknowledge several limitations:
- LLM Dependency: TraceSIR's performance is influenced by the capabilities of the underlying LLMs, which can be a bottleneck in highly specialized or complex domains.
- Scalability for Very Large Datasets: The current report generation strategy assumes a moderate number of task instances. Processing extremely large collections might require hierarchical aggregation or incremental reporting mechanisms.
- Response Time and Token Consumption: TraceSIR can incur long response times and high token consumption, impacting efficiency and reproducibility.
- LLM Randomness: Reports may vary due to the inherent randomness of LLMs.
Future work could focus on mitigating latency, reducing cost, and improving the reproducibility of the system. Further research into more advanced hierarchical aggregation for massive trace collections and exploring alternative abstraction techniques are also promising directions.
Summary updated