Effective Playbooks guide your AI Agent through complex workflows with clear, well-structured instructions. These best practices help you write Playbooks that are easy to understand, maintain, and scale.
These guidelines help you create effective Playbooks that are easy to understand and maintain.
The Generate a Playbook feature helps you quickly create a first draft based on a simple prompt or an existing PDF file. To get the best results, clearly define your goal and the scenario or task you want the Playbook to address. Include enough context in your prompt to guide the generation accurately, but keep it concise and focused. Starting this way also helps you understand how to write a Playbook using the best practices outlined below.
Write your Playbook as if you’re creating a standard operating procedure for a human agent. This means using clear, straightforward language that feels natural and conversational, rather than overly technical or robotic. Imagine you’re training a new customer service representative: your instructions should be easy to understand, detailed enough to follow without additional explanation, and structured logically, step by step. Avoid jargon, ambiguity, or assumptions that might confuse an agent unfamiliar with your processes.
As the author, you might overlook missing details or unclear instructions. Having someone with limited context review your Playbook and provide feedback can go a long way in helping identify gaps and areas needing clarification. Encourage reviewers to imagine themselves as the customer service representative following the instructions.
Follow these formatting and structural recommendations to make your Playbooks clear and consistent.
Use headings to structure the Playbook into clear, high-level steps (e.g., Step 1, Step 2).
Break down instructions into short, clear lists rather than long paragraphs.
Use numbered lists for sequential actions to highlight logical progression.
Use bulleted lists for parallel actions or options.
Highlight critical details with bold text.
Use quotations to indicate specific messaging the AI Agent should use (e.g., “insert specific quote here”).
Example:
When building complex Playbooks, especially those with multiple branches or variables, keep your content structured, scannable, and predictable. These guidelines help ensure clarity and consistency across steps.
Writing clear instructions is just the start. A well-crafted Playbook should be clearly structured and easy to follow, guiding the AI Agent smoothly through both common and uncommon scenarios. The best Playbooks are:
Examples:
✅ Step 1: Ask for the end user’s email address
@handoff_to_support❌ Ask the user to provide their email and then verify account info. If it doesn’t match, figure out the next best step or send them to support.
✅ Step 2: Offer resolution options
❌ Resolve issue based on subscription.
Playbooks can reference Actions, Handoffs, Exits, and Variables to create dynamic workflows. These guidelines help you use them effectively.
The names and descriptions of Playbooks, Actions, Handoffs, and Variables are visible to the AI Agent.
Examples:
(copy) to the name. Rename duplicated Actions to keep names short and avoid unexpected fallbacks.Actions and Handoffs let your AI Agent do more than just follow instructions, they allow it to complete tasks and escalate when needed. You can think of them as tools that your AI Agent can use as it’s going through a Playbook.
To keep handoff logic consistent and easy to maintain, route escalations to a single dedicated handoff section rather than placing handoff steps throughout the Playbook. Use a clear phrase such as proceed to section X to direct the flow to that section.
Example:
✅ Step 3: Retrieve the end user’s order
@get_order_details to retrieve the end user’s order@handoff_to_support to connect the end user with a specialist.❌ Check order details with the end user.
When configuring your Actions for the AI Agent to use, optimize for giving only the required information for solving the end user’s inquiry. You can leverage JMESPath in the Action Output settings to filter out unnecessary fields.
Exits give you two ways to end: explicitly, where you decide exactly when the flow stops, or implicitly, where it ends on its own when it seems complete. Knowing when to choose each approach helps you design conversations that are both reliable and natural.
Choose an explicit Exit when:
Let Playbooks end automatically when:
Start with explicit exits in critical flows to ensure predictable behavior, and use automatic endings for supporting flows where flexibility is desired.
Also, when reviewing conversation transcripts, you may notice that hovering over a sent message displays a different Playbook than the one that was originally triggered. This happens when a Playbook does not properly exit and a subsequent Playbook takes over, updating the internal reference (similar to overwriting a global variable). Ensuring each Playbook exits explicitly and cleanly helps maintain accurate transcript references.
Example:
✅ Step 1: Ask if the request is about order issues, product questions, or something else.
@Exit PlaybookThe Exit is placed inside a branch, so the flow stops immediately at that point and control goes back. The other branches remain usable.
❌ Ask if the user wants to track an order or start a return. If the user wants to track an order, provide the order status. If the user wants to start a return, guide them through the return steps.
@Exit Playbook
The Exit is placed at the very end of the flow, where it adds no value. Both branches would naturally conclude without needing an explicit Exit, so this placement just clutters the flow.
Your AI Agent can read variables values that you explicitly reference within a Playbook so it can personalize the experience based on attributes that were set or collected previously. You can also instruct the Agent to save specific attributes to Variables so it can be referenced later on in the conversation or for reporting purposes.
@variable pill when reading or writing variables. Typing variable names manually will not be recognized by the system and can lead to unexpected behavior.Example:
✅ Step 5: Inform the end user on refund ETA
@country is the US, inform them that the refund will take 2-3 business days@country is Canada, inform them that the refund will take 3-5 business days.@country is neither Canada nor the US, inform them that the refund will take 7-14 business days.❌ Inform the end user on refund ETA based on if they’re in the US, Canada or somewhere else.
Clear communication ensures the AI Agent follows your intended logic. These guidelines help you write instructions that are unambiguous and complete.
Explicitly mention conditions and corresponding actions, using indentation to show branching paths. Avoid combining multiple conditions into one sentence.
Example:
✅ Ask the end user for their phone number:
account_phone_number, confirm with the end user.❌ Ask the end user for their phone number and confirm whether it matches their account - if not ask for the number associated with their account.
Always provide clear instructions for handling exceptions, including:
if conditionsExample:
✅ Step 1: Look up the end user’s order using @get_order_details.
@handoff_to_support.❌ Look up the end user’s order using @get_order_details. Next, if found, confirm the item and shipping status.
Not every instruction fits neatly in a step-by-step format. Use an Additional guidelines section for general instructions or important guardrails, such as:
Example:
Custom Instructions influence how the AI Agent interprets and executes a Playbook. Avoid referencing handoffs in Custom Instructions unless a handoff is explicitly intended. Language that suggests handing off can override the expected Playbook flow, causing the AI Agent to handoff prematurely instead of continuing through the intended steps.
Optimizing Playbooks for Voice ensures smooth, natural conversations.
Your Voice AI Agent automatically provides quick acknowledgment messages to users before entering a Playbook and after most user responses during it. For example, if a user asks to check their order status, your AI Agent will automatically acknowledge the user (“Let me look into the steps to check your order status.”) before entering the Playbook. If you then ask the user to provide their order number, your AI Agent will automatically acknowledge that they heard the number after the user responds (“Thanks for that.”).
If you provide instructions inside your Playbook for your AI Agent to acknowledge what a user said, make sure you take some time to understand the end user experience—you don’t want your AI Agent to sound like it’s repeating itself.
Example:
✅ “Inform the user that you’ll need to validate their identity before you can provide their account balance.”
Then: “Use the Verify User Identity Action to confirm their identity.”
❌ “Acknowledge that the user wants to check their balance.”
Then “Inform the user that you’ll need to validate their identity before you can provide their account balance.”
Then: “Use the Verify User Identity Action to confirm their identity.”
Setting a variable, running an Action, or performing another backend operation takes your AI Agent time to complete. To prevent silent gaps as your AI Agent executes multiple backend steps in a Playbook, provide the user with a short, spoken message that informs the user of what the AI Agent is doing.
Example:
✅ “Let the user know that you need a second to pull up their account information, but that you’ll be right back with them.”
“Use the Get Transactions Action to retrieve a list of their most recent transactions.”
“Set the entered_transactions_playbook variable to true.”
“Review the user’s most recent transactions and identify any declined transactions.”
❌ “Use the Get Transactions Action to retrieve a list of their most recent transactions.”
“Set the entered_transactions_playbook variable to true.”
“Review the user’s most recent transactions and identify any declined transactions.”
Your Voice AI Agent reads responses out loud. Add instructions to optimize how responses are spoken:
Never leave Voice users hanging. End Playbooks with a clear question before exiting a Playbook.
Example:
✅ “After you provide the user with their account balance, ask them if they need help with anything else today and exit Playbook.”
❌ “After you provide the user with their account balance, exit Playbook.”
Before publishing and over time, make sure your Playbooks stay clear, correct, and useful. Use this checklist before publishing, and review them regularly to keep them accurate.
Your product and end user needs evolve, and your Playbooks should too. Treat them as living documents and make sure they stay useful with regular upkeep.