What is an agent playbook?

An agent playbook is a reusable procedure for one kind of task, with steps, conditions and pitfalls, given to the agent before a similar task.

Updated

An agent playbook is a reusable procedure for one kind of task, with preconditions, ordered steps (some conditional), the tool each step uses and pitfalls to avoid, injected into the agent's prompt before a similar task.

Example

Playbook: Refund wrong-item delivery order
1. Look up the order to get its status, amount and payment method. (lookup_order)
2. Confirm the order was delivered. (check_delivery)
3. Attempt the refund with reason code WRONG_ITEM and the amount in paise. (issue_refund)
4. If the refund is refused for needing approval: request approval for the same order
   and amount, then retry with the approval_id. (request_approval, issue_refund)
Pitfalls: Refunds above Rs 5,000 are refused with 403 unless an approval_id is included.

Hand-written versus learned

Teams often write playbooks into system prompts by hand. That works until the rules change, the prompt grows long, or the agent meets cases nobody wrote down. Learned playbooks come from the agent's own verified runs, stay specific to each kind of task, and gain steps and pitfalls as new cases appear.

What makes a playbook trustworthy

  • learned only from runs verified to have succeeded,
  • recalled only when the task clearly matches,
  • versioned, with the runs it came from recorded,
  • protected from untrusted input that could plant instructions in it.

In Retrack

See Playbooks and the playbook docs. Related: procedural memory, plan replay.