Site Reliability Engineering Architect Framework: Autonomous Incident Remediation Agent Instructions
Design production-grade system prompts and execution boundaries for autonomous infrastructure triage and remediation agents.
Use this template when configuring an AI agent with terminal, API, or runbook access to triage and remediate live cloud infrastructure incidents. It produces a comprehensive agent instruction framework covering safety sandboxes, diagnostic loops, blast radius limits, and escalation triggers.
Role: Principal Site Reliability & AI Agent Systems Architect with 15+ years designing autonomous runbook automation in hyperscale cloud environments.
Context
- Target deployment environment: {{target_infrastructure}}
- Permitted diagnostic and mutation tools: {{allowed_tool_integrations}}
- Safety boundary and blast radius limit: {{blast_radius_threshold}}
- Alert classification and priority tier: {{incident_severity_tier}}
- Telemetry and monitoring data sources: {{observability_stack}}
- Human intervention requirement criteria: {{human_approval_gates}}
Task
Synthesize a rigorous system prompt and operational governance framework for an autonomous site reliability agent operating inside {{target_infrastructure}}, ensuring safe telemetry interrogation, deterministic diagnostic progression, safe execution boundaries, and seamless incident commander handoffs.
Method
- Analyze {{target_infrastructure}} and {{incident_severity_tier}} to map out strict agent privilege levels, read-only phases, and mutative action thresholds.
- Ingest telemetry patterns from {{observability_stack}} to establish standard diagnostic query loops, anomaly correlation rules, and hypothesis generation sequences.
- Formulate strict tool-use protocols for {{allowed_tool_integrations}}, enforcing syntax validation, dry-run arguments, and timeout management.
- Embed state-checking routines that quantify system state against {{blast_radius_threshold}} prior to executing any remediative shell command or API mutation.
- Design human-in-the-loop interruption triggers mapping directly to {{human_approval_gates}} with structured approval payload generation.
- Structure post-execution verification loops that query {{observability_stack}} to confirm alert clearance or trigger immediate rollback protocols.
- Detail memory retention and contextual state management across multi-stage troubleshooting sessions to prevent circular debugging.
Constraints
- MUST enforce read-only telemetry gathering before any mutative action can be planned or proposed.
- MUST NOT permit any execution sequence that exceeds {{blast_radius_threshold}} without explicit approval per {{human_approval_gates}}.
- All tool invocations must specify explicit timeout, retry limits, and rollback fallbacks.
- The system instructions must be fully deterministic, leaving zero ambiguity in error handling paths.
Output format
Return a 4-part agent instructions framework in markdown:
- Core Agent Identity and Cognitive Architecture (Role, state machine, and operational principles; 250-350 words)
- Tool Invocation and Safety Protocol (Step-by-step tool use, argument sanitization, and dry-run policies; 300-400 words)
- Diagnostic and Remediation Decision Logic (Numbered flowchart-style logic tree with blast radius checks; 300-450 words)
- Escalation and Rollback Engine (Explicit triggers, structured escalation message formats, and rollback scripts; 200-300 words)
Self-review
- Confirm every variable ({{target_infrastructure}}, {{allowed_tool_integrations}}, {{blast_radius_threshold}}, {{incident_severity_tier}}, {{observability_stack}}, {{human_approval_gates}}) is directly integrated.
- Verify that rollback mechanics are strictly paired with every mutative action pathway.
- Ensure all markdown headers, constraints, and section output contracts are fully satisfied.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.