AI Agent Failure Patterns

The field guide to how AI agents fail in production — over 1,250 documented failure patterns, root causes, and mitigations, with deep coverage of agentic security and agentic governance for teams building production AI agents.

1267

Patterns Documented

27

Main Categories

100%

Sourced & Verified

Agentic Security & Governance

Two of the deepest, most actively maintained categories in this knowledge base — the failure modes, mitigations, and production signals teams need to ship AI agents safely and under control.

Browse by Category

Help Improve This KB

Found a pattern we're missing? Have a correction? Contribute to the knowledge base.

Contribute a Pattern

AI Agent Reliability Playbook

Failure patterns, eval recipes, mitigation strategies, and production signals for real-world AI agents.

⭐ Star this repo if you are building production AI agents. 🤝 PRs welcome: contribute failures from your domain. 📚 Use this as a checklist before shipping an AI agent.

License: MIT PRs Welcome


Index

SectionDescription
Why This Repo?What makes this playbook different
StructureHow the repository is organized
Agent TypesBase agents and domain-specific agents
How to UsePractical use cases and pattern structure
Quick ReferenceMost common failure patterns at a glance
ReferencesResearch sources, incident databases, statistics
ContributingHow to add failure patterns
Published Knowledge BaseBrowse all patterns online

Why This Repo?

Unlike academic failure taxonomies, this repository focuses on real deployment issues that engineers encounter when building and operating AI agents. Each failure pattern is a complete playbook:

  • Eval Recipes: Test cases and metrics to catch failures before production
  • Mitigation Strategies: Architecture patterns and code to prevent failures
  • Production Signals: Metrics, alerts, and dashboards to detect failures in real-time

Plus concrete examples from production systems and root cause analysis.

Structure

The repository follows a goal-based hierarchy:

agents/
├── cross-cutting/                 # Apply to ALL AI systems
│   ├── security/                  # 57 patterns
│   ├── accuracy/                  # 53 patterns
│   ├── operations/                # 112 patterns
│   ├── governance/                # 12 patterns
│   └── learning/                  # 12 patterns
│
├── by-capability/                 # Design-driven failure modes
│   ├── task-planning/             # Planning, goal understanding
│   ├── external-actions/          # External system execution
│   ├── speech-and-audio/          # Speech/audio handling
│   ├── domain-expertise/          # Domain judgment
│   ├── document-processing/       # OCR patterns
│   ├── knowledge-retrieval/       # RAG patterns
│   └── multi-agent-systems/       # Coordination
│
└── by-use-case/                   # Domain-specific (316 patterns, cleaned)
    ├── financial-services/        # 40 patterns (portfolio, trading, compliance)
    ├── healthcare/                # 35 patterns (diagnosis, treatment, safety)
    ├── legal-contracts/           # 30 patterns (risk detection, compliance)
    ├── devops/                    # 32 patterns (monitoring, capacity, deployment)
    ├── support-services/          # 31 patterns (routing, resolution, KB)
    ├── supply-chain/              # 28 patterns (forecasting, optimization)
    ├── content-marketing/         # 22 patterns (engagement, trending)
    ├── hr-recruiting/             # 18 patterns (screening, assessment)
    ├── sales-crm/                 # 20 patterns (qualification, forecasting)
    ├── insurance/                 # 18 patterns (claims, underwriting, reserves)
    ├── customer-service/          # 8 patterns (conversations, routing)
    └── mortgage-documents/        # 44 patterns (OCR, fraud, compliance)

Pattern Categories

Cross-Cutting (Apply to ALL AI Systems)

CategoryDescriptionGoalsPatterns
Cross-CuttingAll universal patterns27267
├─ SecuritySecurity, trust, runtime protection, DLP557
├─ AccuracyOutput correctness, hallucination (4 new canonical), verification, knowledge staleness, context loss8194
├─ OperationsTools, cost, coordination, memory, state12112
├─ GovernanceCompliance, audit, accountability112
└─ LearningSelf-improvement, feedback loops112

New (2026-07): Added 4 canonical hallucination patterns (Base Mechanism, Confidence Miscalibration, Attributes, Objects) with 50+ domain-variant cross-references. See Categorization Updates for details.

By Capability (Design-Driven Failure Modes)

CapabilityDescriptionGoalsPatterns
Task PlanningGoal understanding, task planning220
External ActionsAction execution in external systems111
Speech and AudioSpeech recognition and synthesis466
Domain ExpertiseDomain-specific judgment110
Document ProcessingOCR and document text extraction648
Knowledge RetrievalRAG, retrieval relevance, semantic matching660
Multi-Agent SystemsCoordination, orchestration, handoff reliability225

By Use Case (Domain-Specific)

Use CaseDescriptionPatterns
Financial ServicesPortfolio analysis, trading, regulatory compliance, market data50
HealthcareDiagnosis safety, treatment planning, drug interactions, liability45
Legal ContractsRisk detection, jurisdiction handling, compliance, amendments40
DevOpsMonitoring, capacity planning, deployment safety, anomaly detection41
Support ServicesTicket routing, complexity estimation, KB staleness, escalation41
Supply ChainDemand forecasting, supplier risk, bullwhip effect, optimization35
Content MarketingEngagement prediction, trending topics, content decay, SEO27
HR RecruitingResume screening, bias detection, skill assessment, culture fit26
Sales CRMLead qualification, forecasting, discount pressure, pipeline25
InsuranceClaims processing, underwriting, CAT modeling, fraud detection24
Customer ServiceCustomer conversation resolution, issue routing, satisfaction11
Mortgage DocumentsDocument OCR, fraud detection, compliance validation44

Total: 848 unique patterns across 80+ goals (267 cross-cutting + 266 by-capability + 315 by-use-case)
(After consolidating hallucination patterns with canonical + domain-variant model)

How to Use This Repo

Quick Start

  1. Identify your agent type - Find the category that matches your use case (e.g., agents/ocr-agent/)
  2. Browse by goal - Each agent has business/technical goals (e.g., goals/accurate-text-extraction/)
  3. Review failure patterns - Each goal contains documented failures (e.g., failures/character-confusion.md)
  4. Apply mitigations - Each failure includes root cause analysis and mitigation strategies
Agent Type → Business/Technical Goal → Failure Pattern
    ↓              ↓                        ↓
OCR Agent → Accurate Text Extraction → Character Confusion

Practical Use Cases

During Development

  • Pre-build planning: Review failure patterns for your agent type before writing code. Understanding common pitfalls helps you design defensive architectures from the start.
  • Code reviews: Reference specific failure patterns when reviewing agent implementations. Ask “Have we mitigated [failure-pattern]?”
  • Test case generation: Use failure examples to create targeted test cases that probe known weak points.

During Testing & QA

  • Red teaming: Use failure patterns as a checklist for adversarial testing. Each pattern suggests specific attack vectors or edge cases to test.
  • Evaluation design: Build evaluation datasets that specifically target documented failure modes.
  • Acceptance criteria: Define pass/fail criteria based on whether known failure patterns are adequately mitigated.

In Production

  • Incident response: When failures occur, use the taxonomy to quickly categorize and diagnose issues. Match symptoms to documented patterns for faster resolution.
  • Monitoring & alerting: Set up observability based on failure detection strategies in each pattern.
  • Post-mortems: Reference failure patterns in incident reports to connect specific failures to systemic issues.

For Teams & Organizations

  • Onboarding: New team members can study failure patterns to quickly understand what can go wrong with AI agents.
  • Knowledge sharing: Use patterns as a shared vocabulary across teams (“We’re seeing a classic context-overflow failure”).
  • Risk assessment: Before deploying agents, audit against relevant failure patterns to identify gaps.

Each Failure Pattern Includes

SectionWhat It Tells You
IssueOne-line description of the failure
FrequencyHow often this occurs (Common, Occasional, Rare)
SymptomsObservable signs that this failure is happening
Root CauseWhy this failure occurs at a technical level
ExampleConcrete scenario with code/logs showing the failure
Key StatisticsData from research and production systems
Contributing FactorsConditions that increase likelihood

Actionable Sections

SectionPurposeContents
Eval RecipesTest before productionTest cases, evaluation datasets, metrics, automated checks
Mitigation StrategiesPrevent the failurePrevention techniques, detection & response, architecture patterns
Production SignalsMonitor in productionKey metrics, logs & traces, alerts, dashboard panels, health checks

See PATTERN_TEMPLATE.md for the full pattern structure.

Coverage & Quality

Comprehensive Coverage

  • 703 unique failure patterns across 80+ goals, covering every stage of agent development
  • Universal patterns that apply to all AI systems (hallucination, context loss, output verification, knowledge staleness)
  • Capability-specific patterns organized by agent design: RAG, multi-agent coordination, speech processing, document analysis, task planning
  • Domain-specific patterns grounded in production incidents from 12 industries: financial services, healthcare, legal, DevOps, supply chain, HR, sales, insurance, and more

Quality Assurance

  • Every pattern grounded in real production incidents and peer-reviewed research (2024-2026)
  • Structured using a proven template: symptoms → root cause → eval recipes → mitigation strategies → production signals
  • Patterns organized for maximum discoverability: search by failure mechanism (cross-cutting), by agent capability (by-capability), or by your industry (by-use-case)
  • Continuously updated as new failure modes emerge in frontier models

By the Numbers

  • 40+ patterns for financial services agents (trading, portfolio analysis, compliance)
  • 35+ patterns for healthcare agents (diagnosis, treatment planning, safety)
  • 32+ patterns for DevOps agents (monitoring, capacity planning, reliability)
  • 30+ patterns for legal/contract analysis agents
  • 25+ patterns for multi-agent coordination and handoff failures
  • Coverage across emerging capabilities: vision agents, long-horizon planning, streaming inference, extended reasoning

Quick Reference: Cross-Cutting Failure Patterns

These failures appear across multiple AI systems. See Cross-Cutting Patterns for full documentation.

PatternCategoryGoalDescription
Prompt InjectionSecuritySafety & SecurityMalicious input hijacks system behavior
Memory PoisoningSecuritySafety & SecurityMalicious instructions injected into memory
MCP Protocol ExploitationSecurityRuntime SecurityMCP vulnerabilities enable RCE on 200K+ servers
Unverified OutputSecurityAgent TrustAccepting outputs without verification
Confident FabricationAccuracyOutput AccuracyFalse information stated with high confidence
Goal DriftAccuracyReasoning QualityLosing focus on original objective
Context OverflowAccuracyContext ManagementInformation loss when context exceeds limits
Infinite LoopsOperationsCost EfficiencyStuck in retry loops, burns tokens
Parameter MismatchesOperationsTool Reliability37% of tool calls have silent parameter errors
Agent MisalignmentOperationsMulti-AgentPursuing conflicting objectives
PII ExposureSecurityData Loss PreventionOutputs contain personal data
Cross-Session BleedSecurityData Loss PreventionUser A’s data appears in User B’s session

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

To add a new failure pattern:

  1. Navigate to the appropriate agent type (e.g., agents/ocr-agent/)
  2. Find or create the relevant goal folder (e.g., goals/accurate-text-extraction/)
  3. Add a new failure file in failures/ (e.g., failures/my-failure.md)
  4. Update the goal’s README.md to include your failure in the table
  5. Submit a PR

Academic Papers & Conferences

Multi-Agent Systems & Coordination

Retrieval-Augmented Generation (RAG)

Knowledge Management & Staleness

Accuracy & Verification

Failure Modes & Reliability

Financial Services & Trading

Healthcare & Medical AI

Legal & Contract Analysis

Document Processing & Vision

Bias & Fairness

Security & Privacy

Language & Natural Language Processing

Systems & Infrastructure

Industry & Practitioner Resources

AI Agent Failures & Case Studies

Document Processing & Extraction

Voice & Conversational AI

Financial Services & Lending

Security & Threats

Hallucination & Accuracy

Production & Observability

Real-World Incidents

Regulatory & Compliance

Financial Regulation

Fair Lending

Data & Privacy

Other Regulations

Tools, Frameworks & APIs

LLM Providers & APIs

Cloud & Infrastructure

UX & Design

External Resources

Incident & Risk Databases

Document & Title Standards

Reference Collections


Published Knowledge Base

Every pattern in this repository is published and kept in sync at agent-kb-autopublish.vercel.app, so you can search and browse the full playbook without cloning the repo.

Get In Touch

Contribute a patternSubmit a PR
Report an issueOpen a GitHub issue

If you’ve encountered a failure pattern not documented here, we’d love to hear about it.