AgentInspect: Diagnosing Behavioral Failures in Artificial Intelligence Agents

AgentInspect: диагностика поведенческих сбоев в агентах искусственного интеллекта
Foutse Khomh, Ruchira Manke, Mohammad Wardat, Hridesh Rajan
2026-10-01

AI agent testingbehavioral failure detectionbehavioral robustnesscoverage-guided test generationtool behavior simulation
Effectively testing Artificial Intelligence (AI) agents remains a fundamental challenge due to their stochastic reasoning, vast and diverse input space, reliance on external tools, and operation in dynamic execution environments; factors that demand new testing methodologies explicitly tailored to the complex and interactive nature of agent-based systems. This work presents a novel methodology for testing AI agents, with a particular focus on assessing their behavioral robustness under varied operational conditions. Our approach relies on following key technical innovations: (1) a coverage-guided test input generation strategy based on agent- specific coverage objectives, (2) a capture-and-simulate mechanism that systematically emulates abnormal tool behaviors to mimic real-world execution failures, and (3) a deterministic behavioral failure detection approach that enables consistent identification of failures across different test inputs. We developed AgentInspect, a framework that automatically detects six types of behavioral failures in LangChain-based AI agents by analyzing their execution trajectories across three evaluation settings: a baseline setting using real tool responses, a simulated setting incorporating synthetic tool responses, and a hybrid setting that combines the real and simulated tool responses. To evaluate our approach, we curated a benchmark of 35 AI agents obtained from GitHub. Our results show that AgentInspect consistently identifies different behavioral failures with high precision and recall across all three execution settings. In particular, the simulated and hybrid settings expose failure modes that do not emerge during baseline execution with real tool responses, thereby enabling a more comprehensive assessment of agent robustness. Our findings highlight AgentInspect’s effectiveness in revealing critical failures and its practical utility for systematic robustness evaluation of AI agents.
1
A deterministic failure-detection method identifies six behavioral failure types consistently across different test inputs and execution trajectories.
2
AgentInspect evaluates 35 GitHub-sourced LangChain agents across real-response, simulated-response, and hybrid settings.
3
AgentInspect introduces agent-specific coverage-guided test generation for evaluating behavioral robustness under diverse operational conditions.
4
Simulated and hybrid tool-response settings reveal failure modes absent from baseline execution, while maintaining high precision and recall across settings.
5
The framework captures and simulates abnormal tool behaviors, enabling systematic emulation of real-world execution failures.

LangChain-based AI agents

Behavioral robustness and failure modes under varied operational conditions, including abnormal tool behaviors and different execution settings

Publication Details
Publication Date
2026-10-01
Journal
Publisher
ISSN
Cited by
0
Access Type
Author Information
Authors
Foutse Khomh
Ruchira Manke
Mohammad Wardat
Hridesh Rajan
Explore further
Open the scid.ai AI chat with a ready-made request: it will find papers on a similar topic and help build a literature review.
Find similar papers in the chat →
Make a presentation
100%