Common types

This page lists commonly used types in the Dialogflow API and provides links to reference documentation and samples.

Agents

An agent is a natural language understanding module that you build and use in your app or service.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Agents references

Contexts

Contexts are used to control the flow of a conversation.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Contexts references

Documents

A document for a knowledge base.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Documents references

V2 V2Beta1
REST Not available projects.knowledgeBases.documents,
projects.locations.knowledgeBases.documents
RPC Not available Document
C++ Not available Not available
C# Not available Not available
Go Not available Not available
Java Not available DocumentsClient
Node.js Not available DocumentsClient
PHP Not available Not available
Python Not available DocumentsClient
Ruby Not available Not available

Documents samples

Sample REST C# Go Java Node.js PHP Python Ruby
Knowledge connectors

EntityTypes

Entity types serve as a tool for extracting parameter values from natural language queries.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

EntityTypes references

Environments

You can serve your agent from one or more environments, like testing, staging, and production.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Environments references

Intents

An intent represents a mapping between input from a user and an action to be taken by your application.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Intents references

Intents samples

Sample REST C# Go Java Node.js PHP Python Ruby
Manage intents with the API

KnowledgeBases

KnowledgeBases parse documents (for example, FAQs or articles) to find automated responses.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

KnowledgeBases references

V2 V2Beta1
REST Not available projects.agent.knowledgeBases,
projects.locations.agent.knowledgeBases
RPC Not available KnowledgeBase
C++ Not available Not available
C# Not available Not available
Go Not available Not available
Java Not available KnowledgeBasesClient
Node.js Not available KnowledgeBasesClient
PHP Not available Not available
Python KnowledgeBasesClient KnowledgeBasesClient
Ruby Not available Not available

KnowledgeBases samples

Sample REST C# Go Java Node.js PHP Python Ruby
Knowledge connectors

Operations

A long-running operation that can be polled for completion. This type only has links to REST and RPC references, because client libraries implement long-running operations in a way that is idiomatic for each language. See the documentation for the method that returns the operation.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Operations references

Operations samples

Sample REST C# Go Java Node.js PHP Python Ruby
Long-running operations

Sessions

A session represents an interaction with a user.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Sessions references

Sessions samples

Sample REST C# Go Java Node.js PHP Python Ruby
Quickstart: Interactions with the API
Detect intent from audio file
Detect intent from audio stream
Detect intent with speech response
Detect intent with sentiment analysis

SessionEntityTypes

Session entities can extend or replace custom entity types and only exist during the session that they were created for.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

SessionEntityTypes references

WebhookRequest

The request message for a webhook call sent from Dialogflow to your service.

WebhookRequest references

V2 V2Beta1
REST WebhookRequest WebhookRequest

WebhookResponse

The response message for a webhook call sent from your service to Dialogflow.

WebhookResponse references

Versions

You can maintain multiple versions of agents.

To find the reference information for this type, click the appropriate link below for your protocol, client library language, and API version.

Some REST resources can be accessed by specifying a region. These resources have two REST reference links: one with and one without a location path parameter. The two resource references are otherwise identical.

Versions references