# stanleyyoga123/incidentbench architecture

> Architecture diagram of the GitHub repository stanleyyoga123/incidentbench, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stanleyyoga123/incidentbench
- Repository: https://github.com/stanleyyoga123/incidentbench

## Overview

IncidentBench is a Kubernetes incident-response benchmark: researchers run repeatable scenarios, observe a bundled or external response system, preserve run evidence, then grade and compare outcomes offline. The graph follows the Runner’s experiment flow through applications, traffic, fault injection, response, and archiving, then the Grader’s assessment and reporting. It also preserves the reference agents’ detect–investigate–remediate–verify–learn stages and the MCP evidence tools. Some subsystem links are documented in the README rather than demonstrated in sampled source; those edges cite that documentation.

Main entry points: [`EvaluationPlatform/Runner/testbed/orchestration/experiment_runner.py`](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Runner/testbed/orchestration/experiment_runner.py) (Experiment Phases), [`EvaluationPlatform/Grader/grader/pipeline.py`](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/pipeline.py) (Offline Grader), [`EvaluationPlatform/Orchestrator/app/service.py`](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Orchestrator/app/service.py) (Workflow Orchestrator), [`Agents/RemediatorAgent/app/engine.py`](https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/RemediatorAgent/app/engine.py) (Guarded Remediation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runner["Experiment Runner"]
  node_runner_entry["Scenario Runner<br/>[main.py]"]
  node_experiment["Experiment Phases"]
  node_applications["Microservice Apps"]
  node_traffic["Traffic Profiles"]
  node_faults["Fault Schedules"]
  node_telemetry["Telemetry Capture"]
  node_archive[("Run Evidence Archive")]
end

subgraph group_agents["Response System"]
  node_detector["Anomaly Detection"]
  node_orchestrator["Workflow Orchestrator<br/>[service.py]"]
  node_rca["Root-Cause Analysis<br/>[engine.py]"]
  node_remediator["Guarded Remediation<br/>[engine.py]"]
  node_verification["Action Verification"]
  node_learning["Evidence-Linked Learning<br/>[engine.py]"]
end

subgraph group_evidence["Evidence Tools"]
  node_mcp["MCP Tool Server<br/>[server.py]"]
  node_tool_adapters["Telemetry and Cluster Tools"]
end

subgraph group_grading["Evaluation and Reporting"]
  node_grader["Offline Grader<br/>[pipeline.py]"]
  node_research_metrics["Operational Comparisons<br/>[research.py]"]
  node_reports["Reports and Timelines<br/>[reports.py]"]
end

node_researcher(("Researcher"))
node_cluster["Kubernetes Cluster"]
node_model_judge["Configured Model Judge"]

node_researcher -->|"runs scenarios"| node_runner_entry
node_runner_entry -->|"starts phases"| node_experiment
node_experiment -->|"deploys and resets"| node_applications
node_experiment -->|"starts traffic"| node_traffic
node_experiment -->|"executes faults"| node_faults
node_traffic -->|"drives workloads"| node_applications
node_faults -->|"injects faults"| node_cluster
node_applications -->|"run on"| node_cluster
node_experiment -->|"captures measurements"| node_telemetry
node_telemetry -->|"preserves evidence"| node_archive
node_experiment -->|"archives run inputs"| node_archive
node_detector -->|"observes symptoms"| node_cluster
node_detector -->|"submits incident leads"| node_orchestrator
node_orchestrator -->|"queues investigation"| node_rca
node_rca -->|"gathers evidence"| node_mcp
node_mcp -->|"dispatches tools"| node_tool_adapters
node_tool_adapters -->|"queries current state"| node_cluster
node_orchestrator -->|"submits remediation"| node_remediator
node_remediator -->|"uses guarded tools"| node_mcp
node_remediator -->|"applies and verifies changes"| node_cluster
node_orchestrator -->|"submits learning"| node_learning
node_learning -->|"returns lessons"| node_orchestrator
node_learning -->|"informs later investigations"| node_rca
node_grader -->|"reads archived runs"| node_archive
node_grader -->|"requests semantic scoring"| node_model_judge
node_grader -->|"computes comparisons"| node_research_metrics
node_research_metrics -.->|"feeds assessments"| node_reports
node_grader -->|"produces reports"| node_reports
node_researcher -->|"inspects outcomes"| node_grader

click node_runner_entry "https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Runner/testbed/main.py"
click node_experiment "https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Runner/testbed/orchestration/experiment_runner.py"
click node_applications "https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/resources/applications"
click node_traffic "https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/loadgenerator"
click node_faults "https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/chaos"
click node_telemetry "https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/evaluator"
click node_archive "https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/artifacts"
click node_detector "https://github.com/stanleyyoga123/incidentbench/tree/main/Agents/AnomalyDetector/src"
click node_orchestrator "https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Orchestrator/app/service.py"
click node_rca "https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/RCAAgent/app/engine.py"
click node_remediator "https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/RemediatorAgent/app/engine.py"
click node_verification "https://github.com/stanleyyoga123/incidentbench/tree/main/Agents/RemediatorAgent/app"
click node_learning "https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/LearningAgent/app/engine.py"
click node_mcp "https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/MCPTools/app/server.py"
click node_tool_adapters "https://github.com/stanleyyoga123/incidentbench/tree/main/Agents/MCPTools/app/tools"
click node_grader "https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/pipeline.py"
click node_research_metrics "https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/research.py"
click node_reports "https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/reports.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner_entry,node_experiment,node_applications,node_traffic,node_faults,node_telemetry,node_archive toneBlue
class node_detector,node_orchestrator,node_rca,node_remediator,node_verification,node_learning toneAmber
class node_mcp,node_tool_adapters toneMint
class node_grader,node_research_metrics,node_reports toneRose
class node_researcher,node_cluster,node_model_judge toneIndigo
```

## Components

### Experiment Runner

- [Scenario Runner](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Runner/testbed/main.py): `EvaluationPlatform/Runner/testbed/main.py`
- [Experiment Phases](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Runner/testbed/orchestration/experiment_runner.py): `EvaluationPlatform/Runner/testbed/orchestration/experiment_runner.py`
- [Microservice Apps](https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/resources/applications): `EvaluationPlatform/Runner/resources/applications`
- [Traffic Profiles](https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/loadgenerator): `EvaluationPlatform/Runner/testbed/loadgenerator`
- [Fault Schedules](https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/chaos): `EvaluationPlatform/Runner/testbed/chaos`
- [Telemetry Capture](https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/evaluator): `EvaluationPlatform/Runner/testbed/evaluator`
- [Run Evidence Archive](https://github.com/stanleyyoga123/incidentbench/tree/main/EvaluationPlatform/Runner/testbed/artifacts): `EvaluationPlatform/Runner/testbed/artifacts`

### Response System

- [Anomaly Detection](https://github.com/stanleyyoga123/incidentbench/tree/main/Agents/AnomalyDetector/src): `Agents/AnomalyDetector/src`
- [Workflow Orchestrator](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Orchestrator/app/service.py): `EvaluationPlatform/Orchestrator/app/service.py`
- [Root-Cause Analysis](https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/RCAAgent/app/engine.py): `Agents/RCAAgent/app/engine.py`
- [Guarded Remediation](https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/RemediatorAgent/app/engine.py): `Agents/RemediatorAgent/app/engine.py`
- [Action Verification](https://github.com/stanleyyoga123/incidentbench/tree/main/Agents/RemediatorAgent/app): `Agents/RemediatorAgent/app`
- [Evidence-Linked Learning](https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/LearningAgent/app/engine.py): `Agents/LearningAgent/app/engine.py`

### Evidence Tools

- [MCP Tool Server](https://github.com/stanleyyoga123/incidentbench/blob/main/Agents/MCPTools/app/server.py): `Agents/MCPTools/app/server.py`
- [Telemetry and Cluster Tools](https://github.com/stanleyyoga123/incidentbench/tree/main/Agents/MCPTools/app/tools): `Agents/MCPTools/app/tools`

### Evaluation and Reporting

- [Offline Grader](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/pipeline.py): `EvaluationPlatform/Grader/grader/pipeline.py`
- [Operational Comparisons](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/research.py): `EvaluationPlatform/Grader/grader/research.py`
- [Reports and Timelines](https://github.com/stanleyyoga123/incidentbench/blob/main/EvaluationPlatform/Grader/grader/reports.py): `EvaluationPlatform/Grader/grader/reports.py`

### Other components

- **Researcher**
- **Kubernetes Cluster**
- **Configured Model Judge**

## Connections

- Researcher → Scenario Runner: runs scenarios (evidence: `README.md`)
- Scenario Runner → Experiment Phases: starts phases (evidence: `EvaluationPlatform/Runner/testbed/main.py`)
- Experiment Phases → Microservice Apps: deploys and resets (evidence: `README.md`)
- Experiment Phases → Traffic Profiles: starts traffic
- Experiment Phases → Fault Schedules: executes faults (evidence: `README.md`)
- Traffic Profiles → Microservice Apps: drives workloads (evidence: `README.md`)
- Fault Schedules → Kubernetes Cluster: injects faults (evidence: `README.md`)
- Microservice Apps → Kubernetes Cluster: run on (evidence: `README.md`)
- Experiment Phases → Telemetry Capture: captures measurements (evidence: `README.md`)
- Telemetry Capture → Run Evidence Archive: preserves evidence (evidence: `README.md`)
- Experiment Phases → Run Evidence Archive: archives run inputs (evidence: `README.md`)
- Anomaly Detection → Kubernetes Cluster: observes symptoms (evidence: `README.md`)
- Anomaly Detection → Workflow Orchestrator: submits incident leads (evidence: `README.md`)
- Workflow Orchestrator → Root-Cause Analysis: queues investigation (evidence: `EvaluationPlatform/Orchestrator/app/service.py`)
- Root-Cause Analysis → MCP Tool Server: gathers evidence (evidence: `README.md`)
- MCP Tool Server → Telemetry and Cluster Tools: dispatches tools (evidence: `Agents/MCPTools/app/server.py`)
- Telemetry and Cluster Tools → Kubernetes Cluster: queries current state (evidence: `README.md`)
- Workflow Orchestrator → Guarded Remediation: submits remediation (evidence: `EvaluationPlatform/Orchestrator/app/service.py`)
- Guarded Remediation → MCP Tool Server: uses guarded tools (evidence: `README.md`)
- Guarded Remediation → Kubernetes Cluster: applies and verifies changes (evidence: `README.md`)
- Workflow Orchestrator → Evidence-Linked Learning: submits learning (evidence: `EvaluationPlatform/Orchestrator/app/service.py`)
- Evidence-Linked Learning → Workflow Orchestrator: returns lessons (evidence: `README.md`)
- Evidence-Linked Learning → Root-Cause Analysis: informs later investigations (evidence: `README.md`)
- Offline Grader → Run Evidence Archive: reads archived runs (evidence: `README.md`)
- Offline Grader → Configured Model Judge: requests semantic scoring (evidence: `README.md`)
- Offline Grader → Operational Comparisons: computes comparisons (evidence: `EvaluationPlatform/Grader/grader/pipeline.py`)
- Operational Comparisons → Reports and Timelines: feeds assessments
- Offline Grader → Reports and Timelines: produces reports (evidence: `README.md`)
- Researcher → Offline Grader: inspects outcomes (evidence: `README.md`)
