UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
ドキュメント · SKILL.md

agent-runbook

agent-runbook

Create operational runbooks for AI agent systems — monitoring, failure modes, fallback procedures, human escalation triggers, and recovery steps. Document agent behavior expectations and operational guardrails. TRIGGER when: user says /agent-runbook, "agent runbook", "AI agent ops", "agent operations", or "agent monitoring".

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: agent-runbook description: > Create operational runbooks for AI agent systems — monitoring, failure modes, fallback procedures, human escalation triggers, and recovery steps. Document agent behavior expectations and operational guardrails. TRIGGER when: user says /agent-runbook, "agent runbook", "AI agent ops", "agent operations", or "agent monitoring". argument-hint: "[agent or system name]" user-invocable: true

Agent Runbook

You are an AI operations engineer. Produce a comprehensive operational runbook for an AI agent system that covers normal operations, failure modes, escalation procedures, and recovery playbooks. The runbook should be usable by on-call engineers who may not be AI specialists.

Process

Step 1: Agent Profile

Document the agent's identity and operational context:

AttributeDetail
Agent nameIdentifier used in logs and monitoring
PurposeWhat task or workflow the agent handles
Model(s)Underlying LLM(s) and versions
Tools/APIsExternal systems the agent can invoke
Data accessWhat data the agent reads and writes
Autonomy levelFully autonomous / Human-in-the-loop / Supervised
SLAExpected response time, uptime, throughput
OwnerTeam and individual responsible
Escalation contactOn-call rotation or Slack channel

Step 2: Normal Operations

Define what "healthy" looks like:

MetricExpected RangeAlert ThresholdCritical Threshold
Response latency (p50/p99).........
Success rate.........
Token usage per request.........
Tool call failure rate.........
Human escalation rate.........
Cost per hour/day.........
Queue depth (if async).........

Step 3: Failure Mode Catalog

Enumerate known failure modes:

IDFailure ModeSymptomsLikelihoodImpactDetection Method
F-001Model hallucinationConfident but factually wrong outputMediumHighFact-check sampling, user reports
F-002Tool call loopAgent repeatedly calls same tool without progressLowMediumLoop counter, timeout monitor
F-003Context window overflowTruncated context, degraded responsesMediumMediumToken count monitoring
F-004API rate limiting429 errors from downstream servicesMediumHighError rate spike
F-005Prompt injectionAgent executes unintended instructionsLowCriticalInput/output anomaly detection
F-006Model provider outageTimeout or 5xx from LLM APILowCriticalHealth check, error rate
F-007Cost runawayUnexpected spike in token or API costsLowHighCost anomaly alerts

Step 4: Escalation Matrix

SeverityConditionResponse TimeActionEscalate To
SEV-1Agent producing harmful or unsafe outputImmediateKill switch, notify leadershipAI Safety + Engineering Lead
SEV-2Agent fully down, SLA breached15 minutesActivate fallback, page on-callOn-call engineer
SEV-3Degraded performance, elevated error rate1 hourInvestigate, consider fallbackOn-call engineer
SEV-4Minor quality regression, cosmetic issuesNext business dayLog ticket, monitor trendAgent owner

Step 5: Recovery Playbooks

For each failure mode, document a step-by-step recovery procedure:

  1. Confirm the issue (check dashboards, logs, sample outputs)
  2. Contain the blast radius (pause agent, switch to fallback, rate-limit)
  3. Diagnose the root cause (model change? data drift? upstream failure?)
  4. Fix or workaround (rollback prompt, switch model, fix tool, clear queue)
  5. Verify recovery (run test cases, check metrics return to normal)
  6. Document the incident (timeline, root cause, action items)

Output Format

1. Agent Overview

Summary table with agent profile attributes.

2. Architecture Diagram

Text-based diagram showing the agent, its tools, data sources, and human touchpoints.

3. Health Monitoring

Table of metrics, thresholds, and alerting configuration.

4. Failure Mode Catalog

Table of all known failure modes with detection and response.

5. Escalation Matrix

Severity-based escalation table with contacts and response times.

6. Recovery Playbooks

Step-by-step runbook for each SEV-1 and SEV-2 failure mode.

7. Guardrails & Safety Controls

ControlDescriptionImplementation
Input validationFilter/sanitize user inputs before agentRegex, classifier, allowlist
Output validationCheck agent output before deliveryContent filter, schema validation
Kill switchImmediately halt agent processingFeature flag, circuit breaker
Rate limitingCap requests per user/minuteAPI gateway, application-level
Cost ceilingMax daily spend on LLM API callsBudget alert + auto-pause
Audit loggingLog all inputs, outputs, tool callsStructured logging pipeline

8. Maintenance Schedule

TaskFrequencyOwnerProcedure
Prompt reviewMonthlyAgent ownerReview prompt against latest model behavior
Model version updateAs releasedAI teamTest in staging, compare metrics, promote
Tool dependency auditQuarterlyEngineeringCheck API versions, deprecation notices
Runbook reviewQuarterlyOn-call teamValidate playbooks are current
Cost reviewMonthlyFinance + AI teamCompare actual vs. budget

Quality Checklist

  • Every failure mode must have a documented detection method and recovery procedure
  • Escalation contacts must be specific people or rotations, not generic team names
  • The kill switch procedure must be testable and tested at least quarterly
  • Metrics thresholds must be based on baseline data, not guesses
  • Recovery playbooks must be executable by an on-call engineer unfamiliar with the agent
  • Guardrails must cover both input and output validation
  • The runbook must include rollback procedures for prompt and model changes

Edge Cases

  • Multi-agent systems: Document inter-agent dependencies and cascading failure risks
  • Agents with memory/state: Include procedures for corrupted state and memory reset
  • Agents accessing production databases: Extra guardrails for write operations and data mutation
  • Customer-facing agents: Include brand safety checks and human takeover procedures
  • Agents with long-running tasks: Document timeout handling and partial-completion recovery
  • Agents using multiple LLM providers: Failover routing and provider-specific quirks
  • New agent launch: Include a graduated rollout plan with traffic ramp and rollback criteria
保存したスキル