A Conversational Agents (Dialogflow CX) agent is a virtual agent that handles concurrent conversations with your end-users. It is a natural language understanding module that understands the nuances of human language. Conversational Agents (Dialogflow CX) translates end-user text or audio during a conversation to structured data that your apps and services can understand. You design and build a Conversational Agents (Dialogflow CX) agent to handle the types of conversations required for your system.
A Conversational Agents (Dialogflow CX) agent is similar to a human call center agent. You train them both to handle expected conversation scenarios, and your training does not need to be overly explicit.
Create an agent
To create an agent:
Console
- Open the Dialogflow CX Console.
- Create or choose a Google Cloud project.
- Click Create agent.
- Select Auto-generate to create a data store agent or select Build your own to create other kinds of agents.
- Complete the form for basic agent settings:
- You can choose any display name.
- Select your preferred location. Click the Edit button if you want to change advanced location settings.
- Select your preferred time zone.
- Select the default language for your agent. You cannot change the default language for an agent once it is created.
- Click Save.
API
If you have not already configured location settings for your project, you must configure these settings with the console before creating agents with the API. Currently, you cannot configure location settings with the API.
To create an agent,
see the create
method for the Agent
type.
Select a protocol and version for the Agent reference:
Protocol | V3 | V3beta1 |
---|---|---|
REST | Agent resource | Agent resource |
RPC | Agent interface | Agent interface |
C++ | AgentsClient | Not available |
C# | AgentsClient | Not available |
Go | AgentsClient | Not available |
Java | AgentsClient | AgentsClient |
Node.js | AgentsClient | AgentsClient |
PHP | Not available | Not available |
Python | AgentsClient | AgentsClient |
Ruby | Not available | Not available |
Agent data
Conversational Agents (Dialogflow CX) agents serve as top-level containers for settings and data for virtual agents.
To access an agent's data:
Console
- Open the Dialogflow CX Console.
- Choose the Google Cloud project for the agent.
- Find the agent in the list.
- Click the agent display name.
- Update flows, pages, etc. as described in other guides.
API
See the guides for the data you want to update.
The following data is associated with agents:
For more information about how data is applied at varying levels, see the data application levels.
Agent settings
To access agent settings:
Console
- Open the Dialogflow CX Console.
- Choose your Google Cloud project.
- Select your agent.
- Click Agent Settings.
- Update the settings as desired.
- Click Save.
API
See the get
and patch/update
methods for the Agent
type.
Select a protocol and version for the Agent reference:
Protocol | V3 | V3beta1 |
---|---|---|
REST | Agent resource | Agent resource |
RPC | Agent interface | Agent interface |
C++ | AgentsClient | Not available |
C# | AgentsClient | Not available |
Go | AgentsClient | Not available |
Java | AgentsClient | AgentsClient |
Node.js | AgentsClient | AgentsClient |
PHP | Not available | Not available |
Python | AgentsClient | AgentsClient |
Ruby | Not available | Not available |
The following subsections describe the different categories of agent settings.
General settings
The following general settings are available for agents:
-
A human-readable name for your agent.
-
The default time zone for your agent.
-
The default language supported by your agent. Once an agent is created, the default language cannot be changed. However, you can perform the following:
- Export your agent to the JSON format.
- Unzip the downloaded file.
- Find the
agent.json
file. - Update the
defaultLanguageCode
andsupportedLanguageCodes
fields to the desired values. - Restore the agent to the same or different agent from step 1.
- Update language-specific training phrases and entity values as needed.
-
Lock the agent
Indicates whether the agent is locked. A locked agent cannot be edited.
-
Enable Cloud Logging
Indicates whether Cloud logging is enabled for the agent.
Enable interaction logging
Indicates whether you would like Google to collect and store redacted end-user queries for quality improvement.
Enable consent-based end-user input redaction
If this setting is enabled, it lets you use a special session parameter to control whether end-user input and parameters are redacted from conversation history and Cloud logging, by default the session parameter is
true
. If this setting is disabled, no redaction occurs.User consent is collected using a boolean session parameter:
$session.params.conversation-redaction
. If this setting is enabled, and the session parameter is set tofalse
, no redaction occurs (other redaction strategies still apply). If this setting is enabled, and the session parameter is set totrue
, redaction occurs.An example consent requesting flow could be: first ask the user if they would like to keep end-user input, and match the response with two intents, one is "yes intent" and the other is "no intent". Then, set the session parameter to
false
(no redaction) in the parameter presets of the "yes intent" route in fulfillment, and totrue
(redaction occurs) in the parameter preset of the "no intent" route.
-
Enable BigQuery export
Indicates whether BigQuery export is enabled.
BigQuery dataset
The BigQuery dataset name.
BigQuery table
The BigQuery table name.
-
You can enable intent suggestions.
-
In this section, you can create descriptions and payloads for custom payload templates.
ML settings
Conversational Agents (Dialogflow CX) uses machine learning (ML) algorithms to understand end-user inputs, match them to intents, and extract structured data. Conversational Agents (Dialogflow CX) learns from training phrases that you provide and the language models built into Conversational Agents (Dialogflow CX). Based on this data, it builds a model for making decisions about which intent should be matched to an end-user input. You can apply unique ML settings for each flow of an agent, and the model created by Conversational Agents (Dialogflow CX) is unique for each flow.
The following agent-wide ML settings are available:
-
If this is enabled and end-user input has a spelling or grammar mistake, an intent will be matched as though it was written correctly. The detect intent response will contain the corrected end-user input. For example, if an end-user enters "I want an applle", it will be processed as though the end-user entered "I want an apple". This also applies to matches involving both system and custom entities.
Spell correction is available in English, French, German, Spanish, and Italian. It is available in all Conversational Agents (Dialogflow CX) regions.
Warnings and best practices:
- Spell correction can't correct ASR (automatic speech recognition) errors, so we don't recommend enabling it for agents using ASR inputs.
- It is possible for corrected input to match the wrong intent. You can fix this by adding commonly mismatched phrases to negative examples.
- Spell correction increases the agent's response time slightly.
- If an agent is defined using domain-specific jargon, the corrections may be undesired.
The following flow-specific ML settings are available:
-
This can be one of:
- Advanced NLU (default): Advanced NLU technology. This NLU type works better than standard, especially for large agents and flows.
- Standard NLU: Standard NLU technology. Will no longer receive quality improvements or new features.
-
If enabled, the flow is trained whenever it is updated with the console. For large flows, this may cause console UI delays, so you should disable this setting and manually train as-needed for large flows.
-
To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. This setting controls the minimum intent detection confidence required for an intent match.
If the confidence score for an intent match is less than the threshold value, then a no-match event will be invoked.
You can set a separate classification threshold value for every flow in each language enabled for the agent. This is to accommodate different languages performing best at different classification thresholds. For more information about creating a multilingual agent, see the multilingual agents documentation.
-
Indicates whether the flow has been trained since the latest update to the flow data.
-
Use this button to manually train the flow.
Generative AI settings
The following generative AI settings are available:
General
-
List of phrases that are banned for generative AI. If a banned phrase appears in the prompt or the generated response, the generation will fail.
-
Configure sensitivity levels of safety filters with respect to different Responsible AI (RAI) categories. Content will be assessed against the following four categories:
Category Description Hate speech Negative or harmful comments targeting identity and/or protected attributes. Dangerous content Promotes or enables access to harmful goods, services, and activities Sexually explicit content Contains references to sexual acts or other lewd content Harassment Malicious, intimidating, bullying, or abusive comments targeting another individual Content is blocked based on the probability that it's harmful. The sensitivity level can be customized by choosing one of Block few, Block some, and Block most for each category. You can also get access to the Block none restricted option that disables RAI checks for the category after submitting a risk acknowledgment request for your project and receiving approval.
For more information, see configure safety attributes.
-
You can check the enable prompt security check setting to enable prompt security checks. When enabled, the agent will attempt to prevent prompt injection attacks. These attacks may be used to reveal parts of the agent prompt or to provide responses the agent is not supposed to supply. This is accomplished by sending an additional LLM prompt that checks whether the user query is possibly malicious.
This setting is enabled by default for new agents. If your agent was created prior to the release of this setting, the setting is not enabled.
-
Generative Agent
-
Select the model used by generative features. For more information, see model versions.
-
Generative Fallback
Data Store
Speech and IVR settings
The following speech and IVR settings are available:
-
-
You can select the language and voice used for speech synthesis.
You may enable Custom voice for your agent by selecting the custom voice option from the voice selection dropbox and specify the custom voice name in the corresponding field. The custom voice name must follow the following pattern:
projects/PROJECT_ID/locations/LOCATION/models/MODEL_NAME
.- If you are using telephony gateway, make sure the Dialogflow Service Agent service account
service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com
is granted with "AutoML Predictor" in your custom voice project. - For regular API calls, make sure the service account used to call Conversational Agents (Dialogflow CX) is granted with "AutoML Predictor" role in your custom voice project.
- If you are using telephony gateway, make sure the Dialogflow Service Agent service account
-
-
-
For details about advanced speech options, see the Advanced speech settings guide.
DTMF
See DTMF for telephony integrations for more information.
Multimodal
See Call companion.
Share settings
See Access control.
Languages settings
Add additional language support to your agent. For the full list of languages, see the language reference.
Language auto detection
When you configure language auto detection, your chat agent will automatically detect the end-user's language and switch to that language. See the language auto detection documentation for details.
Security settings
See Security settings.
Advanced settings
Currently, the only advanced setting is for sentiment analysis.
Export and restore an agent
You can export an agent to a file, and restore an agent with that file.
An agent export includes all agent data except the following:
- Flow versions: Only the draft flows are exported to file.
- Environments: Custom environments are not exported to file.
An agent restore overwrites all target agent data (including all flow versions) except the following:
- Environments: All custom environments remain unchanged in the target agent. Flow versions referenced by custom environments in the target agent will continue to exist, as long as the associated environments exist. However, these stale flow versions are not listed or selectable flow versions for the agent.
- Vertex AI Agents Apps:
The association to a Vertex AI Agents App remains unchanged
in the target agent. (In other words, the value of
engine
in GenAppBuilderSettings) This means that data store agents can only be restored into other existing data store agents, because the resulting agent also needs to have an association to a Vertex AI Agents App. Vertex AI Agents Data Stores: All references to data stores will be overwritten in the target agent according to the following rules:
- If the target agent isn't associated with an App, then it's not possible to restore an agent with data store references into it. Trying to do so results in an error message. To fix that, you can either create a new data store agent from scratch. (Alternatively, you can turn your existing agent into a data store agent by adding a data store state handler to it. In this case you'll be guided through adding an associated App to your agent.)
- If the target agent is associated with an App, then all the data store references will be updated upon restore: their Google Cloud project ID and location will be updated to match the App of the target agent. The collection ID and data store ID will remain unchanged. This means that you need to add data stores for all the IDs with matching types into the App of the target agent prior to the restore operation.
Example: if the source agent refers to a data store named
projects/123/locations/eu-west2/collections/default_collection/dataStores/myDataStore1
and the App of the target agent is namedprojects/321/locations/us-east1/collections/default_collections/engines/app123
, then the resulting data store reference in the target agent will become:projects/321/locations/us-east1/collections/default_collection/dataStores/myDataStore1
When exporting, you can select the export file format. If you are using source control versioning for your agent data, you should export in the JSON format. When you restore an agent, Conversational Agents (Dialogflow CX) automatically determines the file format.
To export or restore an agent:
Console
- Open the Dialogflow CX Console.
- Choose the Google Cloud project for the agent.
- Click the option more_vert menu for an agent in the list.
- Click the Export or Restore button.
- Follow instructions to complete.
API
See the export
and restore
methods for the Agent
type.
Select a protocol and version for the Agent reference:
Protocol | V3 | V3beta1 |
---|---|---|
REST | Agent resource | Agent resource |
RPC | Agent interface | Agent interface |
C++ | AgentsClient | Not available |
C# | AgentsClient | Not available |
Go | AgentsClient | Not available |
Java | AgentsClient | AgentsClient |
Node.js | AgentsClient | AgentsClient |
PHP | Not available | Not available |
Python | AgentsClient | AgentsClient |
Ruby | Not available | Not available |
If the agent size exceeds the maximum limit, use the Cloud Storage option for agent export and restore.
If you use GitHub, also see the GitHub export/restore guide.
Delete an agent
In order to delete an agent, you need a role that provides full access or edit access. See the access control guide for more information.
To delete an agent:
Console
- Open the Dialogflow CX Console.
- Choose the Google Cloud project for the agent.
- Click the option more_vert menu for an agent in the list.
- Click the delete delete button.
- Confirm deletion in the dialog.
API
See the delete
method for the Agent
type.
Select a protocol and version for the Agent reference:
Protocol | V3 | V3beta1 |
---|---|---|
REST | Agent resource | Agent resource |
RPC | Agent interface | Agent interface |
C++ | AgentsClient | Not available |
C# | AgentsClient | Not available |
Go | AgentsClient | Not available |
Java | AgentsClient | AgentsClient |
Node.js | AgentsClient | AgentsClient |
PHP | Not available | Not available |
Python | AgentsClient | AgentsClient |
Ruby | Not available | Not available |
If you delete your project, all Conversational Agents (Dialogflow CX) agents and data associated with the project are deleted immediately.