Automata from Agent Traces: Failure and Next-Step Prediction
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
LLM-based agents execute multi-step tasks, but their behavioral structure remains opaque: long unstructured traces resist the safety auditing and runtime monitoring that deployment requires. Existing approaches operate per-trace or success-only, so they miss the cross-run topology that links next-step and failure prediction. To recover that shared structure, we collapse an entire trace corpus into a single, compact finite-state machine (FSM) that serves as a structural substrate for the otherwise unpredictable behavior of LLM agents. Across twelve public datasets, the FSMs are compact (7-43 states), replay held-out data at >=0.997 fitness with near-identical topology across splits, and build in milliseconds. This substrate addresses both prediction goals. For next-step prediction, FSM-state context outperforms Agent Workflow Memory on every ground-truth-matched dataset. For failure prediction, per-state behavioral features reach held-out AUROC up to 0.94, and an online monitor ranks failing runs above passing ones from a partial trace, triggering early stopping well before completion. Behavioral topology thus appears shaped more by the deployment harness than by the LLM, providing a model-agnostic structural primitive for safety auditing and runtime monitoring.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 35 of its 54 references that are in the map. First posted on arXiv 24 Aug 2026.
Builds on
35 of 54 references.
Closest ancestors · 7
Same direction, newest first
- 2025Which Agent Causes Task Failures and When? On Automated Failure Attribution of LLM Multi-Agent Systems30 Apr
- 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr
- 2025Why Do Multi-Agent LLM Systems Fail?17 Mar
- 2024AFlow: Automating Agentic Workflow Generation14 Oct
- 2024Re-Thinking Process Mining in the AI-Based Agents Era14 Aug
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation16 Aug
Other references · 28
- 2017Attention Is All You Needcited by 59,932
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 1,908
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2023Mind2Web: Towards a Generalist Agent for the Webcited by 1,210
- 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,134
- 2025τ2-Bench: Evaluating Conversational Agents in a Dual-Control Environmentcited by 558
16 more
- 2023Identifying the Risks of LM Agents with an LM-Emulated Sandboxcited by 514
- 2023Cognitive Architectures for Language Agentscited by 422
- 2024Agent Workflow Memorycited by 342
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agentscited by 341
- 2024Trial and Error: Exploration-Based Trajectory Optimization for LLM Agentscited by 194
- 2024GUIOdyssey: A Comprehensive Dataset for Cross-App GUI Navigation on Mobile Devicescited by 190
- 2025OpenCUA: Open Foundations for Computer-Use Agentscited by 151
- 2025ShieldAgent: Shielding Agents via Verifiable Safety Policy Reasoningcited by 144
- 2024StateFlow: Enhancing LLM Task-Solving through State-Driven Workflowscited by 65
- 2019Process Mining for Python (PM4Py): Bridging the Gap Between Process- and Data Sciencecited by 32
- 2026ATBench: A Diverse and Realistic Agent Trajectory Benchmark for Safety Evaluation and Diagnosiscited by 30
- 2025SentinelAgent: Graph-based Anomaly Detection in Multi-Agent Systemscited by 22
- 2025MetaAgent: Automatically Constructing Multi-Agent Systems Based on Finite State Machinescited by 17
- 2025TraceAegis: Securing LLM-Based Agents via Hierarchical and Behavioral Anomaly Detectioncited by 11
- 2024AgentMonitor: A Plug-and-Play Framework for Predictive and Secure Multi-Agent Systemscited by 9
- 2023Stochastic Directly-Follows Process Discovery Using Grammatical Inferencecited by 3
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026TraceLab: Characterizing Coding Agent Workloads for LLM Serving
- 2026PrefixGuard: From LLM-Agent Traces to Online Failure-Warning Monitors
- 2026TraceCompiler: Skill-Guided Mining and Compilation of LLM Agent Traces into Mostly Deterministic Workflows
- 2026Early Diagnosis of Wasted Computation in Multi-Agent LLM Systems via Failure-Aware Observability
- 2025ProbGuard: Proactive Runtime Monitoring for LLM Agent Safety via Probabilistic Prediction
- 2025AgenTracer: Who Is Inducing Failure in the LLM Agentic Systems?
- 2026Auto: The AGI Compiler
- 2026Insights Generator: Systematic Corpus-Level Trace Diagnostics for LLM Agents