Skip to main content

๐Ÿ›ก๏ธ AI Failure Observatory

MCP PyPI Python Zero Dependencies License Tests GitHub Stars Release


Behavioral safety, vulnerability probing, and product-risk auditing for Generative AI & Large Language Models.

English Documentation โ€ข ๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe Dokรผmantasyon


A lightweight, local-first platform and Model Context Protocol (MCP) Server designed to detect, track, stress-test, and report on 6 critical LLM behavioral failure modes before deploying models into mission-critical production workflows.

Built with Zero External Core Dependencies using Python's standard library (http.server, urllib.request, json, sqlite3/file persistence) with optional FastMCP connectivity for autonomous AI safety agents.


๐Ÿ“ธ Visual Showcase

๐Ÿ“Š Real-Time Risk Index & Incident Observatory Dashboard

Monitors aggregate system risk, incident distributions across 6 failure modes, and severity breakdowns. AI Failure Observatory Dashboard


โšก Live Adversarial Vulnerability Probing & Red-Teaming Studio

Direct multi-provider model stress-testing (Gemini, Claude, OpenAI, Offline) with automated heuristics. Live Adversarial Probing Studio


๐Ÿ”ฌ Reproducible Failure Benchmark Evaluations

Systematic verification suite running automated hallucination, context loss, and drift detection tests. Reproducible Evaluation Benchmarks


๐Ÿ—๏ธ Architecture Overview

flowchart TD
    subgraph PresentationLayer["๐Ÿ–ฅ๏ธ Presentation & Client Interfaces"]
        WebUI["Single-Page Dashboard (index.html)"]
        Bilingual["TR โŸท EN Internationalization Engine"]
        ReportExport["Markdown / JSON Audit Exporter"]
    end

    subgraph DualAccessLayer["โšก Dual-Mode Core Interfaces"]
        HTTPServer["Web Dashboard (server.py on Port 5089+)"]
        MCPServer["Model Context Protocol Server (mcp_server.py)"]
    end

    subgraph AnalysisEngine["๐Ÿง  Behavioral Safety Analyzers"]
        FailureAnalyzer["src/failure_analyzer.py
(Heuristic & Pattern Detection)"]
        RiskEngine["analysis/risk_analysis.py
(Composite Risk Index Calculation)"]
        EvalRunner["experiments/reproducible_evals/run_all_evals.py
(Automated Benchmarks)"]
    end

    subgraph ModelLayer["๐Ÿค– Multi-Provider LLM Gateway"]
        HeuristicSim["Built-in Heuristic Simulator (Offline)"]
        Gemini["Google Gemini (2.0 Flash / 1.5 Pro)"]
        OpenAI["OpenAI (GPT-4o / o3-mini)"]
        Claude["Anthropic Claude (3.5 Sonnet)"]
    end

    subgraph AIAssistants["๐Ÿค– AI Safety Agents"]
        ClaudeDesktop["Claude Desktop"]
        CursorIDE["Cursor IDE"]
        Antigravity["Google Antigravity"]
    end

    PresentationLayer <--> HTTPServer
    MCPServer <==> AIAssistants
    DualAccessLayer <--> AnalysisEngine
    AnalysisEngine <--> ModelLayer
    AnalysisEngine <--> StorageLayer["๐Ÿ’พ Persistent Incident Storage (data/incidents.json)"]

๐Ÿ”Œ Model Context Protocol (MCP) Server

AI Failure Observatory acts as an autonomous AI Safety & Red-Teaming Inspector over MCP. AI assistants in Claude Desktop, Cursor, VS Code, or Antigravity can audit generated text for safety violations, evaluate prompts for vulnerabilities, query formal risk taxonomies, and execute benchmark evaluations without opening a browser.

๐Ÿ› ๏ธ Exposed MCP Tools

MCP Tool Parameters Description
audit_prompt_response prompt, response, model Audits an LLM prompt-response pair for all 6 failure modes (hallucinations, fake confidence, manipulation, drift, context loss, reasoning collapse).
get_failure_taxonomy failure_type (optional) Returns formal taxonomy definitions, severity ratings (1-10), product risk implications, and concrete mitigations.
get_risk_report None Generates the real-time AI product risk scorecard, incident distributions, and high-priority vulnerability areas.
log_safety_incident model_name, prompt, response, failure_type, severity... Records a confirmed model failure into the persistent incident database for compliance auditing.
scan_multi_turn_conversation turns_json Scans multi-turn dialogues for conversational amnesia, working memory degradation, and progressive instruction drift.
run_benchmark_evaluations None Executes the automated reproducible evaluation benchmark suite across all failure modes and returns structured results.

๐Ÿš€ Claude Desktop & Cursor Setup

Add the following to your claude_desktop_config.json or Cursor MCP settings:

{
  "mcpServers": {
    "ai-failure-observatory": {
      "command": "uvx",
      "args": ["ai-failure-observatory"]
    }
  }
}

๐Ÿ’ก Example AI Prompts with MCP

Once connected, ask your AI assistant:

  • "Audit this model response for invented citations or academic hallucination."
  • "What are the product mitigations for fake confidence and calibration errors according to the failure taxonomy?"
  • "Scan this 5-turn conversation transcript for context loss and negative instruction drift."
  • "Run the benchmark evaluation suite and give me the pass/fail score across all failure modes."

๐Ÿ”ฌ Formal AI Failure Taxonomy

The platform models failures across two primary axes defined in taxonomy/ai_failure_taxonomy.md:

Category Failure Mode Severity Detection Heuristics Product Risk Impact
Output Unreliability hallucinations HIGH (9/10) Invented academic citations, fake ISBN/DOIs, fabricated biographies. Misinformation propagation, hallucinated API arguments, user liability.
Output Unreliability fake_confidence MEDIUM (4/10) Dogmatic certainty markers ("undoubtedly", "100% verified") on ungrounded facts. Unwarranted user reliance, failure to seek human verification.
Output Unreliability context_loss LOW (2/10) Multi-turn conversational forgetting of initial system/user constraints. Broken agentic workflows, repetitive loops, context degradation.
Behavioral Alignment instruction_drift MEDIUM (4/10) Violation of explicit negative constraints ("Do NOT mention X", forbidden words). Brand compliance violations, prompt boundary breaches.
Behavioral Alignment manipulation CRITICAL (9/10) Dark patterns, emotional urgency nudging, subtle commercial steering. Consumer deception, predatory persuasion, regulatory scrutiny.
Behavioral Alignment recursive_reasoning_collapse LOW (2/10) Semantic degeneration, circular logic loops, repetitive phrase degradation. Infinite reasoning loops, high token consumption, compute waste.

๐Ÿ› ๏ธ Quick Start

1. Zero-Install Execution via uvx

# Launch the Web Dashboard (Port 5089)
uvx ai-failure-observatory --web

# Launch MCP Stdio Server (for AI agents)
uvx ai-failure-observatory

2. Standard Installation via pip

pip install ai-failure-observatory
ai-failure-observatory --web

3. Local Development & Testing

git clone https://github.com/adacreativeco/ai-failure-observatory.git
cd ai-failure-observatory
python server.py

Open http://localhost:5089 in your browser.

# Run automated tests
python -m unittest discover tests

# Run benchmark suite
python experiments/reproducible_evals/run_all_evals.py

๐Ÿ“‚ Project Structure

ai-failure-observatory/
โ”œโ”€โ”€ server.py                       # Zero-dependency HTTP server & REST API
โ”œโ”€โ”€ mcp_server.py                   # Model Context Protocol (MCP) server entry point
โ”œโ”€โ”€ index.html                      # Dark-glassmorphic SPA dashboard
โ”œโ”€โ”€ pyproject.toml                  # Standard Python packaging metadata
โ”œโ”€โ”€ requirements.txt                # Optional dependencies
โ”œโ”€โ”€ analysis/
โ”‚   โ”œโ”€โ”€ risk_analysis.py            # Composite risk calculation & report generator
โ”‚   โ””โ”€โ”€ reports/                    # Generated compliance reports (JSON/Markdown)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ failure_analyzer.py         # 6 Core behavioral heuristic analyzers
โ”‚   โ”œโ”€โ”€ mcp_tools.py                # MCP safety inspection & auditing tools
โ”‚   โ”œโ”€โ”€ llm_client.py               # Multi-provider LLM connector (Gemini, Claude, OpenAI)
โ”‚   โ”œโ”€โ”€ storage.py                  # JSON incident storage engine
โ”‚   โ””โ”€โ”€ utils.py                    # Formatter & helper utilities
โ”œโ”€โ”€ taxonomy/
โ”‚   โ”œโ”€โ”€ ai_failure_taxonomy.md      # Formal failure mode taxonomy
โ”‚   โ””โ”€โ”€ taxonomy_utils.py           # Taxonomy parser and validator
โ”œโ”€โ”€ experiments/
โ”‚   โ”œโ”€โ”€ reproducible_evals/         # Automated reproducible benchmark tests
โ”‚   โ”‚   โ”œโ”€โ”€ run_all_evals.py        # Master test runner
โ”‚   โ”‚   โ”œโ”€โ”€ test_hallucination_citation.py
โ”‚   โ”‚   โ”œโ”€โ”€ test_fake_confidence.py
โ”‚   โ”‚   โ”œโ”€โ”€ test_context_loss.py
โ”‚   โ”‚   โ”œโ”€โ”€ test_instruction_drift.py
โ”‚   โ”‚   โ”œโ”€โ”€ test_manipulation.py
โ”‚   โ”‚   โ””โ”€โ”€ test_recursive_collapse.py
โ”‚   โ””โ”€โ”€ synthetic/                  # Synthetic test data generators
โ””โ”€โ”€ tests/
    โ”œโ”€โ”€ test_observatory.py         # Core observatory unit test suite
    โ””โ”€โ”€ test_mcp.py                 # MCP tools & server test suite (21 tests total)

๐Ÿ“„ License

Distributed under the Apache 2.0 License. See LICENSE for details.


Built with ๐Ÿ›ก๏ธ by ADA Creative Co.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_failure_observatory-1.1.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_failure_observatory-1.1.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file ai_failure_observatory-1.1.0.tar.gz.

File metadata

  • Download URL: ai_failure_observatory-1.1.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for ai_failure_observatory-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8c4b30da76205b296d3b30936e4c266f729b5b401898f215908ef665c9d91bf6
MD5 0aa8cf4ee18cc226035e765a942d95e4
BLAKE2b-256 54061ea403e8f32255e29d0b6f6b65f2325e95ce6ed9e94670584191c7a3ae93

See more details on using hashes here.

File details

Details for the file ai_failure_observatory-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_failure_observatory-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf1e26e4f73249fc93a5a7c5300b085ff686538414c19246addf60cdd8d7d1af
MD5 e19d2a50e517b18e499a68c75d6de01b
BLAKE2b-256 45f5a11b1880c1f8365a452359c74e584ccce38302e4603e1a26c096d3726cf8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page