As multi-agent AI systems are increasingly deployed in real-world settings - from automated customer support to DevOps remediation - failures become harder to diagnose due to cascading effects, hidden dependencies, and long execution traces. We present AgentTrace, a lightweight causal tracing framework for post-hoc failure diagnosis in deployed multi-agent workflows. AgentTrace reconstructs causal graphs from execution logs, traces backward from error manifestations, and ranks candidate root causes using interpretable structural and positional signals - without requiring LLM inference at debugging time. Across a diverse benchmark of multi-agent failure scenarios designed to reflect common deployment patterns, AgentTrace localizes root causes with high accuracy and sub-second latency, significantly outperforming both heuristic and LLM-based baselines. Our results suggest that causal tracing provides a practical foundation for improving the reliability and trustworthiness of agentic systems in the wild.
Figures & tables
Figure 1: Overview of the AgentTrace framework. (a) Execution logs from a multi-agent workflow are collected. (b) A causal graph is constructed with sequential, communication, and data dependency edges. (c) Backward BFS from the error node identifies candidate root causes. (d) Candidates are ranked using a weighted combination of five interpretable feature groups, with position features dominating ( wp=0.70 ).
Group ( wi )
Feature
Formula
Range
Position (0.70)
Normalized Position
pos(v)/∣V∣
[0,1]
Distance to Error
d(v,verror)/maxud(u,verror)
[0,1]
Depth Ratio
depth(v)/maxudepth(u)
[0,1]
Reverse Position
1−pos(v)/∣V∣
[0,1]
Structure (0.20)
Out-degree
∣{u:(v,u)∈E}∣/maxw∣{u:(w,u)∈E}∣
[0,1]
In-degree
∣{u:(u,v)∈E}∣/maxw∣{u:(u,w)∈E}∣
[0,1]
Table 1: Complete feature list with computation methods
Domain
N
Domain
N
Software Development
52
Healthcare Coordination
60
Customer Service
51
Legal Document Analysis
60
Research Analysis
51
Educational Tutoring
60
Planning & Scheduling
46
Financial Advisory
60
Financial Trading
50
DevOps Automation
60
Table 2: Benchmark domains and scenario counts (550 total)
Method
Hit@1
Hit@3
MRR
χ2
Cohen’s h
Random
9.1%
27.3%
0.18
459.2
2.41
First Node
3.6%
10.9%
0.07
497.0
2.72
Last Node
12.7%
38.2%
0.25
436.5
2.29
LLM Analysis
68.5%
81.4%
0.74
102.5
0.77
AgentTrace
94.9% [92.9, 96.7]
98.4% [96.9, 99.4]
0.97
–
–
Table 3: Root cause localization accuracy and statistical significance on the 550-scenario benchmark. 95% CIs from bootstrap resampling ( B=10,000 ). All p -values <10−10 (McNemar’s test).
Features
Hit@1
Δ
wp
Hit@1
All (P+S+C+F+E)
94.9%
–
0.50
91.3%
P only
87.3%
-7.6
0.60
93.5%
S only
34.5%
-60.4
0.70
94.9%
C only
28.7%
-66.2
0.80
93.8%
F only
15.2%
-79.7
0.90
91.1%
E only
12.1%
-82.8
Table 4: Ablation study. Left : Hit@1 with different feature group combinations (P=Position, S=Structure, C=Content, F=Flow, E=Confidence). Right : Sensitivity of Hit@1 to position weight wp .
Stratification
Category
Hit@1
MRR
Bug Type
Logic Error
95.8%
0.98
Communication Failure
93.6%
0.96
Data Corruption
94.5%
0.97
Missing Validation
94.3%
0.96
Role Confusion
94.8%
0.97
Trace Length
8–9 steps
95.5%
0.97
Table 5: Robustness analysis: Hit@1 and MRR stratified by bug type, trace length, and bug position.