Current
AgentPex: Open-Source Execution Violation Detection for AI Agents
AgentPex is an open-source system from Microsoft Research that detects execution violations and misbehavior in AI agent workflows by analyzing multi-step execution traces to identify routing errors and unsafe tool usage that final-result inspection misses.
Signal
AgentPex · @AISuperDomain · 2026-06-01
Microsoft Research introduces AgentPex, an open-source system designed to detect misbehavior and execution violations in AI agents running multi-step workflows. The system addresses the scalability challenge of auditing long execution traces where manual verification is impractical and final-result inspection fails to capture intermediate errors such as incorrect routing or unsafe tool usage. AgentPex analyzes execution trajectories to identify these process-level failures.
Context
As AI agents transition to deploying multi-step workflows in real-world systems, execution traces grow in length and complexity. Traditional audit mechanisms that rely on manual review of execution paths or inspection of final outputs become insufficient. Manual review does not scale with trace length, and final-result checks often miss critical process violations, such as agents taking incorrect routing decisions or invoking tools in unsafe contexts before the workflow completes. AgentPex emerges to fill this gap by providing automated detection of violations within the execution trace, enabling verification of the agent's behavior throughout the workflow rather than just at the endpoint.
Relevance
AgentPex addresses a critical gap in agent reliability and safety: the inability to verify the integrity of long-horizon execution traces. By detecting routing errors and unsafe tool usage mid-workflow, the system enables fine-grained auditability for autonomous agents. This capability is essential for deploying agents in production environments where process correctness is as important as output quality. AgentPex supports the shift toward verifiable agent infrastructure by providing a mechanism to inspect and validate execution behavior against expected patterns.
Current State
AgentPex is an open-source system released by Microsoft Research. It focuses on detecting execution violations and misbehavior in AI agent workflows. The system analyzes multi-step execution traces to identify intermediate errors, including routing mistakes and unsafe tool usage. It is designed to handle the volume and complexity of traces generated by real-world agent deployments, offering a solution where manual review is not feasible and final-result inspection is inadequate.
Open Questions
- Does AgentPex support automated remediation or intervention when violations are detected, or is it limited to detection and logging?
- How does AgentPex integrate with existing agent frameworks and runtime environments to capture execution traces?
- What types of violations can AgentPex detect? Does it support semantic policy violations, or is it restricted to structural and syntactic errors?
- What is the computational overhead of running AgentPex analysis on execution traces, and how does it impact agent latency?
Connections
- AgentPex contributes execution-level violation detection to the agent evaluation and red-teaming infrastructure, enhancing the ability to audit agent behavior at the trace level.
- AgentPex implements the execution-layer monitoring component of lifecycle security architectures by providing trace analysis across initialization, input, memory, decision, and execution phases.
- AgentPex detects violations within execution traces, complementing Claw Patrol's focus on perimeter defense and policy enforcement at the workflow boundary.
- AgentPex enables violation detection in multi-step workflows, supporting the safety testing goals of frameworks like RAMPART by providing a mechanism to identify failures in complex agent trajectories.