Resource: Session
External session proto definition.
| JSON representation |
|---|
{ "name": string, "displayName": string, "state": enum ( |
| Fields | |
|---|---|
name |
Immutable. Fully qualified name |
displayName |
Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session. |
state |
The state of the session. |
userPseudoId |
A unique identifier for tracking users. |
turns[] |
Turns. |
labels[] |
Optional. The labels for the session. Can be set as filter in ListSessionsRequest. |
startTime |
Output only. The time the session started. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Output only. The time the session finished. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
isPinned |
Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list. |
State
Enumeration of the state of the session.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
State is unspecified. |
IN_PROGRESS |
The session is currently open. |
Turn
Represents a turn, including a query from the user and a answer from service.
| JSON representation |
|---|
{ "query": { object ( |
| Fields | |
|---|---|
query |
Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn |
answer |
Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn. |
assistAnswer |
Output only. The resource name of the Assistant answer to the user query. Only set if an assist call (/assist API call) happened in this turn. Format: |
detailedAnswer |
Output only. In |
detailedAssistAnswer |
Output only. In |
queryConfig |
Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix "google." is reserved for Google-developed functionality. |
Query
Defines a user inputed query.
| JSON representation |
|---|
{ "queryId": string, "parts": [ { object ( |
| Fields | |
|---|---|
queryId |
Output only. Unique ID for the query. |
parts[] |
Query content parts. |
Union field content. Query content. content can be only one of the following: |
|
text |
Plain text. |
QueryPart
Represents a part or the whole of a content, used to represent a query. A query can be made up of multiple parts.
| JSON representation |
|---|
{ "mimeType": string, // Union field |
| Fields | |
|---|---|
mimeType |
Optional. The IANA standard MIME type of the data. See https://www.iana.org/assignments/media-types/media-types.xhtml. This field is optional. If not set, the default assumed MIME type is "text/plain" for the "data" field. |
Union field payload. The payload of the query part. payload can be only one of the following: |
|
text |
Text content. |
uiJsonPayload |
This field is expected to be a ui message in JSON format. As of Q1 2026, uiJsonPayload is only supported for A2UI messages. |
personReference |
Reference to a person. |
driveDocumentReference |
Reference to a Google Drive document. |
documentReference |
Other VAIS |
PersonReference
Represents a person reference.
| JSON representation |
|---|
{ "documentName": string, "personId": string, "email": string, "displayName": string, "displayPhotoUri": string, "destinationUri": string, "fileId": string } |
| Fields | |
|---|---|
documentName |
The full resource name of the person. Format: |
personId |
The person id of the person. |
email |
The email of the person. |
displayName |
The display name of the person. |
displayPhotoUri |
The display photo url of the person. |
destinationUri |
The destination uri of the person. |
fileId |
Output only. The file id of the person data stored in the session context files. |
DriveDocumentReference
Represents a Google Drive document reference.
| JSON representation |
|---|
{ "driveId": string, "documentName": string, "displayTitle": string, "destinationUri": string, "iconUri": string, "fileId": string } |
| Fields | |
|---|---|
driveId |
The Drive id of the document. |
documentName |
The full resource name of the document. Format: |
displayTitle |
The display title of the reference. |
destinationUri |
The destination uri of the reference. |
iconUri |
The icon uri of the Drive document reference. |
fileId |
Output only. The file id of the Drive document data stored in the session context files. |
DocumentReference
Represents a document reference.
| JSON representation |
|---|
{ "documentName": string, "displayTitle": string, "destinationUri": string, "iconUri": string, "fileId": string, "urlForConnector": string } |
| Fields | |
|---|---|
documentName |
The full resource name of the document. Format: |
displayTitle |
The display title of the reference. |
destinationUri |
The destination uri of the reference. |
iconUri |
The icon uri of the reference. |
fileId |
Output only. The file id of the document data stored in the session context files. |
urlForConnector |
Input only. The urlForConnector of the document returned by Federated Search. |
Methods |
|
|---|---|
|
Creates a Session. |
|
Deletes a Session. |
|
Gets a Session. |
|
Lists all Sessions by their parent DataStore. |
|
Updates a Session. |