Sessions

A session represents a conversation between a Dialogflow agent and an end-user. You create a session at the beginning of a conversation and use it for each turn of the conversation. Once the conversation has ended, you discontinue using the session.

You should not use the same session for concurrent conversations with different end-users. A session remains active and its data is stored for 30 minutes after the last request is sent for the session.

Each session is determined unique by a session ID generated by your system. You create a new session by providing a new session ID in a detect intent request and other session methods. A session ID is a string of at most 36 bytes in size. Your system is responsible for generating unique session IDs. They can be random numbers, hashed end-user identifiers, or any other values that are convenient for you to generate.

Check the Regionalization documentation for information about the Location ID value in the session name.

For information on session pricing, see the pricing page.

For more information on sessions:

Select a protocol and version for the Session reference:

Protocol V3 V3beta1
REST Session resource Session resource
RPC Session interface Session interface
C# Not available Not available
Go Not available Not available
Java SessionsClient SessionsClient
Node.js SessionsClient SessionsClient
PHP Not available Not available
Python SessionsClient SessionsClient
Ruby Not available Not available