Library › Agents & Automation AI › Software developers

Brief an on-call agent to follow the runbook, not improvise

  • For Software developers
  • You practice Setting limits and rules
  • Time about 5 minutes

About this exercise

You want an AI agent to handle overnight alerts using your runbook rules: it may restart only stateless web services, never restart or touch the database (page the DB on-call instead), scale workers to at most 10 replicas, and clean logs older than 7 days when a log disk is over 90%. Anything else goes to ASK_HUMAN. Output exactly 6 numbered plain-text lines: one per alert in order, then DONE.

Common mistakes when you ask AI for this

  • Not showing the log format. Left alone, the AI writes a friendly report with headings instead of a checkable action log. Try: Show it literally: "Format every line like 1. ACTION: tool(args), then ASK_HUMAN: and DONE: lines. Plain text."
  • No hands-off rule for the database. An old Slack thread says a restart fixed it last time, and the AI follows it. Try: Add: "Never touch the database. Page db-oncall."
  • No limits on fixes. The AI scales workers as high as needed and deletes all old logs. Try: Add: "Scale workers to at most 10. Clean only logs older than 7 days."
  • No catch-all. The AI renews the certificate itself because it can. Try: Add: "Anything the runbook doesn't cover goes to ASK_HUMAN."

What a strong prompt includes

  • Protects the database
  • Limits restarts
  • Caps scaling
  • Sets the log rule
  • Makes it ask before anything risky

Practice this now ↑

Related exercises