Skip to content

googleDialogflowCxAgent

Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way.

To get more information about Agent, see:

Example Usage - Dialogflowcx Agent Full

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.dialogflowCxAgent.DialogflowCxAgent(this, "full_agent", {
  avatar_uri:
    "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
  default_language_code: "en",
  description: "Example description.",
  display_name: "dialogflowcx-agent",
  enable_spell_correction: true,
  enable_stackdriver_logging: true,
  location: "global",
  speech_to_text_settings: [
    {
      enable_speech_adaptation: true,
    },
  ],
  supported_language_codes: ["fr", "de", "es"],
  time_zone: "America/New_York",
});

Argument Reference

The following arguments are supported:

  • location - (Required) The name of the location this agent is located in. \~> Note: The first time you are deploying an Agent in your project you must configure location settings. This is a one time step but at the moment you can only configure location settings via the Dialogflow CX console. Another options is to use global location so you don't need to manually configure location settings.

  • displayName - (Required) The human-readable name of the agent, unique within the location.

  • defaultLanguageCode - (Required) 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 updated after creation.

  • timeZone - (Required) The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.


  • supportedLanguageCodes - (Optional) The list of all languages supported by this agent (except for the default_language_code).

  • description - (Optional) The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

  • avatarUri - (Optional) The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration.

  • speechToTextSettings - (Optional) Settings related to speech recognition. Structure is documented below.

  • securitySettings - (Optional) Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.

  • enableStackdriverLogging - (Optional) Determines whether this agent should log conversation queries.

  • enableSpellCorrection - (Optional) Indicates if automatic spell correction is enabled in detect intent requests.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

The speechToTextSettings block supports:

  • enableSpeechAdaptation - (Optional) Whether to use speech adaptation for speech recognition.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/{{location}}/agents/{{name}}

  • name - The unique identifier of the agent.

  • startFlow - 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/.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 40 minutes.
  • update - Default is 40 minutes.
  • delete - Default is 20 minutes.

Import

Agent can be imported using any of these accepted formats:

$ terraform import google_dialogflow_cx_agent.default projects/{{project}}/locations/{{location}}/agents/{{name}}
$ terraform import google_dialogflow_cx_agent.default {{project}}/{{location}}/{{name}}
$ terraform import google_dialogflow_cx_agent.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.