NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

StepFly: Agentic Troubleshooting Guide Automation for Incident Diagnosis

Jiayi Mao, Liqun Li, Yanjie Gao, Zegang Peng, Shilin He, Chaoyun Zhang, Si Qin, Samia Khalid, Qingwei Lin, Saravan Rajmohan, Sitaram Lanka, Dongmei Zhang · DOI

TL;DR

StepFly is an end-to-end agentic framework that automates the execution of unstructured IT Troubleshooting Guides (TSGs) for incident diagnosis. By compiling text-based guides into structured execution Directed Acyclic Graphs (DAGs) and parameterizing database queries into reusable plugins, StepFly achieves a ~94% diagnostic success rate while drastically slashing resolution times through parallel step execution.

What Problem Does This Paper Address?

When large-scale cloud services experience outages, Site Reliability Engineers (SREs) rely on Troubleshooting Guides (TSGs) to triage, diagnose, and mitigate the issue. However, these TSGs are typically unstructured, natural-language documents filled with complex conditional branching, ambiguous instructions, and lengthy database query templates (e.g., Kusto Query Language or KQL).

Manual execution under time pressure is slow and error-prone. While Large Language Models (LLMs) show promise for automation, standard LLM agents fail in real-world deployment because they struggle with complex control flows, frequently hallucinate or misformat database queries when generating them "on the fly," and execute steps strictly sequentially—even when many diagnostic checks could be run simultaneously.

Methods

StepFly addresses these challenges by splitting the automation process into an offline preprocessing phase and an online execution phase:

  1. TSG Mentor (Offline Quality Improvement): An LLM-powered tool that automatically analyzes raw TSGs, flags ambiguities or missing parameters, and helps SREs reformulate them into clearer documentation.
  2. DAG & QPP Extraction (Offline Preprocessing): StepFly uses an LLM to compile the unstructured TSG text into a lightweight Directed Acyclic Graph (DAG) that explicitly maps out step dependencies and conditional logic. Concurrently, it extracts complex query templates into Query Preparation Plugins (QPPs). Instead of asking the LLM to write a query from scratch during an incident, StepFly simply passes parameters to these pre-extracted plugins.
  3. Scheduler-Executor Architecture (Online Execution): An event-driven scheduler orchestrates the workflow based on the extracted DAG. When independent diagnostic paths are available, the scheduler deploys multiple homogeneous executor agents to run them in parallel.
  4. Structured Memory System: To prevent massive log outputs or time-series data from bloating the LLM's context window, StepFly utilizes a key-value memory backend (MongoDB). Plugins store raw data frames directly in memory and pass lightweight reference keys back to the agent.

Datasets

The authors conducted an initial empirical study on 92 real-world TSGs across 9 different product teams at Microsoft. For evaluation, they curated a dataset consisting of:

  • 15 representative TSGs spanning various production scenarios (e.g., availability drops, latency spikes, pipeline failures).
  • 80 real-world incidents sampled from a large-scale production system at Microsoft.

Key Insights and Ideas

  • Parallelism is Hidden in Plain Sight: The empirical study revealed that ~46% of real-world TSGs have potential for concurrency (e.g., checking for recent code deployments while simultaneously querying upstream service health). SREs write them sequentially for human readability, but machines don't have to execute them that way.
Fig. 2. TSG parallelization opportunity categories.
  • Ditch On-the-Fly Query Generation: LLMs frequently fail at generating domain-specific query languages like KQL due to syntax nuances and escape character errors. Moving the complexity offline into parameterized plugins (QPPs) eliminates the risky text-to-query generation loop entirely.
  • Context Bloat is a Performance Killer: Passing thousands of rows of log data directly into an LLM prompt wastes tokens and triggers reasoning errors. Passing data references via a structured memory system reduced the context representation size by 96% in case studies.

Key Results

  • High Success Rate: Powered by GPT-4.1, StepFly achieved a 94.38% success rate in executing TSGs correctly, significantly outperforming standard ReAct (71.25%) and TaskWeaver (80.0%) baselines.
  • Massive Speedups: For parallelizable TSGs, StepFly reduced end-to-end execution time by 32.9% to 70.4% depending on the structure of the guide.
  • Real-World Impact: A prototype of StepFly deployed in production at Microsoft—triggered hundreds of times weekly across more than 70 teams—reduced the median incident mitigation time by ~34%.

Limitations and Future Work

While highly effective, StepFly currently relies on heuristics and templates derived from a specific enterprise environment, which might affect its immediate generalizability to organizations with vastly different TSG formats. Additionally, identifying parallelization opportunities during the TSG revision stage still requires human domain expertise. The authors note that leveraging LLMs to completely automate the parallelization restructuring of legacy TSGs is a promising direction for future work.

Summary updated

BibTeX
@article{mao2026stepfly,
  author = {Jiayi Mao and Liqun Li and Yanjie Gao and Zegang Peng and Shilin He and Chaoyun Zhang and Si Qin and Samia Khalid and Qingwei Lin and Saravan Rajmohan and Sitaram Lanka and Dongmei Zhang},
  title = {{StepFly: Agentic Troubleshooting Guide Automation for Incident Diagnosis}},
  journal = {Proc. ACM Softw. Eng.},
  year = {2026},
  doi = {10.1145/3808143},
}
Figure