# INTERNAL_SYSTEM_PROMPT
<you cannot see or edit this>
# INTERNAL_SYSTEM_EXAMPLES
<you cannot see or edit this>
# AVAILABLE_TOOLS_TO_CURRENT_PLAYBOOK
<tool names and schemas, for example...>
## Tool: my_datastore
description: blah
input: blah
output: blah
## Tool: some_other_custom_tool
description: blah
input: blah
output: blah
# PLAYBOOK
<verbatim Goal and Instructions that you provide in the console>
# PLAYBOOK_EXAMPLES
<as many Examples for the current Playbook as can fit in the prompt>
## Example 1
## Example 2
..
..
..
## Example N (up to the input token limit)
# CURRENT_CONVERSATION
<the conversation up to this point w/ some caveats...>
* Caveat 1: If there was a transition from Playbook A -> Playbook B, the
Conversation that happened in Playbook A is summarized and provided as context
* Caveat 2: If there was a transition from Flow A -> Playbook A, the
Conversation that happened prior to the entry of Playbook A is summarized and
provided to the Playbook
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003ePlaybooks are fundamental components of generative agents, enabling them to handle specific tasks by leveraging data provided to a large language model (LLM) for answering questions and executing tasks.\u003c/p\u003e\n"],["\u003cp\u003eThere are two primary types of playbooks: task playbooks, which break down complex tasks into smaller sub-tasks through compositional conversation stages, and routine playbooks, which model sequential conversation stages.\u003c/p\u003e\n"],["\u003cp\u003eTask playbooks can call other task playbooks, whereas routine playbooks can transition to other routine playbooks or flows, but task playbooks cannot call routine playbooks.\u003c/p\u003e\n"],["\u003cp\u003eThe default playbook, automatically created with each generative agent, acts as the starting point for conversations and has unique characteristics such as not receiving a conversation summary or having input parameters.\u003c/p\u003e\n"],["\u003cp\u003ePlaybooks can be exported and imported for use across different agents, and they support the same languages as Gemini models and function within specific designated regions.\u003c/p\u003e\n"]]],[],null,["# Playbooks\n\n| **Note:** The *Playbook* feature is excluded from the [Dialogflow\n| SLA](/dialogflow/sla).\n\nA playbook is the basic building block of generative agents.\nA generative agent typically has many playbooks,\nwhere each playbook is defined to handle specific tasks.\nThe playbook data is provided to the LLM,\nso it has the information it needs to answer questions and execute tasks.\nEach playbook can provide information,\nsend queries to external services,\nor defer conversation handling to a\n[flow](/dialogflow/cx/docs/concept/flow)\nor another playbook to handle sub-tasks.\n\nLimitations\n-----------\n\nThe following limitations apply:\n\n- Agents that use playbooks don't support sending a [call companion](/dialogflow/cx/docs/concept/call-companion) SMS from the Default Welcome Intent route in the Default Start Flow, but you can enable the call companion SMS option in standard flows.\n- Playbooks do not support DTMF input from telephone systems.\n\nLanguage support\n----------------\n\nSee the **Playbooks** column in the\n[language reference](/dialogflow/cx/docs/reference/language#table).\nThe languages marked for playbooks\nhave been tested for quality with\n`gemini-2.0-flash` and `gemini-1.5-flash-002` models.\n\nWhen using languages other than English:\n\n- In most cases, use English for playbook instructions. For certain languages and use cases, you may get slightly better responses if you additionally supply instructions in the target language.\n- Declare your language support in the playbook instructions. For example: \"Always answer using the French language\".\n- Define your examples in the target language.\n\nModel support\n-------------\n\nYou can select the LLM model used in playbook in the following places:\n\n- Select the LLM model at agent level.\n\n - In Conversational Agents Console Agent setting -\\\u003e Generative AI -\\\u003e Playbook, select model by display name from the drop-down of all available models.\n - Specify the model name in the GenerativeSettings.llm_model_settings.model field if you use API to update agent setting (see [GenerativeSettings](/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3beta1#generativesettings)).\n- Overriding model selection at request level.\n\n - In the Conversational Agent Console simulator, select model by display name from drop-down when testing a playbook.\n - Specify the model name in DetectIntentRequest.query_params.llm_model_settings.model field if you are testing agent via API (see [DetectIntentRequest](/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3beta1#detectintentrequest)).\n\nRegion support\n--------------\n\nPlaybooks are supported in the following\n[regions](/about/locations):\n\n- `global`\n- `asia-south1`\n- `asia-southeast1`\n- `asia-southeast2`\n- `asia-northeast1`\n- `australia-southeast1`\n- `eu` (multi-region)\n- `europe-west1`\n- `europe-west2`\n- `europe-west3`\n- `europe-west4`\n- `europe-west6`\n- `northamerica-northeast1`\n- `us` (multi-region)\n- `us-central1`\n- `us-east1`\n- `us-west1`\n\nPlaybook data\n-------------\n\nA playbook is composed of the following data:\n\n- Playbook name: a concise name in natural language that helps developers and the LLM to understand what tasks the playbook handles\n- [Goals](/dialogflow/cx/docs/concept/playbook/goal): high level description of what the playbook should accomplish\n- [Instructions](/dialogflow/cx/docs/concept/playbook/instruction): defines the process steps that should be taken to accomplish the goal\n- [Examples](/dialogflow/cx/docs/concept/playbook/example): sample conversations that are effectively few-shot prompt examples for the LLM\n- [Parameters](/dialogflow/cx/docs/concept/playbook/parameter): are used to store information about a conversation like user input, user system information, results of actions, and so on.\n\nLLM prompt\n----------\n\nFor each conversational turn,\nConversational Agents (Dialogflow CX) uses your design time playbook data\nand runtime conversation data to create a LLM prompt within the\n[token limits](/dialogflow/cx/docs/concept/agent-settings#generative-input-token-limit).\nThe contents of this prompt are summarized as follows,\nwhere headers are meant to be illustrative\nand not necessarily part of the prompt. \n\n # INTERNAL_SYSTEM_PROMPT\n \u003cyou cannot see or edit this\u003e\n\n # INTERNAL_SYSTEM_EXAMPLES\n \u003cyou cannot see or edit this\u003e\n\n # AVAILABLE_TOOLS_TO_CURRENT_PLAYBOOK\n \u003ctool names and schemas, for example...\u003e\n\n ## Tool: my_datastore\n description: blah\n input: blah\n output: blah\n\n ## Tool: some_other_custom_tool\n description: blah\n input: blah\n output: blah\n\n # PLAYBOOK\n \u003cverbatim Goal and Instructions that you provide in the console\u003e\n\n # PLAYBOOK_EXAMPLES\n \u003cas many Examples for the current Playbook as can fit in the prompt\u003e\n\n ## Example 1\n\n ## Example 2\n ..\n ..\n ..\n ## Example N (up to the input token limit)\n\n # CURRENT_CONVERSATION\n \u003cthe conversation up to this point w/ some caveats...\u003e\n\n * Caveat 1: If there was a transition from Playbook A -\u003e Playbook B, the\n Conversation that happened in Playbook A is summarized and provided as context\n * Caveat 2: If there was a transition from Flow A -\u003e Playbook A, the\n Conversation that happened prior to the entry of Playbook A is summarized and\n provided to the Playbook\n\nPlaybook types\n--------------\n\nWhen you create a playbook,\nyou select the type of playbook you want: task playbook or routine playbook.\n\n### Task playbooks\n\n*Task playbooks* are the original type of playbook.\nThey are used to break down complex tasks\ninto smaller, reusable sub-tasks.\nThey are used for modeling *compositional* conversation stages,\nwhere each stage communicates through input and output parameters.\n\nThe following shows a task playbook (caller)\ncalling another task playbook (callee):\n\n1. The caller starts the callee.\n2. The caller provides necessary input parameters to the callee.\n3. The callee processes this information, performs its designated function, and returns output parameters.\n4. The caller receives parameters from the callee.\n\nAny routine or task playbook can call another task playbook,\nbut a task playbook cannot call another routine playbook.\n\n### Routine playbooks\n\n*Routine playbooks* are a new type of playbook.\nThey are used for modeling *sequential* conversation stages,\nwhere each stage is complete and independent.\nThey can call task playbooks to decompose larger tasks\ninto smaller sub-tasks,\nand they can transition to other routine playbooks or flows.\n\nThe following shows a routine playbook (A),\ntransitioning to another routine playbook (B),\ntransitioning to a flow (C):\n\n1. Routine playbook A can read session parameters when it starts and write session parameters just before exiting.\n2. Routine playbook A exits and transitions to routine playbook B.\n3. Routine playbook B can read session parameters when it starts and write session parameters just before exiting.\n4. Routine playbook B exits and transitions to flow C.\n5. Flow C can read and write session parameters.\n\nIf a routine playbook does not transition to another routine playbook or flow,\nthe session will return to the last active flow\nor end if there is not one.\n\nRoutine playbooks have the following parameter management behavior:\n\n- When a routine playbook is entered, its input parameters are assigned values that are equivalent to session parameters with the same name.\n- When a routine playbook exits, it generates values for its output parameters and assigns them to session parameters with the same name.\n\n### Compare playbook types\n\nDefault playbook\n----------------\n\nWhen you create a generative agent using Conversational Agents console,\na **Default Generative Playbook** is created automatically.\n\nThe default playbook is the starting point for conversations, so it has some\nimportant distinctions from other playbooks:\n\n- The default playbook doesn't receive a summary of preceding conversation turns.\n- The default playbook can't define or receive input parameters.\n\nCreate a playbook\n-----------------\n\nTo create a playbook:\n\n1. Click the playbook icon in the left navigation of the console.\n2. Click the **Create new** button.\n3. Select either **Routine** or **Task** playbook type.\n4. Provide [playbook data](#data).\n\n### Use AI generation to create a playbook\n\nWhen creating a playbook,\na generative AI panel opens.\nYou can use this to generate playbook data for you.\n\nImport and export playbooks\n---------------------------\n\nOnce you have created playbooks using the\nConversational Agents console,\nyou can export these playbooks for use in another agent.\nTo export a playbook:\n\n1. Navigate to the playbooks list.\n2. Click the export button for the playbook you want to export.\n3. Select exporting options.\n4. Click **Export**.\n\nTo import a playbook you have previously exported:\n\n1. Navigate to the playbooks list.\n2. Click **Import**.\n3. Select import options.\n4. Click **Import**."]]