- Resource: Example
          
- JSON representation
 - PlaybookInput
 - PlaybookOutput
 - State
 - Action
 - UserUtterance
 - Event
 - AgentUtterance
 - ToolUse
 - DataStoreToolTrace
 - WebhookToolTrace
 - LlmCall
 - RetrievedExample
 - RetrievalStrategy
 - TokenCount
 - IntentMatch
 - MatchedIntent
 - FlowStateUpdate
 - PageState
 - FunctionCall
 - PlaybookInvocation
 - OutputState
 - FlowInvocation
 - PlaybookTransition
 - FlowTransition
 - TTS
 - STT
 - Span
 - NamedMetric
 - Status
 - ExceptionDetail
 
 - Methods
 
Resource: Example
Example represents a sample execution of the playbook in the conversation.
An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.
| JSON representation | 
|---|
{ "name": string, "playbookInput": { object (  | 
              
| Fields | |
|---|---|
name | 
                
                   
 The unique identifier of the playbook example. Format:   | 
              
playbookInput | 
                
                   
 Optional. The input to the playbook in the example.  | 
              
playbookOutput | 
                
                   
 Optional. The output of the playbook in the example.  | 
              
actions[] | 
                
                   
 Required. The ordered list of actions performed by the end user and the Dialogflow agent.  | 
              
displayName | 
                
                   
 Required. The display name of the example.  | 
              
description | 
                
                   
 Optional. The high level concise description of the example. The max number of characters is 200.  | 
              
tokenCount | 
                
                   
 Output only. Estimated number of tokes current example takes when sent to the LLM.  | 
              
createTime | 
                
                   
 Output only. The timestamp of initial example creation. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
              
updateTime | 
                
                   
 Output only. Last time the example was updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
              
conversationState | 
                
                   
 Required. Example's output state.  | 
              
languageCode | 
                
                   
 Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents.  | 
              
PlaybookInput
Input of the playbook.
| JSON representation | 
|---|
{ "precedingConversationSummary": string, "actionParameters": { object } }  | 
                
| Fields | |
|---|---|
precedingConversationSummary | 
                  
                     
 Optional. Summary string of the preceding conversation for the child playbook invocation.  | 
                
actionParameters | 
                  
                     
 Optional. A list of input parameters for the action.  | 
                
PlaybookOutput
Output of the playbook.
| JSON representation | 
|---|
{
  "executionSummary": string,
  "state": enum ( | 
                
| Fields | |
|---|---|
executionSummary | 
                  
                     
 Optional. Summary string of the execution result of the child playbook.  | 
                
state | 
                  
                     
 End state of the playbook.  | 
                
actionParameters | 
                  
                     
 Optional. A Struct object of output parameters for the action.  | 
                
State
Playbook output state.
| Enums | |
|---|---|
STATE_UNSPECIFIED | 
                  Unspecified state. | 
OK | 
                  Playbook succeeded. | 
CANCELLED | 
                  Playbook cancelled. | 
FAILED | 
                  Playbook failed. | 
ESCALATED | 
                  Playbook failed due to escalation. | 
Action
Action performed by end user or Dialogflow agent in the conversation.
| JSON representation | 
|---|
{ "displayName": string, "startTime": string, "completeTime": string, "subExecutionSteps": [ { object (  | 
                
| Fields | |
|---|---|
displayName | 
                  
                     
 Output only. The display name of the action.  | 
                
startTime | 
                  
                     
 Output only. Timestamp of the start of the agent action. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
                
completeTime | 
                  
                     
 Output only. Timestamp of the completion of the agent action. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
                
subExecutionSteps[] | 
                  
                     
 Optional. The detailed tracing information for sub execution steps of the action.  | 
                
status | 
                  
                     
 Optional. Output only. The status of the action.  | 
                
Union field action. Action details. action can be only one of the following: | 
                |
userUtterance | 
                  
                     
 Optional. Agent obtained a message from the customer.  | 
                
event | 
                  
                     
 Optional. The agent received an event from the customer or a system event is emitted.  | 
                
agentUtterance | 
                  
                     
 Optional. Action performed by the agent as a message.  | 
                
toolUse | 
                  
                     
 Optional. Action performed on behalf of the agent by calling a plugin tool.  | 
                
llmCall | 
                  
                     
 Optional. Output only. LLM call performed by the agent.  | 
                
intentMatch | 
                  
                     
 Optional. Output only. Intent Match in flows.  | 
                
flowStateUpdate | 
                  
                     
 Optional. Output only. The state machine update in flows.  | 
                
playbookInvocation | 
                  
                     
 Optional. Action performed on behalf of the agent by invoking a child playbook.  | 
                
flowInvocation | 
                  
                     
 Optional. Action performed on behalf of the agent by invoking a CX flow.  | 
                
playbookTransition | 
                  
                     
 Optional. Action performed on behalf of the agent by transitioning to a target playbook.  | 
                
flowTransition | 
                  
                     
 Optional. Action performed on behalf of the agent by transitioning to a target CX flow.  | 
                
tts | 
                  
                     
 Optional. Text-to-speech action performed by the agent.  | 
                
stt | 
                  
                     
 Optional. Speech-to-text action performed by the agent.  | 
                
UserUtterance
UserUtterance represents one message sent by the customer.
| JSON representation | 
|---|
{ "text": string, "audioTokens": [ integer ], "audio": string }  | 
                
| Fields | |
|---|---|
text | 
                  
                     
 Required. Message content in text.  | 
                
audioTokens[] | 
                  
                     
 Optional. Tokens of the audio input.  | 
                
audio | 
                  
                     
 Optional. Audio input. A base64-encoded string.  | 
                
Event
Event represents the event sent by the customer.
| JSON representation | 
|---|
{ "event": string, // Union field  | 
                
| Fields | |
|---|---|
event | 
                  
                     
 Required. Name of the event.  | 
                
Union field payload. Payload of the event. payload can be only one of the following: | 
                |
text | 
                  
                     
 Optional. Unstructured text payload of the event.  | 
                
AgentUtterance
AgentUtterance represents one message sent by the agent.
| JSON representation | 
|---|
{ "text": string, "requireGeneration": boolean }  | 
                
| Fields | |
|---|---|
text | 
                  
                     
 Required. Message content in text.  | 
                
requireGeneration | 
                  
                     
 Optional. True if the agent utterance needs to be generated by the LLM. Only used in webhook response to differentiate from empty text. Revisit whether we need this field or mark   | 
                
ToolUse
Stores metadata of the invocation of an action supported by a tool.
| JSON representation | 
|---|
{ "tool": string, "displayName": string, "action": string, "inputActionParameters": { object }, "outputActionParameters": { object }, // Union field  | 
                
| Fields | |
|---|---|
tool | 
                  
                     
 Required. The   | 
                
displayName | 
                  
                     
 Output only. The display name of the tool.  | 
                
action | 
                  
                     
 Optional. Name of the action to be called during the tool use.  | 
                
inputActionParameters | 
                  
                     
 Optional. A list of input parameters for the action.  | 
                
outputActionParameters | 
                  
                     
 Optional. A list of output parameters generated by the action.  | 
                
Union field ToolTrace. The tracing information for different tools. ToolTrace can be only one of the following: | 
                |
dataStoreToolTrace | 
                  
                     
 Optional. Data store tool trace.  | 
                
webhookToolTrace | 
                  
                     
 Optional. Webhook tool trace.  | 
                
DataStoreToolTrace
The tracing information for the data store tool.
| JSON representation | 
|---|
{
  "dataStoreConnectionSignals": {
    object ( | 
                
| Fields | |
|---|---|
dataStoreConnectionSignals | 
                  
                     
 Optional. Data store connection feature output signals.  | 
                
WebhookToolTrace
The tracing information for the webhook tool.
| JSON representation | 
|---|
{ "webhookTag": string, "webhookUri": string }  | 
                
| Fields | |
|---|---|
webhookTag | 
                  
                     
 Optional. The tag of the webhook.  | 
                
webhookUri | 
                  
                     
 Optional. The url of the webhook.  | 
                
LlmCall
Stores metadata of the call of an LLM.
| JSON representation | 
|---|
{ "retrievedExamples": [ { object (  | 
                
| Fields | |
|---|---|
retrievedExamples[] | 
                  
                     
 A list of relevant examples used for the LLM prompt.  | 
                
tokenCount | 
                  
                     
 The token counts of the LLM call.  | 
                
model | 
                  
                     
 The model of the LLM call.  | 
                
temperature | 
                  
                     
 The temperature of the LLM call.  | 
                
RetrievedExample
Relevant example used for the LLM prompt.
| JSON representation | 
|---|
{
  "exampleId": string,
  "exampleDisplayName": string,
  "retrievalStrategy": enum ( | 
                
| Fields | |
|---|---|
exampleId | 
                  
                     
 The id of the example.  | 
                
exampleDisplayName | 
                  
                     
 The display name of the example.  | 
                
retrievalStrategy | 
                  
                     
 Retrieval strategy of the example.  | 
                
matchedRetrievalLabel | 
                  
                     
 Optional. The matched retrieval label of this LLM call.  | 
                
RetrievalStrategy
Retrieval strategy on how the example is selected to be fed to the prompt.
| Enums | |
|---|---|
RETRIEVAL_STRATEGY_UNSPECIFIED | 
                  Not specified. DEFAULT will be used. | 
                
DEFAULT | 
                  Default retrieval strategy. | 
STATIC | 
                  Static example will always be inserted to the prompt. | 
NEVER | 
                  Example will never be inserted into the prompt. | 
TokenCount
Stores token counts of the LLM call.
| JSON representation | 
|---|
{ "totalInputTokenCount": string, "conversationContextTokenCount": string, "exampleTokenCount": string, "totalOutputTokenCount": string }  | 
                
| Fields | |
|---|---|
totalInputTokenCount | 
                  
                     
 The total number of tokens used for the input to the LLM call.  | 
                
conversationContextTokenCount | 
                  
                     
 The number of tokens used for the conversation history in the prompt.  | 
                
exampleTokenCount | 
                  
                     
 The number of tokens used for the retrieved examples in the prompt.  | 
                
totalOutputTokenCount | 
                  
                     
 The total number of tokens used for the output of the LLM call.  | 
                
IntentMatch
Stores metadata of the intent match action.
| JSON representation | 
|---|
{
  "matchedIntents": [
    {
      object ( | 
                
| Fields | |
|---|---|
matchedIntents[] | 
                  
                     
 The matched intent.  | 
                
MatchedIntent
Stores the matched intent, which is the result of the intent match action.
| JSON representation | 
|---|
{ "intentId": string, "displayName": string, "score": number, "generativeFallback": { object } }  | 
                
| Fields | |
|---|---|
intentId | 
                  
                     
 The ID of the matched intent.  | 
                
displayName | 
                  
                     
 The display name of the matched intent.  | 
                
score | 
                  
                     
 The score of the matched intent.  | 
                
generativeFallback | 
                  
                     
 The generative fallback response of the matched intent.  | 
                
FlowStateUpdate
Stores metadata of the state update action, such as a state machine execution in flows.
| JSON representation | 
|---|
{ "eventType": string, "pageState": { object (  | 
                
| Fields | |
|---|---|
eventType | 
                  
                     
 The type of the event that triggered the state update.  | 
                
pageState | 
                  
                     
 The updated page and flow state.  | 
                
updatedParameters | 
                  
                     
 The updated parameters.  | 
                
destination | 
                  
                     
 The destination of the transition. Format:   | 
                
functionCall | 
                  
                     
 The function call to execute.  | 
                
PageState
Stores the state of a page and its flow.
| JSON representation | 
|---|
{ "page": string, "displayName": string, "status": string }  | 
                
| Fields | |
|---|---|
page | 
                  
                     
 The ID of the page. Format:   | 
                
displayName | 
                  
                     
 The display name of the page.  | 
                
status | 
                  
                     
 The status of the page.  | 
                
FunctionCall
Stores the metadata of a function call to execute.
| JSON representation | 
|---|
{ "name": string }  | 
                
| Fields | |
|---|---|
name | 
                  
                     
 The name of the function call.  | 
                
PlaybookInvocation
Stores metadata of the invocation of a child playbook. Playbook invocation actions enter the child playbook.
| JSON representation | 
|---|
{ "playbook": string, "displayName": string, "playbookInput": { object (  | 
                
| Fields | |
|---|---|
playbook | 
                  
                     
 Required. The unique identifier of the playbook. Format:   | 
                
displayName | 
                  
                     
 Output only. The display name of the playbook.  | 
                
playbookInput | 
                  
                     
 Optional. Input of the child playbook invocation.  | 
                
playbookOutput | 
                  
                     
 Optional. Output of the child playbook invocation.  | 
                
playbookState | 
                  
                     
 Required. Playbook invocation's output state.  | 
                
OutputState
Output state.
| Enums | |
|---|---|
OUTPUT_STATE_UNSPECIFIED | 
                  Unspecified output. | 
OUTPUT_STATE_OK | 
                  Succeeded. | 
OUTPUT_STATE_CANCELLED | 
                  Cancelled. | 
OUTPUT_STATE_FAILED | 
                  Failed. | 
OUTPUT_STATE_ESCALATED | 
                  Escalated. | 
OUTPUT_STATE_PENDING | 
                  Pending. | 
FlowInvocation
Stores metadata of the invocation of a child CX flow. Flow invocation actions enter the child flow.
| JSON representation | 
|---|
{
  "flow": string,
  "displayName": string,
  "inputActionParameters": {
    object
  },
  "outputActionParameters": {
    object
  },
  "flowState": enum ( | 
                
| Fields | |
|---|---|
flow | 
                  
                     
 Required. The unique identifier of the flow. Format:   | 
                
displayName | 
                  
                     
 Output only. The display name of the flow.  | 
                
inputActionParameters | 
                  
                     
 Optional. A list of input parameters for the flow.  | 
                
outputActionParameters | 
                  
                     
 Optional. A list of output parameters generated by the flow invocation.  | 
                
flowState | 
                  
                     
 Required. Flow invocation's output state.  | 
                
PlaybookTransition
Stores metadata of the transition to another target playbook. Playbook transition actions exit the caller playbook and enter the target playbook.
| JSON representation | 
|---|
{ "playbook": string, "displayName": string, "inputActionParameters": { object } }  | 
                
| Fields | |
|---|---|
playbook | 
                  
                     
 Required. The unique identifier of the playbook. Format:   | 
                
displayName | 
                  
                     
 Output only. The display name of the playbook.  | 
                
inputActionParameters | 
                  
                     
 A list of input parameters for the action.  | 
                
FlowTransition
Stores metadata of the transition to a target CX flow. Flow transition actions exit the caller playbook and enter the child flow.
| JSON representation | 
|---|
{ "flow": string, "displayName": string, "inputActionParameters": { object } }  | 
                
| Fields | |
|---|---|
flow | 
                  
                     
 Required. The unique identifier of the flow. Format:   | 
                
displayName | 
                  
                     
 Output only. The display name of the flow.  | 
                
inputActionParameters | 
                  
                     
 A list of input parameters for the action.  | 
                
TTS
This type has no fields.
Stores metadata of the Text-to-Speech action.
STT
This type has no fields.
Stores metadata of the Speech-to-Text action.
Span
A span represents a sub execution step of an action.
| JSON representation | 
|---|
{
  "name": string,
  "tags": [
    string
  ],
  "metrics": [
    {
      object ( | 
                
| Fields | |
|---|---|
name | 
                  
                     
 The name of the span.  | 
                
tags[] | 
                  
                     
 The metadata tags of the span such as span type.  | 
                
metrics[] | 
                  
                     
 The unordered collection of metrics in this span.  | 
                
startTime | 
                  
                     
 Timestamp of the start of the span. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
                
completeTime | 
                  
                     
 Timestamp of the completion of the span. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:   | 
                
NamedMetric
A named metric is a metric with name, value and unit.
| JSON representation | 
|---|
{ "name": string, "value": value, "unit": string }  | 
                
| Fields | |
|---|---|
name | 
                  
                     
 The name of the metric.  | 
                
value | 
                  
                     
 The value of the metric.  | 
                
unit | 
                  
                     
 The unit in which this metric is reported. Follows The Unified Code for Units of Measure standard.  | 
                
Status
The status of the action.
| JSON representation | 
|---|
{
  "exception": {
    object ( | 
                
| Fields | |
|---|---|
exception | 
                  
                     
 Optional. The exception thrown during the execution of the action.  | 
                
ExceptionDetail
Exception thrown during the execution of an action.
| JSON representation | 
|---|
{ "errorMessage": string }  | 
                
| Fields | |
|---|---|
errorMessage | 
                  
                     
 Optional. The error message.  | 
                
Methods | 
            |
|---|---|
                
 | 
              Creates an example in the specified playbook. | 
                
 | 
              Deletes the specified example. | 
                
 | 
              Retrieves the specified example. | 
                
 | 
              Returns a list of examples in the specified playbook. | 
                
 | 
              Update the specified example. |