SessionEvent

An event represents a message from either the user or agent.

Fields
name string

Identifier. The resource name of the event. Format:projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}/sessions/{session}/events/{event}.

author string

Required. The name of the agent that sent the event, or user.

content object (Content)

Optional. Content of the event provided by the author.

invocationId string

Required. The invocation id of the event, multiple events can have the same invocation id.

actions object (EventActions)

Optional. Actions executed by the agent.

timestamp string (Timestamp format)

Required. timestamp when the event was created on client side.

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

errorCode string

Optional. Error code if the response is an error. code varies by model.

errorMessage string

Optional. Error message if the response is an error.

eventMetadata object (EventMetadata)

Optional. metadata relating to this event.

JSON representation
{
  "name": string,
  "author": string,
  "content": {
    object (Content)
  },
  "invocationId": string,
  "actions": {
    object (EventActions)
  },
  "timestamp": string,
  "errorCode": string,
  "errorMessage": string,
  "eventMetadata": {
    object (EventMetadata)
  }
}

EventActions

Actions are parts of events that are executed by the agent.

Fields
skipSummarization boolean

Optional. If true, it won't call model to summarize function response. Only used for functionResponse event.

stateDelta object (Struct format)

Optional. Indicates that the event is updating the state with the given delta.

artifactDelta map (key: string, value: integer)

Optional. Indicates that the event is updating an artifact. key is the filename, value is the version.

escalate boolean

Optional. The agent is escalating to a higher level agent.

requestedAuthConfigs object (Struct format)

Optional. Will only be set by a tool response indicating tool request euc. Struct key is the function call id since one function call response (from model) could correspond to multiple function calls. Struct value is the required auth config, which can be another struct.

transferAgent string

Optional. If set, the event transfers to the specified agent.

JSON representation
{
  "skipSummarization": boolean,
  "stateDelta": {
    object
  },
  "artifactDelta": {
    string: integer,
    ...
  },
  "escalate": boolean,
  "requestedAuthConfigs": {
    object
  },
  "transferAgent": string
}

EventMetadata

metadata relating to a LLM response event.

Fields
groundingMetadata object (GroundingMetadata)

Optional. metadata returned to client when grounding is enabled.

partial boolean

Optional. Indicates whether the text content is part of a unfinished text stream. Only used for streaming mode and when the content is plain text.

turnComplete boolean

Optional. Indicates whether the response from the model is complete. Only used for streaming mode.

interrupted boolean

Optional. Flag indicating that LLM was interrupted when generating the content. Usually it's due to user interruption during a bidi streaming.

longRunningToolIds[] string

Optional. Set of ids of the long running function calls. Agent client will know from this field about which function call is long running. Only valid for function call event.

branch string

Optional. The branch of the event. The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of agent_2, and agent_2 is the parent of agent_3. Branch is used when multiple child agents shouldn't see their siblings' conversation history.

customMetadata object (Struct format)

The custom metadata of the LlmResponse.

JSON representation
{
  "groundingMetadata": {
    object (GroundingMetadata)
  },
  "partial": boolean,
  "turnComplete": boolean,
  "interrupted": boolean,
  "longRunningToolIds": [
    string
  ],
  "branch": string,
  "customMetadata": {
    object
  }
}

GroundingMetadata

metadata returned to client when grounding is enabled.

Fields
webSearchQueries[] string

Optional. Web search queries for the following-up web search.

retrievalQueries[] string

Optional. Queries executed by the retrieval tools.

groundingChunks[] object (GroundingChunk)

List of supporting references retrieved from specified grounding source.

groundingSupports[] object (GroundingSupport)

Optional. List of grounding support.

sourceFlaggingUris[] object (SourceFlaggingUri)

Optional. Output only. List of source flagging uris. This is currently populated only for Google Maps grounding.

searchEntryPoint object (SearchEntryPoint)

Optional. Google search entry for the following-up web searches.

retrievalMetadata object (RetrievalMetadata)

Optional. Output only. Retrieval metadata.

googleMapsWidgetContextToken string

Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding.

JSON representation
{
  "webSearchQueries": [
    string
  ],
  "retrievalQueries": [
    string
  ],
  "groundingChunks": [
    {
      object (GroundingChunk)
    }
  ],
  "groundingSupports": [
    {
      object (GroundingSupport)
    }
  ],
  "sourceFlaggingUris": [
    {
      object (SourceFlaggingUri)
    }
  ],
  "searchEntryPoint": {
    object (SearchEntryPoint)
  },
  "retrievalMetadata": {
    object (RetrievalMetadata)
  },
  "googleMapsWidgetContextToken": string
}

SearchEntryPoint

Google search entry point.

Fields
renderedContent string

Optional. Web content snippet that can be embedded in a web page or an app webview.

sdkBlob string (bytes format)

Optional. Base64 encoded JSON representing array of <search term, search url> tuple.

A base64-encoded string.

JSON representation
{
  "renderedContent": string,
  "sdkBlob": string
}

GroundingChunk

Grounding chunk.

Fields
chunk_type Union type
Chunk type. chunk_type can be only one of the following:
web object (Web)

Grounding chunk from the web.

retrievedContext object (RetrievedContext)

Grounding chunk from context retrieved by the retrieval tools.

maps object (Maps)

Grounding chunk from Google Maps.

JSON representation
{

  // chunk_type
  "web": {
    object (Web)
  },
  "retrievedContext": {
    object (RetrievedContext)
  },
  "maps": {
    object (Maps)
  }
  // Union type
}

Web

Chunk from the web.

Fields
uri string

URI reference of the chunk.

title string

title of the chunk.

domain string

domain of the (original) URI.

JSON representation
{
  "uri": string,
  "title": string,
  "domain": string
}

RetrievedContext

Chunk from context retrieved by the retrieval tools.

Fields
context_details Union type
Tool-specific details about the retrieved context. context_details can be only one of the following:
ragChunk object (RagChunk)

Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool.

uri string

URI reference of the attribution.

title string

title of the attribution.

text string

Text of the attribution.

documentName string

Output only. The full document name for the referenced Vertex AI Search document.

JSON representation
{

  // context_details
  "ragChunk": {
    object (RagChunk)
  }
  // Union type
  "uri": string,
  "title": string,
  "text": string,
  "documentName": string
}

Maps

Chunk from Google Maps.

Fields
placeAnswerSources object (PlaceAnswerSources)

Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content.

uri string

URI reference of the place.

title string

title of the place.

text string

Text of the place answer.

placeId string

This Place's resource name, in places/{placeId} format. Can be used to look up the Place.

JSON representation
{
  "placeAnswerSources": {
    object (PlaceAnswerSources)
  },
  "uri": string,
  "title": string,
  "text": string,
  "placeId": string
}

PlaceAnswerSources

Sources used to generate the place answer.

Fields
reviewSnippets[] object (ReviewSnippet)

Snippets of reviews that are used to generate the answer.

JSON representation
{
  "reviewSnippets": [
    {
      object (ReviewSnippet)
    }
  ]
}

ReviewSnippet

Encapsulates a review snippet.

Fields
reviewId string

id of the review referencing the place.

googleMapsUri string

A link to show the review on Google Maps.

title string

title of the review.

JSON representation
{
  "reviewId": string,
  "googleMapsUri": string,
  "title": string
}

GroundingSupport

Grounding support.

Fields
groundingChunkIndices[] integer

A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.

confidenceScores[] number

confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. For Gemini 2.0 and before, this list must have the same size as the groundingChunkIndices. For Gemini 2.5 and after, this list will be empty and should be ignored.

segment object (Segment)

Segment of the content this support belongs to.

JSON representation
{
  "groundingChunkIndices": [
    integer
  ],
  "confidenceScores": [
    number
  ],
  "segment": {
    object (Segment)
  }
}

Segment

Segment of the content.

Fields
partIndex integer

Output only. The index of a Part object within its parent Content object.

startIndex integer

Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.

endIndex integer

Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.

text string

Output only. The text corresponding to the segment from the response.

JSON representation
{
  "partIndex": integer,
  "startIndex": integer,
  "endIndex": integer,
  "text": string
}

RetrievalMetadata

metadata related to retrieval in the grounding flow.

Fields
googleSearchDynamicRetrievalScore number

Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.

JSON representation
{
  "googleSearchDynamicRetrievalScore": number
}

SourceFlaggingUri

Source content flagging uri for a place or review. This is currently populated only for Google Maps grounding.

Fields
sourceId string

id of the place or review.

flagContentUri string

A link where users can flag a problem with the source (place or review).

JSON representation
{
  "sourceId": string,
  "flagContentUri": string
}