- Resource: AssistantSession
- AssistantMessage
- AssistantChunk
- TypedPayload
- AssistantSessionState
- UserResponseSuggestions
- AssistantSessionArtifact
- SessionCheckpoint
- ActiveTurnInfo
- ActiveTurnInfo.Status
- Methods
Resource: AssistantSession
An assistant session represents a conversation between a user and the assistant agent.
| JSON representation |
|---|
{ "name": string, "requestor": string, "messages": [ { object ( |
| Fields | |
|---|---|
name |
Required. Identifier. The unique identifier of the session. Format: |
requestor |
Output only. The user who initiated the session. |
messages[] |
Optional. History of messages in the session. |
state |
Output only. The status of the assistant session. |
createTime |
Output only. The time the assistant session was created. 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: |
updateTime |
Output only. The time the assistant session was last updated. 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: |
userResponseSuggestions |
Output only. Suggested user responses from the assistant agent. |
displayName |
Optional. The display name of the assistant session. |
artifacts[] |
Output only. Document artifacts (e.g. generated TDDs in markdown) produced by the assistant in this session. Pointers only; the file content lives in the customer's Cloud Storage bucket. |
sessionCheckpoint |
Output only. Session checkpoint containing user intent and rolling history summary. |
activeTurn |
Output only. Attachment info for this session's currently running turn. Unset when no turn is running. |
touchedApps[] |
Output only. Apps this session has targeted or changed (project-scoped sessions only), for history tags. Format: |
AssistantMessage
A message in an assistant session.
| JSON representation |
|---|
{
"role": string,
"chunks": [
{
object ( |
| Fields | |
|---|---|
role |
Required. Role within the conversation "user" or "model". |
chunks[] |
Optional. Content of the message as chunks. |
eventTime |
Required. Timestamp when the message was sent or received. 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: |
attachedGcsUris[] |
Optional. Cloud Storage URIs for files uploaded by the user during this turn. This allows attachments to be persisted and rendered in the session history UI. Example: "gs://cxas-transient-uploads/uuid/prd.pdf" |
AssistantChunk
A chunk of data in an assistant message.
| JSON representation |
|---|
{
"createTime": string,
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"text": string,
"thought": string,
"payload": {
object
},
"typedPayload": {
object ( |
| Fields | |
|---|---|
createTime |
Optional. Timestamp when the chunk was created or emitted. 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: |
| Data in the chunk. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
text |
Optional. Text data. |
thought |
Optional. Thought generated by the model. |
payload |
Optional. Payload which contains structured responses like the quality report, agent version name, suggested responses etc. |
typedPayload |
Optional. Typed payload which contains structured responses. |
| End of mutually exclusive fields. | |
TypedPayload
Payload with a type. Used by the assistant history (AssistantChunk) and by the streaming typedPayload event; lives here because both assistant_service.proto and session_service.proto need it.
| JSON representation |
|---|
{ "displayName": string, "type": string, "value": { object }, "metadata": { object } } |
| Fields | |
|---|---|
displayName |
Required. The display name of the payload. |
type |
Required. The type of the payload. |
value |
Required. The value of the payload. |
metadata |
Optional. The metadata of the payload. |
AssistantSessionState
The status of the assistant session.
| Enums | |
|---|---|
ASSISTANT_SESSION_STATE_UNSPECIFIED |
The default value. This value is used if the status is not specified. |
PROCESSING |
The assistant agent is processing the request as a long running task. |
IDLE |
The assistant agent is idle and does not have any pending requests or response. |
PENDING_REVIEW |
The assistant agent is done processing a long running task and has a response ready for the user. |
UserResponseSuggestions
Suggested user responses from the assistant agent.
| JSON representation |
|---|
{ "suggestions": [ string ] } |
| Fields | |
|---|---|
suggestions[] |
Required. The assistant suggested user responses. These are suggestions for the user on how to interact with the assistant. |
AssistantSessionArtifact
A document artifact generated by the assistant within a session, stored as a file in the customer's Cloud Storage bucket.
| JSON representation |
|---|
{ "id": string, "displayName": string, "gcsUri": string, "mimeType": string, "createTime": string, "turnIndex": integer } |
| Fields | |
|---|---|
id |
Output only. The unique identifier of the artifact within the session. |
displayName |
Output only. The file name shown to the user, e.g. "hotel_booking_tdd.md". |
gcsUri |
Output only. The Cloud Storage object holding the artifact content. Example: "gs://{project}-agent-assist-artifacts/agent-assist-generated/1_tdd.md" |
mimeType |
Output only. The IANA media type of the artifact content, e.g. "text/markdown". |
createTime |
Output only. When the artifact was persisted. 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: |
turnIndex |
Output only. Index of the message in [AssistantSession.messages] whose turn produced the artifact, for placing the artifact chip when history is restored. |
SessionCheckpoint
Session checkpoint containing inferred user intent for session title and UI.
| JSON representation |
|---|
{ "userIntent": string } |
| Fields | |
|---|---|
userIntent |
Inferred user goal or topic for the session (e.g. "Building E-Commerce Support Agent"). |
ActiveTurnInfo
Live-attachment info for a session turn that is currently running, disconnected from its client, or parked for pickup by another server task.
| JSON representation |
|---|
{
"turnId": string,
"status": enum ( |
| Fields | |
|---|---|
turnId |
Identifies the turn; echoed by resume snapshots on the streaming API. |
status |
Current attachment status. |
startTime |
Output only. When the turn 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: |
lastProgressTime |
Output only. When the turn last persisted progress. 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: |
orphanDeadlineTime |
Output only. When the turn will be wound down if no client attaches. 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: |
ActiveTurnInfo.Status
How the running turn currently relates to clients and server tasks.
| Enums | |
|---|---|
STATUS_UNSPECIFIED |
Unspecified. |
RUNNING |
The turn is executing with at least one client attached. |
DISCONNECTED |
The turn is executing with no client attached. |
RESUMING |
The turn is parked for pickup: the next attach continues it. |
ABANDONED |
The turn's server lease has lapsed and no task is driving it; the next read seals it to a committed partial. Not attachable. |
Methods |
|
|---|---|
|
Cancels the assistant session's in-flight turn, if any: the explicit user stop for a turn running detached from any stream. |
|
Creates a new assistant session in the given app. |
|
Deletes the specified assistant session. |
|
Gets details of the specified assistant session. |
|
Lists all assistant sessions in the given app. |
|
Runs Arc, the AI assistant, for the specified assistant session in a streaming fashion. |