视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
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".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
Document the agent's identity and operational context:
| Attribute | Detail |
|---|---|
| Agent name | Identifier used in logs and monitoring |
| Purpose | What task or workflow the agent handles |
| Model(s) | Underlying LLM(s) and versions |
| Tools/APIs | External systems the agent can invoke |
| Data access | What data the agent reads and writes |
| Autonomy level | Fully autonomous / Human-in-the-loop / Supervised |
| SLA | Expected response time, uptime, throughput |
| Owner | Team and individual responsible |
| Escalation contact | On-call rotation or Slack channel |
Define what "healthy" looks like:
| Metric | Expected Range | Alert Threshold | Critical 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) | ... | ... | ... |
Enumerate known failure modes:
| ID | Failure Mode | Symptoms | Likelihood | Impact | Detection Method |
|---|---|---|---|---|---|
| F-001 | Model hallucination | Confident but factually wrong output | Medium | High | Fact-check sampling, user reports |
| F-002 | Tool call loop | Agent repeatedly calls same tool without progress | Low | Medium | Loop counter, timeout monitor |
| F-003 | Context window overflow | Truncated context, degraded responses | Medium | Medium | Token count monitoring |
| F-004 | API rate limiting | 429 errors from downstream services | Medium | High | Error rate spike |
| F-005 | Prompt injection | Agent executes unintended instructions | Low | Critical | Input/output anomaly detection |
| F-006 | Model provider outage | Timeout or 5xx from LLM API | Low | Critical | Health check, error rate |
| F-007 | Cost runaway | Unexpected spike in token or API costs | Low | High | Cost anomaly alerts |
| Severity | Condition | Response Time | Action | Escalate To |
|---|---|---|---|---|
| SEV-1 | Agent producing harmful or unsafe output | Immediate | Kill switch, notify leadership | AI Safety + Engineering Lead |
| SEV-2 | Agent fully down, SLA breached | 15 minutes | Activate fallback, page on-call | On-call engineer |
| SEV-3 | Degraded performance, elevated error rate | 1 hour | Investigate, consider fallback | On-call engineer |
| SEV-4 | Minor quality regression, cosmetic issues | Next business day | Log ticket, monitor trend | Agent owner |
For each failure mode, document a step-by-step recovery procedure:
Summary table with agent profile attributes.
Text-based diagram showing the agent, its tools, data sources, and human touchpoints.
Table of metrics, thresholds, and alerting configuration.
Table of all known failure modes with detection and response.
Severity-based escalation table with contacts and response times.
Step-by-step runbook for each SEV-1 and SEV-2 failure mode.
| Control | Description | Implementation |
|---|---|---|
| Input validation | Filter/sanitize user inputs before agent | Regex, classifier, allowlist |
| Output validation | Check agent output before delivery | Content filter, schema validation |
| Kill switch | Immediately halt agent processing | Feature flag, circuit breaker |
| Rate limiting | Cap requests per user/minute | API gateway, application-level |
| Cost ceiling | Max daily spend on LLM API calls | Budget alert + auto-pause |
| Audit logging | Log all inputs, outputs, tool calls | Structured logging pipeline |
| Task | Frequency | Owner | Procedure |
|---|---|---|---|
| Prompt review | Monthly | Agent owner | Review prompt against latest model behavior |
| Model version update | As released | AI team | Test in staging, compare metrics, promote |
| Tool dependency audit | Quarterly | Engineering | Check API versions, deprecation notices |
| Runbook review | Quarterly | On-call team | Validate playbooks are current |
| Cost review | Monthly | Finance + AI team | Compare actual vs. budget |