Automated Postmortems
Operyn automatically generates comprehensive postmortem reports after an incident is resolved. This feature leverages LLMs to synthesize incident data, logs, and metrics into a structured Markdown report.
How it Works
- Trigger: When an incident's status is updated to
RESOLVED, the Incident Engine triggers the postmortem generation workflow. - Context Gathering: The system collects:
- Incident details (title, description, severity, affected services).
- AI Diagnosis results (root cause, suggested fixes).
- Timeline of events and remediation actions taken.
- AI Generation: The data is sent to the AI Engine's
PostmortemAgent. - Agent Workflow:
- The agent uses a structured graph (via LangGraph) to process the context.
- It adheres to a standardized postmortem template.
- It performs automated validation of the generated Markdown.
- Persistence: The generated report is saved to the database and associated with the incident.
Postmortem Template
Every generated postmortem includes:
- Executive Summary: A high-level overview of the incident.
- Impact Analysis: Detailed assessment of which services and users were affected.
- Root Cause Analysis (RCA): Deep dive into the technical cause of the failure.
- Timeline: Chronological list of events from detection to resolution.
- Remediation Actions: What was done to fix the issue.
- Action Items: Recommended follow-up tasks to prevent recurrence.
- Operyn Intelligence Recommendations: Structured follow-up guidance grouped into:
Policy ImprovementsRunbook UpdatesPrevention Actions
In the incident postmortem panel, these recommendations are paired with direct action links to:
- Runbook workspace (
/console/runbooks) - Remediation policy workspace (
/console/remediation)
The intelligence strip also supports:
- One-click draft runbook creation from recommendation content.
- Copying a prefilled policy patch proposal before jumping to remediation controls.
- Draft creation redirects to runbooks with
status=draftpreselected for immediate review. - Policy patch handoff now passes
policyPatchvia remediation URL, auto-opens policy configuration, and prefills editor context. - Policy editor now includes Apply suggested approvals to parse recommendation text into manual-approval actions and approval environments.
Configuration
Postmortem generation can be customized in the AI_ENGINE_CONFIG:
- LLM Provider: Choose between OpenAI, Anthropic, or Gemini.
- Template Context: Configure how much log/metric data is included in the prompt.