Skip to main content

playbooks

Creates, updates, deletes, gets or lists a playbooks resource.

Overview

Nameplaybooks
TypeResource
Idgoogle.dialogflow.playbooks

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe unique identifier of the playbook. Format: projects//locations//agents//playbooks/.
createTimestring (google-datetime)Output only. The timestamp of initial playbook creation.
displayNamestringRequired. The human-readable name of the playbook, unique within an agent.
goalstringRequired. 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.
handlersarrayOptional. A list of registered handlers to execuate based on the specified triggers.
inputParameterDefinitionsarrayOptional. Defined structured input parameters for this playbook.
instructionobjectInstruction to accomplish target goal. (id: GoogleCloudDialogflowCxV3PlaybookInstruction)
llmModelSettingsobjectOptional. Llm model settings for the playbook. (id: GoogleCloudDialogflowCxV3LlmModelSettings)
outputParameterDefinitionsarrayOptional. Defined structured output parameters for this playbook.
playbookTypestringOptional. Type of the playbook.
referencedFlowsarrayOutput only. The resource name of flows referenced by the current playbook in the instructions.
referencedPlaybooksarrayOutput only. The resource name of other playbooks referenced by the current playbook in the instructions.
referencedToolsarrayOptional. 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.
tokenCountstring (int64)Output only. Estimated number of tokes current playbook takes when sent to the LLM.
updateTimestring (google-datetime)Output only. Last time the playbook version was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_playbooks_getselectprojectsId, locationsId, agentsId, playbooksIdRetrieves the specified Playbook.
projects_locations_agents_playbooks_listselectprojectsId, locationsId, agentsIdpageSize, pageTokenReturns a list of playbooks in the specified agent.
projects_locations_agents_playbooks_createinsertprojectsId, locationsId, agentsIdCreates a playbook in a specified agent.
projects_locations_agents_playbooks_patchupdateprojectsId, locationsId, agentsId, playbooksIdupdateMaskUpdates the specified Playbook.
projects_locations_agents_playbooks_deletedeleteprojectsId, locationsId, agentsId, playbooksIdDeletes a specified playbook.
projects_locations_agents_playbooks_exportexecprojectsId, locationsId, agentsId, playbooksIdExports the specified playbook to a binary file. Note that resources (e.g. examples, tools) that the playbook references will also be exported.
projects_locations_agents_playbooks_importexecprojectsId, locationsId, agentsIdImports the specified playbook to the specified agent from a binary file.

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.

NameDatatypeDescription
agentsIdstring
locationsIdstring
playbooksIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}';