Join the Dialogflow CX competition! Get trained in Dialogflow CX, work on open-source conversational components, get a free Dialogflow t-shirt and win cool prizes! Learn more.

REST Resource: projects.locations.agents

Resource: Agent

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.

After you create an agent, you can add Intents, Entity Types, Flows, Fulfillments, Webhooks, and so on to manage the conversation flows..

JSON representation
{
  "name": string,
  "displayName": string,
  "defaultLanguageCode": string,
  "supportedLanguageCodes": [
    string
  ],
  "timeZone": string,
  "description": string,
  "avatarUri": string,
  "speechToTextSettings": {
    object (SpeechToTextSettings)
  },
  "startFlow": string,
  "securitySettings": string,
  "enableStackdriverLogging": boolean,
  "enableSpellCorrection": boolean,
  "advancedSettings": {
    object (AdvancedSettings)
  }
}
Fields
name

string

The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.

displayName

string

Required. The human-readable name of the agent, unique within the location.

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.

supportedLanguageCodes[]

string

The list of all languages supported by the agent (except for the defaultLanguageCode).

timeZone

string

Required. The time zone of the agent from the time zone database, e.g., America/New_York, Europe/Paris.

description

string

The description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected.

avatarUri

string

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

speechToTextSettings

object (SpeechToTextSettings)

Speech recognition related settings.

startFlow

string

Immutable. 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/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

securitySettings

string

Name of the SecuritySettings reference for the agent. Format: projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>.

enableStackdriverLogging
(deprecated)

boolean

Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead.

enableSpellCorrection

boolean

Indicates if automatic spell correction is enabled in detect intent requests.

advancedSettings

object (AdvancedSettings)

Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.

SpeechToTextSettings

Settings related to speech recognition.

JSON representation
{
  "enableSpeechAdaptation": boolean
}
Fields
enableSpeechAdaptation

boolean

Whether to use speech adaptation for speech recognition.

AdvancedSettings

Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level.

Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.

JSON representation
{
  "loggingSettings": {
    object (LoggingSettings)
  }
}
Fields
loggingSettings

object (LoggingSettings)

Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level.

LoggingSettings

Define behaviors on logging.

JSON representation
{
  "enableStackdriverLogging": boolean,
  "enableInteractionLogging": boolean
}
Fields
enableStackdriverLogging

boolean

If true, StackDriver logging is currently enabled.

enableInteractionLogging

boolean

If true, DF Interaction logging is currently enabled.

Methods

create

Creates an agent in the specified location.

delete

Deletes the specified agent.

export

Exports the specified agent to a binary file.

get

Retrieves the specified agent.

getValidationResult

Gets the latest agent validation result.

list

Returns the list of all agents in the specified location.

patch

Updates the specified agent.

restore

Restores the specified agent from a binary file.

validate

Validates the specified agent and creates or updates validation results.