Repository navigation
Architecture
arielgoes edited this page May 11, 2026
·
1 revision
OperAID is organized around a small set of orthogonal concerns: an LLM diagnosis engine, a pluggable tool registry, a deployment profile that abstracts the workload-under-test, and shell-level runners that wire fault injection and verification around each LLM session.
Each experiment run executes the following pipeline:
- Pre-flight health check — first run in a suite performs a full nuke for a clean baseline. Subsequent runs skip the nuke if the cluster is already healthy; the previous run's LLM diagnosis phase provides a natural stabilization window.
-
Fault injection — deterministic fault applied via the profile-defined method (
kubectl_apply/kubectl_patch/kubectl_scale). -
Agentic diagnosis — multi-turn LLM reasoning with function-calling access to
kubectl_*diagnostic tools (configurable). -
Remediation — proposed
kubectlcommands executed against the cluster, after passing safety filters. - Execution-based verification — health checks confirm all expected deployments are ready.
-
Fallback recovery — if LLM remediation fails, a fast reset (
helm upgrade) is attempted, with full nuke as last resort.
operaid/
├── config.env # Main configuration (LLM, K8s, timeouts)
├── run_experiment.sh # Single experiment runner (~573 lines of bash)
├── run_suite.py # Suite runner with YAML config
├── regenerate_stats.py # Rebuild suite_statistics.json + summary.csv
├── nuke-deployment.sh # Full cleanup / redeploy
├── reset-deployment.sh # Fast reset via helm upgrade
├── visualize.py # Single-run visualizer
├── visualize_suite.py # Suite visualizer (paper figures)
├── scenario_definitions.json # Legacy scenario doc (profiles are authoritative)
├── deployments/
│ └── open5gs.json # Deployment profile (faults, health, tools, prompts)
├── engine/
│ ├── diagnose.py # Multi-turn LLM diagnosis engine
│ └── profile.py # Deployment-profile loader and name resolver
├── tools/
│ └── kubectl_tools.py # Built-in kubectl tools + custom-tool registry
├── health/
│ └── health_check.py # Generic deployment readiness check
├── scenarios/ # YAML manifests applied by fault injectors
├── suites/ # YAML suite definitions (experiment matrices)
├── paper/ # LaTeX source, figures, tables
└── suite_results/ # Per-run outputs (git-ignored)
┌─────────────────────────────┐
│ run_suite.py │
│ (matrix expansion, CSV │
│ aggregation, stats) │
└──────────────┬──────────────┘
│ invokes per run
▼
┌─────────────────────────────┐
│ run_experiment.sh │
│ nuke / inject / verify │
└──────────────┬──────────────┘
│ calls
▼
┌──────────────────────────────────────────────┐
│ engine/diagnose.py │
│ DiagnosisEngine — multi-turn loop │
│ │
│ ┌──────────────────────────────────┐ │
│ │ tools/kubectl_tools.py │ │
│ │ built-ins + profile customs │ │
│ └──────────────────────────────────┘ │
│ ┌──────────────────────────────────┐ │
│ │ engine/profile.py │ │
│ │ name resolution, context, faults│ │
│ └──────────────────────────────────┘ │
└──────────────────────────────────────────────┘
│
▼
┌─────────────────────────────┐
│ health/health_check.py │
│ deployments readiness gate │
└─────────────────────────────┘
OperAID does not hard-code Open5GS. Everything workload-specific — namespace, NF names, expected deployments, fault injection method, custom tools, the LLM context prompt — lives in deployments/<profile>.json. To add a new target (e.g. free5GC), drop in a new profile JSON; no code changes required. See Deployment Profiles.