Skip to main content
🎀 Speaking at KubeCon EU 2026 Lessons Learned Orchestrating Multi-Tenant GPUs on OpenShift AI View Session
🎀 Speaking at Red Hat Summit 2026 GPUs take flight: Safety-first multi-tenant Platform Engineering with NVIDIA and OpenShift AI Learn More
AI-powered runbook automation
AI

AI-Powered Runbooks and Auto-Remediation

Transform static runbooks into intelligent, AI-driven incident response workflows that diagnose issues and execute remediation automatically.

LB
Luca Berton
Β· 1 min read

Static Runbooks Are Dead

Traditional runbooks are step-by-step documents that engineers follow during incidents. The problem: they’re always outdated, often incomplete, and require human interpretation at 3 AM when your brain is running at 20%.

AI-powered runbooks understand context, adapt to the specific situation, and execute remediation steps β€” with appropriate human oversight.

Architecture

Alert (PagerDuty/OpsGenie)
    ↓
AI Runbook Engine
    ↓ analyzes alert context
    ↓ retrieves relevant runbook
    ↓ adapts steps to current state
    ↓
Execute via Ansible
    ↓
Verify & Report

Building the Engine

1. Runbook Knowledge Base

Convert your existing runbooks into structured data:

runbooks = {
    "high_memory_usage": {
        "symptoms": ["memory usage > 90%", "OOMKilled pods"],
        "diagnosis_steps": [
            "Check which pods are consuming most memory",
            "Look for memory leaks in application logs",
            "Check if HPA is scaling properly",
        ],
        "remediation": {
            "low_risk": ["Restart the highest-memory pod", "Clear application caches"],
            "medium_risk": ["Scale deployment horizontally", "Increase memory limits"],
            "high_risk": ["Failover to secondary cluster"],
        },
        "ansible_playbooks": {
            "restart_pod": "playbooks/restart-high-memory-pod.yml",
            "scale_deployment": "playbooks/scale-deployment.yml",
        }
    }
}

2. Context-Aware Decision Making

async def handle_incident(alert):
    # Gather current system state
    context = await gather_context(alert)
    
    # Find matching runbook
    runbook = match_runbook(alert, runbooks)
    
    # AI adapts the runbook to current context
    plan = await llm.generate(f"""
    Alert: {alert}
    System State: {context}
    Runbook: {runbook}
    
    Generate an execution plan adapted to the current situation.
    Include specific commands and expected outcomes for each step.
    """)
    
    # Execute with safety gates
    for step in plan.steps:
        if step.risk_level == "low":
            result = await execute_step(step)
            await notify_channel(f"Auto-executed: {step.description}\nResult: {result}")
        else:
            await request_approval(step)

3. Post-Incident Learning

async def post_incident_review(incident):
    # AI analyzes what happened and what worked
    review = await llm.generate(f"""
    Analyze this incident and suggest runbook improvements:
    Alert: {incident.alert}
    Actions taken: {incident.actions}
    Resolution time: {incident.resolution_time}
    Was the runbook helpful? {incident.runbook_useful}
    """)
    
    # Update runbook automatically
    await update_runbook(incident.runbook_id, review.suggestions)

Integration with PagerDuty

@app.post("/webhook/pagerduty")
async def pagerduty_webhook(event: dict):
    if event["event"]["event_type"] == "incident.triggered":
        incident = event["event"]["data"]
        
        # Start AI-powered runbook
        plan = await handle_incident(incident)
        
        # Add runbook notes to PagerDuty
        await pagerduty.add_note(
            incident["id"],
            f"AI Runbook activated. Plan:\n{plan.summary}"
        )

Results

Teams using AI-powered runbooks report:

  • 60% reduction in Mean Time to Resolution
  • 45% fewer escalations to senior engineers
  • Runbooks that improve automatically after each incident
  • Better sleep for on-call engineers

The key insight: AI doesn’t replace engineers during incidents β€” it gives them a head start.


Ready to modernize your incident response? I help teams build intelligent automation for operations. Let’s connect.

Luca Berton Ansible Pilot Ansible by Example Open Empower K8s Recipes Terraform Pilot CopyPasteLearn ProteinLens TechMeOut