Skip to main content

agents

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

Overview

Nameagents
TypeResource
Idgoogle.dialogflow.agents

Fields

NameDatatypeDescription
namestringThe unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: projects//locations//agents/.
descriptionstringThe description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected.
advancedSettingsobjectHierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
answerFeedbackSettingsobjectSettings for answer feedback collection.
avatarUristringThe URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.
clientCertificateSettingsobjectSettings for custom client certificates.
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.
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.
genAppBuilderSettingsobjectSettings for Gen App Builder.
gitIntegrationSettingsobjectSettings for connecting to Git repository for an agent.
lockedbooleanIndicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent.
personalizationSettingsobjectSettings for end user personalization.
securitySettingsstringName of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.
speechToTextSettingsobjectSettings related to speech recognition.
startFlowstringImmutable. Name 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/.
supportedLanguageCodesarrayThe list of all languages supported by the agent (except for the default_language_code).
textToSpeechSettingsobjectSettings related to speech synthesizing.
timeZonestringRequired. The time zone of the agent from the time zone database, e.g., America/New_York, Europe/Paris.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_agents_getSELECTagentsId, locationsId, projectsIdRetrieves the specified agent.
projects_locations_agents_listSELECTlocationsId, projectsIdReturns the list of all agents in the specified location.
projects_locations_agents_createINSERTlocationsId, projectsIdCreates an agent in the specified location. Note: You should always train flows prior to sending them queries. See the training documentation.
projects_locations_agents_deleteDELETEagentsId, locationsId, projectsIdDeletes the specified agent.
projects_locations_agents_patchUPDATEagentsId, locationsId, projectsIdUpdates the specified agent. Note: You should always train flows prior to sending them queries. See the training documentation.
projects_locations_agents_exportEXECagentsId, locationsId, projectsIdExports 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_restoreEXECagentsId, locationsId, projectsIdRestores 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_validateEXECagentsId, locationsId, projectsIdValidates 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.

SELECT examples

Returns the list of all agents in the specified location.

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

INSERT example

Use the following StackQL query and manifest file to create a new agents resource.

/*+ create */
INSERT INTO google.dialogflow.agents (
locationsId,
projectsId,
name,
displayName,
defaultLanguageCode,
supportedLanguageCodes,
timeZone,
description,
avatarUri,
speechToTextSettings,
startFlow,
securitySettings,
enableStackdriverLogging,
enableSpellCorrection,
enableMultiLanguageTraining,
locked,
advancedSettings,
gitIntegrationSettings,
textToSpeechSettings,
genAppBuilderSettings,
answerFeedbackSettings,
personalizationSettings,
clientCertificateSettings
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ defaultLanguageCode }}',
'{{ supportedLanguageCodes }}',
'{{ timeZone }}',
'{{ description }}',
'{{ avatarUri }}',
'{{ speechToTextSettings }}',
'{{ startFlow }}',
'{{ securitySettings }}',
{{ enableStackdriverLogging }},
{{ enableSpellCorrection }},
{{ enableMultiLanguageTraining }},
{{ locked }},
'{{ advancedSettings }}',
'{{ gitIntegrationSettings }}',
'{{ textToSpeechSettings }}',
'{{ genAppBuilderSettings }}',
'{{ answerFeedbackSettings }}',
'{{ personalizationSettings }}',
'{{ clientCertificateSettings }}'
;

UPDATE example

Updates a agents resource.

/*+ update */
UPDATE google.dialogflow.agents
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
defaultLanguageCode = '{{ defaultLanguageCode }}',
supportedLanguageCodes = '{{ supportedLanguageCodes }}',
timeZone = '{{ timeZone }}',
description = '{{ description }}',
avatarUri = '{{ avatarUri }}',
speechToTextSettings = '{{ speechToTextSettings }}',
startFlow = '{{ startFlow }}',
securitySettings = '{{ securitySettings }}',
enableStackdriverLogging = true|false,
enableSpellCorrection = true|false,
enableMultiLanguageTraining = true|false,
locked = true|false,
advancedSettings = '{{ advancedSettings }}',
gitIntegrationSettings = '{{ gitIntegrationSettings }}',
textToSpeechSettings = '{{ textToSpeechSettings }}',
genAppBuilderSettings = '{{ genAppBuilderSettings }}',
answerFeedbackSettings = '{{ answerFeedbackSettings }}',
personalizationSettings = '{{ personalizationSettings }}',
clientCertificateSettings = '{{ clientCertificateSettings }}'
WHERE
agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified agents resource.

/*+ delete */
DELETE FROM google.dialogflow.agents
WHERE agentsId = '{{ agentsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';