Systematic debugging for AI agents: Introducing the AgentRx framework

TL;DR · AI 摘要
微软研究院提出AgentRx框架,旨在为AI智能体提供系统化的调试方法与工具链,以解决复杂Agent行为不可控、错误难追踪等工程痛点。但提供的正文仅为网站导航栏,缺乏具体架构、实现原理与实践案例等核心技术细节。
核心要点
- 微软研究院发布AgentRx框架,填补AI智能体系统化调试工具空白。
- 该框架提供标准化调试流程,旨在提升复杂Agent行为的可观测性与排错效率。
- 提供的正文内容缺失,仅为网站导航结构,无法评估具体技术实现与工程价值。
Systematic debugging for AI agents: Introducing the AgentRx framework - Microsoft Research

Our research
#### Resources
#### Research areas: Intelligence
- Artificial intelligence
- Audio & acoustics
- Computer vision
- Graphics & multimedia
- Human-computer interaction
- Human language technologies
- Search & information retrieval
#### Research areas: Systems
- Data platforms and analytics
- Hardware & devices
- Programming languages & software engineering
- Quantum computing
- Security, privacy & cryptography
- Systems & networking
#### Research areas: Theory
#### Research areas: Other Sciences
- Ecology & environment
- Economics
- Medical, health & genomics
- Social sciences
- Technology for emerging markets
Programs & events
Academic programsEvents & academic conferencesMicrosoft Research Forum
Connect & learn
Behind the Tech podcastMicrosoft Research blogMicrosoft Research ForumMicrosoft Research podcast
About
#### People & news
- About Microsoft Research
- Careers & internships
- People
- Emeritus program
- News & awards
- Microsoft Research newsletter
#### Microsoft Research Labs
- Africa
- AI for Science
- AI Frontiers
- Asia-Pacific
- Cambridge
- Health Futures
- India
- Montreal
- New England
- New York City
- Redmond
#### Other labs
More
All Microsoft
#### Tech & innovation
#### Industries
#### Partners
- Find a partner
- Become a partner
- Partner Network
- Microsoft Marketplace
- Marketplace Rewards
- Software development companies
#### Resources
- Blog
- Microsoft Advertising
- Developer Center
- Documentation
- Events
- Licensing
- Microsoft Learn
- Microsoft Research
Cancel
Search
Microsoft Research Blog
Systematic debugging for AI agents: Introducing the AgentRx framework
Published March 12, 2026
By Shraddha Barke, Senior Researcher Arnav Goyal, Research Fellow Alind Khare, Senior Researcher Chetan Bansal, Senior Principal Research Manager
Share this page
- [Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fresearch%2Fblog%2Fsystematic-debugging-for-ai-agents-introducing-the-agentrx-framework%2F "Share on Facebook")
- [Share on X](https://x.com/intent/tweet?text=Systematic%20debugging%20for%20AI%20agents%3A%20Introducing%20the%20AgentRx%20framework&url=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fresearch%2Fblog%2Fsystematic-debugging-for-ai-agents-introducing-the-agentrx-framework%2F "Share on X")
- [Share on LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fresearch%2Fblog%2Fsystematic-debugging-for-ai-agents-introducing-the-agentrx-framework%2F&title=Systematic%20debugging%20for%20AI%20agents%3A%20Introducing%20the%20AgentRx%20framework&summary=Systematic%20debugging%20for%20AI%20agents%3A%20Introducing%20the%20AgentRx%20framework&source=Microsoft%20Research "Share on LinkedIn")
- [Share on Reddit](http://www.reddit.com/submit?title=Systematic%20debugging%20for%20AI%20agents%3A%20Introducing%20the%20AgentRx%20framework&url=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fresearch%2Fblog%2Fsystematic-debugging-for-ai-agents-introducing-the-agentrx-framework%2F "Share on Reddit")
- [Subscribe to our RSS feed](https://www.microsoft.com/en-us/research/feed/ "Subscribe to our RSS feed")

At a glance
- Problem: Debugging AI agent failures is hard because trajectories are long, stochastic, and often multi-agent, so the true root cause gets buried.
- Solution:[AgentRx (opens in new tab)](https://aka.ms/AgentRx/Repo) pinpoints the _first unrecoverable (“critical failure”) step_ by synthesizing guarded, executable constraints from tool schemas and domain policies, then logging evidence-backed violations step-by-step.
- Benchmark + taxonomy: We release [AgentRx Benchmark (opens in new tab)](https://aka.ms/AgentRx/Dataset) with 115 manually annotated failed trajectories across τ-bench, Flash, and Magentic-One, plus a grounded nine-category failure taxonomy.
- Results + release: AgentRx improves failure localization (+23.6%) and root-cause attribution (+22.9%) over prompting baselines, and we are open-sourcing the framework and dataset.
As AI agents transition from simple chatbots to autonomous systems capable of managing cloud incidents, navigating complex web interfaces, and executing multi-step API workflows, a new challenge has emerged: transparency.
When a human makes a mistake, we can usually trace the logic. But when an AI agent fails, perhaps by hallucinating a tool output or deviating from a security policy ten steps into a fifty-step task, identifying exactly where and why things went wrong is an arduous, manual process.
Today, we are excited to announce the open-source release of **AgentRx** (opens in new tab), an automated, domain-agnostic framework designed to pinpoint the “critical failure step” in agent trajectories. Alongside the framework, we are releasing the [AgentRx Benchmark (opens in new tab)](https://aka.ms/AgentRx/Dataset), a dataset of 115 manually annotated failed trajectories to help the community build more transparent, resilient agentic systems.
The challenge: Why AI agents are hard to debug
Modern AI agents are often:
- Long-horizon: They perform dozens of actions over extended periods.
- Probabilistic: The same input might lead to different outputs, making reproduction difficult.
- Multi-agent: Failures can be “passed” between agents, masking the original root cause.
Traditional success metrics (like “Did the task finish?”) don’t tell us enough. To build safe agents, we need to identify the exact moment a trajectory becomes unrecoverable and capture evidence for what went wrong at that step.
Introducing AgentRx: An automated diagnostic “prescription”
AgentRx (short for “Agent Diagnosis”) treats agent execution like a system trace that needs validation. Instead of relying on a single LLM to “guess” the error, AgentRx uses a structured, multi-stage pipeline:
- Trajectory normalization: Heterogeneous logs from different domains are converted into a common intermediate representation.
- Constraint synthesis: The framework automatically generates executable constraints based on tool schemas (e.g., “The API must return a valid JSON response”) and domain policies (e.g., “Do not delete data without user confirmation”).
- Guarded evaluation: AgentRx evaluates constraints step-by-step, checking each constraint only when its _guard condition_ applies, and produces an auditable validation log of evidence-backed violations.
- LLM-based judging: Finally, an LLM judge uses the validation log and a grounded failure taxonomy to identify the Critical Failure Step—the first unrecoverable error.

_The AgentRx workflow:_ Given a failed trajectory, tool schemas, and domain policy, AgentRx synthesizes guarded constraints, evaluates them step-by-step to produce an auditable violation log with evidence, and uses an LLM judge to predict the critical failure step and root-cause category.
A New Benchmark for Agent Failures
To evaluate AgentRx, we developed a manually annotated benchmark consisting of 115 failed trajectories across three complex domains:
- τ-bench: Structured API workflows for retail and service tasks.
- Flash: Real-world incident management and system troubleshooting.
- Magentic-One: Open-ended web and file tasks using a generalist multi-agent system.
Using a grounded-theory approach, we derived a nine-category failure taxonomy that generalizes across these domains. This taxonomy helps developers distinguish between a “Plan Adherence Failure” (where the agent ignored its own steps) and an “Invention of New Information” (hallucination).
| Taxonomy Category | Description | | --- | --- | | Plan Adherence Failure | Ignored required steps / did extra unplanned actions | | Invention of New Information | Altered facts not grounded in trace/tool output | | Invalid Invocation | Tool call malformed / missing args / schema-invalid | | Misinterpretation of Tool Output | Read tool output incorrectly; acted on wrong assumptions | | Intent–Plan Misalignment | Misread user goal/constraints and planned wrongly | | Under-specified User Intent | Could not proceed because required info wasn’t available | | Intent Not Supported | No available tool can do what’s being asked | | Guardrails Triggered | Execution blocked by safety/access restrictions | | System Failure | Connectivity/tool endpoint failures |

_Analysis of failure density across domains. In multi-agent systems like Magentic-One, trajectories often contain multiple errors, but AgentRx focuses on identifying the first critical breach._
Key Results
In our experiments, AgentRx demonstrated significant improvements over existing LLM-based prompting baselines:
- +23.6% absolute improvement in failure localization accuracy.
- +22.9% improvement in root-cause attribution.
By providing the “why” behind a failure through an auditable log, AgentRx allows developers to move beyond trial-and-error prompting and toward systematic agentic engineering.
Join the Community: Open Source Release
We believe that agent reliability is a prerequisite for real-world deployment. To support this, we are open sourcing the AgentRx framework and the complete annotated benchmark.
- Read the Paper:AgentRx: Diagnosing AI Agent Failures from Execution Trajectories
- Explore the Code & Data:https://aka.ms/AgentRx/Code (opens in new tab)
We invite researchers and developers to use AgentRx to diagnose their own agentic workflows and contribute to the growing library of failure constraints. Together, we can build AI agents that are not just powerful, but auditable, and reliable.
Acknowledgements
We would like to thank Avaljot Singh and Suman Nath for contributing to this project.
Opens in a new tab
Related publications
[AgentRx: Diagnosing AI Agent Failures from Execution Trajectories](https://www.microsoft.com/en-us/research/publication/agentrx-diagnosing-ai-agent-failures-from-execution-trajectories/)
Meet the authors

Shraddha Barke
Senior Researcher

Arnav Goyal
Research Fellow

Alind Khare
Senior Researcher

Chetan Bansal
Senior Principal Research Manager
Continue reading

December 11, 2025
[Agent Lightning: Adding reinforcement learning to AI agents without code rewrites](https://www.microsoft.com/en-us/research/blog/agent-lightning-adding-reinforcement-learning-to-ai-agents-without-code-rewrites/)

May 19, 2025
[Magentic-UI, an experimental human-centered web agent](https://www.microsoft.com/en-us/research/blog/magentic-ui-an-experimental-human-centered-web-agent/)

April 10, 2025
[Debug-gym: an environment for AI coding tools to learn how to debug code like programmers](https://www.microsoft.com/en-us/research/blog/debug-gym-an-environment-for-ai-coding-tools-to-learn-how-to-debug-code-like-programmers/)

December 20, 2024
[AIOpsLab: Building AI agents for autonomous clouds](https://www.microsoft.com/en-us/research/blog/aiopslab-building-ai-agents-for-autonomous-clouds/)
Research Areas
- 
Research Groups
Related labs
Follow us:
- Follow on X
- Like on Facebook
- Follow on LinkedIn
- Subscribe on Youtube
- Follow on Instagram
- Subscribe to our RSS feed
Share this page:
What's new
- Surface Pro
- Surface Laptop
- Surface Laptop Studio 2
- Copilot for organizations
- Copilot for personal use
- AI in Windows
- Explore Microsoft products
- Windows 11 apps
Microsoft Store
- Account profile
- Download Center
- Microsoft Store support
- Returns
- Order tracking
- Certified Refurbished
- Microsoft Store Promise
- Flexible Payments
Education
- Microsoft in education
- Devices for education
- Microsoft Teams for Education
- Microsoft 365 Education
- How to buy for your school
- Educator training and development
- Deals for students and parents
- AI for education
Business
- Microsoft AI
- Microsoft Security
- Dynamics 365
- Microsoft 365
- Microsoft Power Platform
- Microsoft Teams
- Microsoft 365 Copilot
- Small Business
Developer & IT
- Azure
- Microsoft Developer
- Microsoft Learn
- Support for AI marketplace apps
- Microsoft Tech Community
- Microsoft Marketplace
- Marketplace Rewards
- Visual Studio
Company
- Careers
- About Microsoft
- Company news
- Privacy at Microsoft
- Investors
- Diversity and inclusion
- Accessibility
- Sustainability
- Sitemap
- Contact Microsoft
- Privacy
- Manage cookies
- Terms of use
- Trademarks
- Safety & eco
- Recycling
- About our ads
- © Microsoft 2026
Notifications