agents
Creates, updates, deletes, gets or lists an agents
resource.
Overview
Name | agents |
Type | Resource |
Id | google.dialogflow.agents |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_agents_get
- projects_locations_agents_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: projects//locations//agents/ . |
advancedSettings | object | Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. (id: GoogleCloudDialogflowCxV3AdvancedSettings) |
answerFeedbackSettings | object | Optional. Answer feedback collection settings. (id: GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings) |
avatarUri | string | The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration. |
clientCertificateSettings | object | Optional. Settings for custom client certificates. (id: GoogleCloudDialogflowCxV3AgentClientCertificateSettings) |
defaultLanguageCode | string | Required. 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. |
description | string | The description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected. |
displayName | string | Required. The human-readable name of the agent, unique within the location. |
enableMultiLanguageTraining | boolean | Optional. Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent. |
enableSpellCorrection | boolean | Indicates if automatic spell correction is enabled in detect intent requests. |
enableStackdriverLogging | boolean | Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead. |
genAppBuilderSettings | object | Gen App Builder-related agent-level settings. (id: GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings) |
gitIntegrationSettings | object | Git integration settings for this agent. (id: GoogleCloudDialogflowCxV3AgentGitIntegrationSettings) |
locked | boolean | Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent. |
personalizationSettings | object | Optional. Settings for end user personalization. (id: GoogleCloudDialogflowCxV3AgentPersonalizationSettings) |
satisfiesPzi | boolean | Optional. Output only. A read only boolean field reflecting Zone Isolation status of the agent. |
satisfiesPzs | boolean | Optional. Output only. A read only boolean field reflecting Zone Separation status of the agent. |
securitySettings | string | Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/ . |
speechToTextSettings | object | Speech recognition related settings. (id: GoogleCloudDialogflowCxV3SpeechToTextSettings) |
startFlow | string | 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/ . Currently only the default start flow with id "00000000-0000-0000-0000-000000000000" is allowed. |
startPlaybook | string | Name 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. |
supportedLanguageCodes | array | The list of all languages supported by the agent (except for the default_language_code ). |
textToSpeechSettings | object | Settings on instructing the speech synthesizer on how to generate the output audio content. (id: GoogleCloudDialogflowCxV3TextToSpeechSettings) |
timeZone | string | Required. The time zone of the agent from the time zone database, e.g., America/New_York, Europe/Paris. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: projects//locations//agents/ . |
advancedSettings | object | Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. (id: GoogleCloudDialogflowCxV3AdvancedSettings) |
answerFeedbackSettings | object | Optional. Answer feedback collection settings. (id: GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings) |
avatarUri | string | The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration. |
clientCertificateSettings | object | Optional. Settings for custom client certificates. (id: GoogleCloudDialogflowCxV3AgentClientCertificateSettings) |
defaultLanguageCode | string | Required. 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. |
description | string | The description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected. |
displayName | string | Required. The human-readable name of the agent, unique within the location. |
enableMultiLanguageTraining | boolean | Optional. Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent. |
enableSpellCorrection | boolean | Indicates if automatic spell correction is enabled in detect intent requests. |
enableStackdriverLogging | boolean | Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead. |
genAppBuilderSettings | object | Gen App Builder-related agent-level settings. (id: GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings) |
gitIntegrationSettings | object | Git integration settings for this agent. (id: GoogleCloudDialogflowCxV3AgentGitIntegrationSettings) |
locked | boolean | Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent. |
personalizationSettings | object | Optional. Settings for end user personalization. (id: GoogleCloudDialogflowCxV3AgentPersonalizationSettings) |
satisfiesPzi | boolean | Optional. Output only. A read only boolean field reflecting Zone Isolation status of the agent. |
satisfiesPzs | boolean | Optional. Output only. A read only boolean field reflecting Zone Separation status of the agent. |
securitySettings | string | Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/ . |
speechToTextSettings | object | Speech recognition related settings. (id: GoogleCloudDialogflowCxV3SpeechToTextSettings) |
startFlow | string | 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/ . Currently only the default start flow with id "00000000-0000-0000-0000-000000000000" is allowed. |
startPlaybook | string | Name 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. |
supportedLanguageCodes | array | The list of all languages supported by the agent (except for the default_language_code ). |
textToSpeechSettings | object | Settings on instructing the speech synthesizer on how to generate the output audio content. (id: GoogleCloudDialogflowCxV3TextToSpeechSettings) |
timeZone | string | Required. 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_agents_get | select | projectsId , locationsId , agentsId | Retrieves the specified agent. | |
projects_locations_agents_list | select | projectsId , locationsId | pageSize , pageToken | Returns the list of all agents in the specified location. |
projects_locations_agents_create | insert | projectsId , locationsId | Creates an agent in the specified location. Note: You should always train flows prior to sending them queries. See the training documentation. | |
projects_locations_agents_patch | update | projectsId , locationsId , agentsId | updateMask | Updates the specified agent. Note: You should always train flows prior to sending them queries. See the training documentation. |
projects_locations_agents_delete | delete | projectsId , locationsId , agentsId | Deletes the specified agent. | |
projects_locations_agents_export | exec | projectsId , locationsId , agentsId | 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 | |
projects_locations_agents_restore | exec | projectsId , locationsId , agentsId | Restores 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_validate | exec | projectsId , locationsId , agentsId | Validates 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.
Name | Datatype | Description |
---|---|---|
agentsId | string | |
locationsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_agents_get
- projects_locations_agents_list
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;
Returns the list of all agents in the specified location.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_agents_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: agents
props:
- name: projectsId
value: string
description: Required parameter for the agents resource.
- name: locationsId
value: string
description: Required parameter for the agents resource.
- name: name
value: string
description: >
The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: `projects//locations//agents/`.
- name: displayName
value: string
description: >
Required. The human-readable name of the agent, unique within the location.
- name: defaultLanguageCode
value: string
description: >
Required. Immutable. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.
- name: supportedLanguageCodes
value: array
description: >
The list of all languages supported by the agent (except for the `default_language_code`).
- name: timeZone
value: string
description: >
Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.
- name: description
value: string
description: >
The description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected.
- name: avatarUri
value: string
description: >
The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.
- name: speechToTextSettings
value: object
description: >
Speech recognition related settings.
- name: startFlow
value: string
description: >
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/`. Currently only the default start flow with id "00000000-0000-0000-0000-000000000000" is allowed.
- name: startPlaybook
value: string
description: >
Name 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.
- name: securitySettings
value: string
description: >
Name of the SecuritySettings reference for the agent. Format: `projects//locations//securitySettings/`.
- name: enableStackdriverLogging
value: boolean
description: >
Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead.
- name: enableSpellCorrection
value: boolean
description: >
Indicates if automatic spell correction is enabled in detect intent requests.
- name: enableMultiLanguageTraining
value: boolean
description: >
Optional. Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent.
- name: locked
value: boolean
description: >
Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent.
- name: advancedSettings
value: object
description: >
Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
- name: gitIntegrationSettings
value: object
description: >
Git integration settings for this agent.
- name: textToSpeechSettings
value: object
description: >
Settings on instructing the speech synthesizer on how to generate the output audio content.
- name: genAppBuilderSettings
value: object
description: >
Gen App Builder-related agent-level settings.
- name: answerFeedbackSettings
value: object
description: >
Optional. Answer feedback collection settings.
- name: personalizationSettings
value: object
description: >
Optional. Settings for end user personalization.
- name: clientCertificateSettings
value: object
description: >
Optional. Settings for custom client certificates.
UPDATE
examples
- projects_locations_agents_patch
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
- projects_locations_agents_delete
Deletes the specified agent.
DELETE FROM google.dialogflow.agents
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required;
Lifecycle Methods
- projects_locations_agents_export
- projects_locations_agents_restore
- projects_locations_agents_validate
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 }}
}';
Restores 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.
EXEC google.dialogflow.agents.projects_locations_agents_restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"agentUri": "{{ agentUri }}",
"agentContent": "{{ agentContent }}",
"gitSource": "{{ gitSource }}",
"restoreOption": "{{ restoreOption }}"
}';
Validates 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.
EXEC google.dialogflow.agents.projects_locations_agents_validate
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"languageCode": "{{ languageCode }}"
}';