playbooks
Creates, updates, deletes, gets or lists a playbooks
resource.
Overview
Name | playbooks |
Type | Resource |
Id | google.dialogflow.playbooks |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_agents_playbooks_get
- projects_locations_agents_playbooks_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the playbook. Format: projects//locations//agents//playbooks/ . |
createTime | string (google-datetime) | Output only. The timestamp of initial playbook creation. |
displayName | string | Required. The human-readable name of the playbook, unique within an agent. |
goal | string | Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook. |
handlers | array | Optional. A list of registered handlers to execuate based on the specified triggers. |
inputParameterDefinitions | array | Optional. Defined structured input parameters for this playbook. |
instruction | object | Instruction to accomplish target goal. (id: GoogleCloudDialogflowCxV3PlaybookInstruction) |
llmModelSettings | object | Optional. Llm model settings for the playbook. (id: GoogleCloudDialogflowCxV3LlmModelSettings) |
outputParameterDefinitions | array | Optional. Defined structured output parameters for this playbook. |
playbookType | string | Optional. Type of the playbook. |
referencedFlows | array | Output only. The resource name of flows referenced by the current playbook in the instructions. |
referencedPlaybooks | array | Output only. The resource name of other playbooks referenced by the current playbook in the instructions. |
referencedTools | array | Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps. |
tokenCount | string (int64) | Output only. Estimated number of tokes current playbook takes when sent to the LLM. |
updateTime | string (google-datetime) | Output only. Last time the playbook version was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the playbook. Format: projects//locations//agents//playbooks/ . |
createTime | string (google-datetime) | Output only. The timestamp of initial playbook creation. |
displayName | string | Required. The human-readable name of the playbook, unique within an agent. |
goal | string | Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook. |
handlers | array | Optional. A list of registered handlers to execuate based on the specified triggers. |
inputParameterDefinitions | array | Optional. Defined structured input parameters for this playbook. |
instruction | object | Instruction to accomplish target goal. (id: GoogleCloudDialogflowCxV3PlaybookInstruction) |
llmModelSettings | object | Optional. Llm model settings for the playbook. (id: GoogleCloudDialogflowCxV3LlmModelSettings) |
outputParameterDefinitions | array | Optional. Defined structured output parameters for this playbook. |
playbookType | string | Optional. Type of the playbook. |
referencedFlows | array | Output only. The resource name of flows referenced by the current playbook in the instructions. |
referencedPlaybooks | array | Output only. The resource name of other playbooks referenced by the current playbook in the instructions. |
referencedTools | array | Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps. |
tokenCount | string (int64) | Output only. Estimated number of tokes current playbook takes when sent to the LLM. |
updateTime | string (google-datetime) | Output only. Last time the playbook version was updated. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
agentsId | string | |
locationsId | string | |
playbooksId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_agents_playbooks_get
- projects_locations_agents_playbooks_list
Retrieves the specified Playbook.
SELECT
name,
createTime,
displayName,
goal,
handlers,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime
FROM google.dialogflow.playbooks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND playbooksId = '{{ playbooksId }}' -- required;
Returns a list of playbooks in the specified agent.
SELECT
name,
createTime,
displayName,
goal,
handlers,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime
FROM google.dialogflow.playbooks
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_agents_playbooks_create
- Manifest
Creates a playbook in a specified agent.
INSERT INTO google.dialogflow.playbooks (
data__name,
data__displayName,
data__goal,
data__inputParameterDefinitions,
data__outputParameterDefinitions,
data__instruction,
data__referencedTools,
data__llmModelSettings,
data__handlers,
data__playbookType,
projectsId,
locationsId,
agentsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ goal }}',
'{{ inputParameterDefinitions }}',
'{{ outputParameterDefinitions }}',
'{{ instruction }}',
'{{ referencedTools }}',
'{{ llmModelSettings }}',
'{{ handlers }}',
'{{ playbookType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}'
RETURNING
name,
createTime,
displayName,
goal,
handlers,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime
;
# Description fields are for documentation purposes
- name: playbooks
props:
- name: projectsId
value: string
description: Required parameter for the playbooks resource.
- name: locationsId
value: string
description: Required parameter for the playbooks resource.
- name: agentsId
value: string
description: Required parameter for the playbooks resource.
- name: name
value: string
description: >
The unique identifier of the playbook. Format: `projects//locations//agents//playbooks/`.
- name: displayName
value: string
description: >
Required. The human-readable name of the playbook, unique within an agent.
- name: goal
value: string
description: >
Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook.
- name: inputParameterDefinitions
value: array
description: >
Optional. Defined structured input parameters for this playbook.
- name: outputParameterDefinitions
value: array
description: >
Optional. Defined structured output parameters for this playbook.
- name: instruction
value: object
description: >
Instruction to accomplish target goal.
- name: referencedTools
value: array
description: >
Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps.
- name: llmModelSettings
value: object
description: >
Optional. Llm model settings for the playbook.
- name: handlers
value: array
description: >
Optional. A list of registered handlers to execuate based on the specified triggers.
- name: playbookType
value: string
description: >
Optional. Type of the playbook.
valid_values: ['PLAYBOOK_TYPE_UNSPECIFIED', 'TASK', 'ROUTINE']
UPDATE
examples
- projects_locations_agents_playbooks_patch
Updates the specified Playbook.
UPDATE google.dialogflow.playbooks
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__goal = '{{ goal }}',
data__inputParameterDefinitions = '{{ inputParameterDefinitions }}',
data__outputParameterDefinitions = '{{ outputParameterDefinitions }}',
data__instruction = '{{ instruction }}',
data__referencedTools = '{{ referencedTools }}',
data__llmModelSettings = '{{ llmModelSettings }}',
data__handlers = '{{ handlers }}',
data__playbookType = '{{ playbookType }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND playbooksId = '{{ playbooksId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
displayName,
goal,
handlers,
inputParameterDefinitions,
instruction,
llmModelSettings,
outputParameterDefinitions,
playbookType,
referencedFlows,
referencedPlaybooks,
referencedTools,
tokenCount,
updateTime;
DELETE
examples
- projects_locations_agents_playbooks_delete
Deletes a specified playbook.
DELETE FROM google.dialogflow.playbooks
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND playbooksId = '{{ playbooksId }}' --required;
Lifecycle Methods
- projects_locations_agents_playbooks_export
- projects_locations_agents_playbooks_import
Exports the specified playbook to a binary file. Note that resources (e.g. examples, tools) that the playbook references will also be exported.
EXEC google.dialogflow.playbooks.projects_locations_agents_playbooks_export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required,
@playbooksId='{{ playbooksId }}' --required
@@json=
'{
"playbookUri": "{{ playbookUri }}",
"dataFormat": "{{ dataFormat }}"
}';
Imports the specified playbook to the specified agent from a binary file.
EXEC google.dialogflow.playbooks.projects_locations_agents_playbooks_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"playbookUri": "{{ playbookUri }}",
"playbookContent": "{{ playbookContent }}",
"importStrategy": "{{ importStrategy }}"
}';