Skip to main content

What is a playbook?

A playbook is the recipe an agent runs when an objective needs attention. It has three parts:
  1. A trigger. What starts the playbook. One of schedule, data change, webhook, or user-triggered.
  2. Steps. A sequence of tool calls, each one observed by the runtime and recorded in the action log.
  3. Guardrails. Constraints that bound the playbook: rate limits, scopes, risk tier, allowed recipients, max recursion.
Think of an objective as the “why” and the playbook as the “how.”

The shape of a playbook

This pattern, trigger → steps → guardrails, is the same for every playbook in every Gainable app. Once you understand it, you understand all of them.

The playbook editor

Playbooks live in the Autopilot UI. The editor shows:
  • Trigger panel. Pick the trigger type and configure it.
  • Step list. Drag steps. Each step is a tool call. Inputs can reference previous step outputs.
  • Guardrails panel. Risk tier, rate limits, scopes, recipient exclusions.
  • Test panel. Run the playbook against test data without lighting up real recipients.
You don’t have to use the editor. Almost everything you can configure in it can be described in natural language during a build prompt. The editor is for fine-tuning after the fact.

”Simulate on last 30 days”

Before turning a playbook live, run Simulate on last 30 days. The runtime replays your real data through the playbook against the last 30 days of activity and shows:
  • How many times the trigger would have fired
  • How many drafts would have been produced
  • Per draft: the recipient, the message, the reasoning chain, the tool calls
  • An estimate of approval workload (drafts per day, per user)
Simulate is the safety net. It’s the difference between “the playbook looks reasonable” and “the playbook would have produced 240 emails to one customer last Tuesday.” Always simulate before going live.
The simulation runs in a sandbox. It does not call send_email, send_slack, send_sms, or call_external for real. It produces drafts you can read but never delivers them.

Step references

Steps can reference each other’s outputs. The reference syntax is {{ stepN.field }} or {{ stepN.collection[*].field }} for arrays.

Guardrails

Guardrails bound what a playbook can do regardless of its steps. They are the policy layer that exists outside the agent’s reasoning.

Common playbook shapes

Watch and notify

Watch and draft

Schedule and digest

Inbound and route

Editing playbooks

Edit through chat or the editor:

Best practices

A 30-day simulation catches load problems, recipient explosions, and bad filters before they reach real users.
“Nudge stalled deals” is a clear playbook. “Manage the sales pipeline” is a bundle of five playbooks pretending to be one.
The default for outbound work is draft_for_approval for a reason. Graduate to auto_with_undo only after a clean approval history.
A do_not_contact collection lets you opt specific records out without breaking the whole playbook for everyone else.

Learn more

Triggers

Schedule, data change, webhook, user-triggered

Tools

The fixed registry of tool calls

Risk tiers

Draft-and-approve, auto-with-undo, auto

Recipes

Worked examples of common playbooks