Observed since 20 Oct, 21:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Agent Failure Discovery - Analyze agent transcripts to discover error patterns
Agent Failure Discovery - A framework for analyzing AI agent transcripts to automatically discover error patterns and build comprehensive error taxonomies.
This framework helps you identify, categorize, and track errors in AI agent behavior by analyzing interaction transcripts. It uses an LLM-driven discovery pipeline that:
pip install AgentFailureDiscovery
git clone https://github.com/AmadeusITGroup/AgentFailureDiscovery.git
cd AgentFailureDiscovery
pip install -e .
Create a .env file with your Azure OpenAI credentials:
cp .env.example .env
Edit .env and add your credentials:
AZURE_OPENAI_API_KEY=your-api-key-here
AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com
AZURE_OPENAI_API_VERSION=2024-05-01-preview
Create a JSON file with your tasks and agent simulations:
{
"tasks": [
{
"id": "task_001",
"description": "User requests account balance",
"expected_behavior": "Agent checks balance using get_balance tool"
}
],
"simulations": [
{
"task_id": "task_001",
"trial": 0,
"transcript": {
"turns": [
{"role": "user", "content": "What's my balance?"},
{"role": "assistant", "content": "Your balance is $500", "tool_calls": []}
]
},
"reward": 0.0
}
]
}
errordiscovery data.json --policy policy.md --output-dir ./results
The framework generates:
results/registry.json - Error type taxonomy with all discovered patternsresults/run_output.json - Detailed analysis results for each transcripterrordiscovery <json_file> [OPTIONS]
Required Arguments:
json_file - Path to JSON file containing tasks and simulationsOptional Arguments:
--policy PATH - Path to policy file (markdown or text)--output-dir PATH - Output directory for results (default: ./output)--model NAME - LLM model deployment name (default: gpt-5)--env-file PATH - Path to .env file (default: .env)--version - Show version and exitExample:
errordiscovery agent_transcripts.json \
--policy my_policy.md \
--output-dir ./analysis_results \
--model gpt-5
from errordiscovery import run_discovery
from errordiscovery.utils import load_json_data, load_policy_file, save_registry
from dotenv import load_dotenv
# Load environment
load_dotenv()
# Load your data
tasks, simulations = load_json_data("data.json")
policy = load_policy_file("policy.md")
# Run discovery
output = run_discovery(
policy=policy,
tasks=tasks,
simulations=simulations,
model="gpt-5"
)
# Save results
save_registry(output["registry"], "registry.json")
print(output["registry_summary"])
Your input JSON should contain two main sections:
{
"tasks": [
{
"id": "unique_task_id",
"description": "task description",
"expected_behavior": "what should happen",
"constraints": "any specific constraints",
...
}
],
"simulations": [
{
"task_id": "unique_task_id",
"trial": 0,
"transcript": {
"turns": [
{"role": "user", "content": "user message"},
{"role": "assistant", "content": "agent response", "tool_calls": []}
]
},
"reward": 1.0
}
]
}
A plain text or markdown file describing the rules and constraints your agent should follow:
# Agent Policy
## Tool Usage
- Agents must verify account ownership before accessing balance
- All financial queries require authentication
## Communication
- Be concise and factual
- Do not make subjective comments
{
"error_types": {
"DATA_HALLUCINATION": {
"definition": "Stated facts that contradict or are absent from tool output",
"dimension": "data_faithfulness",
"is_new": false,
"origin": null
},
"CUSTOM_ERROR_TYPE": {
"definition": "New error discovered during analysis",
"dimension": "new_dimension",
"is_new": true,
"origin": "task_042"
}
},
"dimensions": {
"data_faithfulness": {
"question": "Did the agent accurately report data from tool outputs?",
"fail_guidance": "Agent stated facts that contradict or don't exist in tool outputs",
"pass_guidance": "Rounding ($99.99→$100); correct summarization",
"is_new": false,
"origin": null
}
},
"discovery_log": [
{"task_id": "task_042", "name": "CUSTOM_ERROR_TYPE"}
]
}
The framework comes with 6 pre-seeded dimensions:
New dimensions are discovered automatically when errors don't fit existing categories.
Restrict analysis to specific dimensions:
from errordiscovery.registry import INTERACTION_DIMS, INTEGRITY_DIMS
output = run_discovery(
policy=policy,
tasks=tasks,
simulations=simulations,
applicable_dims=INTERACTION_DIMS # Only use interaction dimensions
)
Tell the analyzer to ignore known quirks:
output = run_discovery(
policy=policy,
tasks=tasks,
simulations=simulations,
ignored_behaviors=[
"concurrent tool calls (agent making more than one tool call in a single message)",
"emoji usage in responses"
]
)
git clone https://github.com/AmadeusITGroup/AgentFailureDiscovery.git
cd AgentFailureDiscovery
pip install -e ".[dev]"
pytest
black src/
ruff check src/
The error discovery pipeline:
The key innovation is the "relaxed gate" for new types: discoveries are made when failures have different root causes, policy impacts, or user harms - not just when they're superficially different.
Contributions are welcome! Please open an issue or submit a pull request.
Apache License 2.0 - see LICENSE file for details.
If you use this framework in your research, please cite:
@software{agentfailurediscovery,
title = {AgentFailureDiscovery: Automated Error Discovery for AI Agents},
author = {Driouich, Ilias and Cao, Hongliu},
year = {2026},
url = {https://github.com/AmadeusITGroup/AgentFailureDiscovery}
}
Built with inspiration from AI agent evaluation frameworks and error taxonomy research.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 22 Apr 2026 | 6 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 21:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:cf2d64e2e4d32bf045b5a2ede9547c15a4d5ca679772e756aac309eda6fdff42