Skip to main content

agents

Creates, updates, deletes, gets or lists an agents resource.

Overview

Nameagents
TypeResource
Idgoogle.dialogflow.agents

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: projects//locations//agents/.
advancedSettingsobjectHierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. (id: GoogleCloudDialogflowCxV3AdvancedSettings)
answerFeedbackSettingsobjectOptional. Answer feedback collection settings. (id: GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings)
avatarUristringThe URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
clientCertificateSettingsobjectOptional. Settings for custom client certificates. (id: GoogleCloudDialogflowCxV3AgentClientCertificateSettings)
defaultLanguageCodestringRequired. Immutable. The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.
descriptionstringThe description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected.
displayNamestringRequired. The human-readable name of the agent, unique within the location.
enableMultiLanguageTrainingbooleanOptional. Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent.
enableSpellCorrectionbooleanIndicates if automatic spell correction is enabled in detect intent requests.
enableStackdriverLoggingbooleanIndicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead.
genAppBuilderSettingsobjectGen App Builder-related agent-level settings. (id: GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings)
gitIntegrationSettingsobjectGit integration settings for this agent. (id: GoogleCloudDialogflowCxV3AgentGitIntegrationSettings)
lockedbooleanIndicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent.
personalizationSettingsobjectOptional. Settings for end user personalization. (id: GoogleCloudDialogflowCxV3AgentPersonalizationSettings)
satisfiesPzibooleanOptional. Output only. A read only boolean field reflecting Zone Isolation status of the agent.
satisfiesPzsbooleanOptional. Output only. A read only boolean field reflecting Zone Separation status of the agent.
securitySettingsstringName of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.
speechToTextSettingsobjectSpeech recognition related settings. (id: GoogleCloudDialogflowCxV3SpeechToTextSettings)
startFlowstringName of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects//locations//agents//flows/. Currently only the default start flow with id "00000000-0000-0000-0000-000000000000" is allowed.
startPlaybookstringName of the start playbook in this agent. A start playbook will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects//locations//agents//playbooks/. Currently only the default playbook with id "00000000-0000-0000-0000-000000000000" is allowed.
supportedLanguageCodesarrayThe list of all languages supported by the agent (except for the default_language_code).
textToSpeechSettingsobjectSettings on instructing the speech synthesizer on how to generate the output audio content. (id: GoogleCloudDialogflowCxV3TextToSpeechSettings)
timeZonestringRequired. The time zone of the agent from the time zone database, e.g., America/New_York, Europe/Paris.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_agents_getselectprojectsId, locationsId, agentsIdRetrieves the specified agent.
projects_locations_agents_listselectprojectsId, locationsIdpageSize, pageTokenReturns the list of all agents in the specified location.
projects_locations_agents_createinsertprojectsId, locationsIdCreates an agent in the specified location. Note: You should always train flows prior to sending them queries. See the training documentation.
projects_locations_agents_patchupdateprojectsId, locationsId, agentsIdupdateMaskUpdates the specified agent. Note: You should always train flows prior to sending them queries. See the training documentation.
projects_locations_agents_deletedeleteprojectsId, locationsId, agentsIdDeletes the specified agent.
projects_locations_agents_exportexecprojectsId, locationsId, agentsIdExports the specified agent to a binary file. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: An empty Struct message - response: ExportAgentResponse
projects_locations_agents_restoreexecprojectsId, locationsId, agentsIdRestores the specified agent from a binary file. Replaces the current agent with a new one. Note that all existing resources in agent (e.g. intents, entity types, flows) will be removed. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: An empty Struct message - response: An Empty message Note: You should always train flows prior to sending them queries. See the training documentation.
projects_locations_agents_validateexecprojectsId, locationsId, agentsIdValidates the specified agent and creates or updates validation results. The agent in draft version is validated. Please call this API after the training is completed to get the complete validation results.

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
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the specified agent.

SELECT
name,
advancedSettings,
answerFeedbackSettings,
avatarUri,
clientCertificateSettings,
defaultLanguageCode,
description,
displayName,
enableMultiLanguageTraining,
enableSpellCorrection,
enableStackdriverLogging,
genAppBuilderSettings,
gitIntegrationSettings,
locked,
personalizationSettings,
satisfiesPzi,
satisfiesPzs,
securitySettings,
speechToTextSettings,
startFlow,
startPlaybook,
supportedLanguageCodes,
textToSpeechSettings,
timeZone
FROM google.dialogflow.agents
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required;

INSERT examples

Creates an agent in the specified location. Note: You should always train flows prior to sending them queries. See the training documentation.

INSERT INTO google.dialogflow.agents (
data__name,
data__displayName,
data__defaultLanguageCode,
data__supportedLanguageCodes,
data__timeZone,
data__description,
data__avatarUri,
data__speechToTextSettings,
data__startFlow,
data__startPlaybook,
data__securitySettings,
data__enableStackdriverLogging,
data__enableSpellCorrection,
data__enableMultiLanguageTraining,
data__locked,
data__advancedSettings,
data__gitIntegrationSettings,
data__textToSpeechSettings,
data__genAppBuilderSettings,
data__answerFeedbackSettings,
data__personalizationSettings,
data__clientCertificateSettings,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ defaultLanguageCode }}',
'{{ supportedLanguageCodes }}',
'{{ timeZone }}',
'{{ description }}',
'{{ avatarUri }}',
'{{ speechToTextSettings }}',
'{{ startFlow }}',
'{{ startPlaybook }}',
'{{ securitySettings }}',
{{ enableStackdriverLogging }},
{{ enableSpellCorrection }},
{{ enableMultiLanguageTraining }},
{{ locked }},
'{{ advancedSettings }}',
'{{ gitIntegrationSettings }}',
'{{ textToSpeechSettings }}',
'{{ genAppBuilderSettings }}',
'{{ answerFeedbackSettings }}',
'{{ personalizationSettings }}',
'{{ clientCertificateSettings }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
advancedSettings,
answerFeedbackSettings,
avatarUri,
clientCertificateSettings,
defaultLanguageCode,
description,
displayName,
enableMultiLanguageTraining,
enableSpellCorrection,
enableStackdriverLogging,
genAppBuilderSettings,
gitIntegrationSettings,
locked,
personalizationSettings,
satisfiesPzi,
satisfiesPzs,
securitySettings,
speechToTextSettings,
startFlow,
startPlaybook,
supportedLanguageCodes,
textToSpeechSettings,
timeZone
;

UPDATE examples

Updates the specified agent. Note: You should always train flows prior to sending them queries. See the training documentation.

UPDATE google.dialogflow.agents
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__defaultLanguageCode = '{{ defaultLanguageCode }}',
data__supportedLanguageCodes = '{{ supportedLanguageCodes }}',
data__timeZone = '{{ timeZone }}',
data__description = '{{ description }}',
data__avatarUri = '{{ avatarUri }}',
data__speechToTextSettings = '{{ speechToTextSettings }}',
data__startFlow = '{{ startFlow }}',
data__startPlaybook = '{{ startPlaybook }}',
data__securitySettings = '{{ securitySettings }}',
data__enableStackdriverLogging = {{ enableStackdriverLogging }},
data__enableSpellCorrection = {{ enableSpellCorrection }},
data__enableMultiLanguageTraining = {{ enableMultiLanguageTraining }},
data__locked = {{ locked }},
data__advancedSettings = '{{ advancedSettings }}',
data__gitIntegrationSettings = '{{ gitIntegrationSettings }}',
data__textToSpeechSettings = '{{ textToSpeechSettings }}',
data__genAppBuilderSettings = '{{ genAppBuilderSettings }}',
data__answerFeedbackSettings = '{{ answerFeedbackSettings }}',
data__personalizationSettings = '{{ personalizationSettings }}',
data__clientCertificateSettings = '{{ clientCertificateSettings }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
advancedSettings,
answerFeedbackSettings,
avatarUri,
clientCertificateSettings,
defaultLanguageCode,
description,
displayName,
enableMultiLanguageTraining,
enableSpellCorrection,
enableStackdriverLogging,
genAppBuilderSettings,
gitIntegrationSettings,
locked,
personalizationSettings,
satisfiesPzi,
satisfiesPzs,
securitySettings,
speechToTextSettings,
startFlow,
startPlaybook,
supportedLanguageCodes,
textToSpeechSettings,
timeZone;

DELETE examples

Deletes the specified agent.

DELETE FROM google.dialogflow.agents
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required;

Lifecycle Methods

Exports the specified agent to a binary file. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: An empty Struct message - response: ExportAgentResponse

EXEC google.dialogflow.agents.projects_locations_agents_export 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"agentUri": "{{ agentUri }}",
"dataFormat": "{{ dataFormat }}",
"environment": "{{ environment }}",
"gitDestination": "{{ gitDestination }}",
"includeBigqueryExportSettings": {{ includeBigqueryExportSettings }}
}';