An event represents a message from either the user or agent.
namestring
Identifier. The resource name of the event. Format:projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}/sessions/{session}/events/{event}.
Optional. Content of the event provided by the author.
invocationIdstring
Required. The invocation id of the event, multiple events can have the same invocation id.
Optional. Actions executed by the agent.
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".
errorCodestring
Optional. Error code if the response is an error. code varies by model.
errorMessagestring
Optional. Error message if the response is an error.
Optional. metadata relating to this event.
| JSON representation |
|---|
{ "name": string, "author": string, "content": { object ( |
EventActions
Actions are parts of events that are executed by the agent.
skipSummarizationboolean
Optional. If true, it won't call model to summarize function response. Only used for functionResponse event.
Optional. Indicates that the event is updating the state with the given delta.
artifactDeltamap (key: string, value: integer)
Optional. Indicates that the event is updating an artifact. key is the filename, value is the version.
escalateboolean
Optional. The agent is escalating to a higher level agent.
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.
transferAgentstring
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.
Optional. metadata returned to client when grounding is enabled.
partialboolean
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.
turnCompleteboolean
Optional. Indicates whether the response from the model is complete. Only used for streaming mode.
interruptedboolean
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.
branchstring
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.
The custom metadata of the LlmResponse.
| JSON representation |
|---|
{
"groundingMetadata": {
object ( |
GroundingMetadata
metadata returned to client when grounding is enabled.
webSearchQueries[]string
Optional. Web search queries for the following-up web search.
retrievalQueries[]string
Optional. Queries executed by the retrieval tools.
List of supporting references retrieved from specified grounding source.
Optional. List of grounding support.
Optional. Output only. List of source flagging uris. This is currently populated only for Google Maps grounding.
Optional. Google search entry for the following-up web searches.
Optional. Output only. Retrieval metadata.
googleMapsWidgetContextTokenstring
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 ( |
SearchEntryPoint
Google search entry point.
renderedContentstring
Optional. Web content snippet that can be embedded in a web page or an app webview.
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.
chunk_typeUnion type
chunk_type can be only one of the following:Grounding chunk from the web.
Grounding chunk from context retrieved by the retrieval tools.
Grounding chunk from Google Maps.
| JSON representation |
|---|
{ // chunk_type "web": { object ( |
Web
Chunk from the web.
uristring
URI reference of the chunk.
titlestring
title of the chunk.
domainstring
domain of the (original) URI.
| JSON representation |
|---|
{ "uri": string, "title": string, "domain": string } |
RetrievedContext
Chunk from context retrieved by the retrieval tools.
context_detailsUnion type
context_details can be only one of the following:Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool.
uristring
URI reference of the attribution.
titlestring
title of the attribution.
textstring
Text of the attribution.
documentNamestring
Output only. The full document name for the referenced Vertex AI Search document.
| JSON representation |
|---|
{
// context_details
"ragChunk": {
object ( |
Maps
Chunk from Google Maps.
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.
uristring
URI reference of the place.
titlestring
title of the place.
textstring
Text of the place answer.
placeIdstring
This Place's resource name, in places/{placeId} format. Can be used to look up the Place.
| JSON representation |
|---|
{
"placeAnswerSources": {
object ( |
PlaceAnswerSources
Sources used to generate the place answer.
Snippets of reviews that are used to generate the answer.
| JSON representation |
|---|
{
"reviewSnippets": [
{
object ( |
ReviewSnippet
Encapsulates a review snippet.
reviewIdstring
id of the review referencing the place.
googleMapsUristring
A link to show the review on Google Maps.
titlestring
title of the review.
| JSON representation |
|---|
{ "reviewId": string, "googleMapsUri": string, "title": string } |
GroundingSupport
Grounding support.
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 of the content this support belongs to.
| JSON representation |
|---|
{
"groundingChunkIndices": [
integer
],
"confidenceScores": [
number
],
"segment": {
object ( |
Segment
Segment of the content.
partIndexinteger
Output only. The index of a Part object within its parent Content object.
startIndexinteger
Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.
endIndexinteger
Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.
textstring
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.
googleSearchDynamicRetrievalScorenumber
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.
sourceIdstring
id of the place or review.
flagContentUristring
A link where users can flag a problem with the source (place or review).
| JSON representation |
|---|
{ "sourceId": string, "flagContentUri": string } |