|
| 1 | +// Copyright 2026 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.aiplatform.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/cloud/aiplatform/v1/content.proto"; |
| 22 | +import "google/protobuf/duration.proto"; |
| 23 | +import "google/protobuf/struct.proto"; |
| 24 | +import "google/protobuf/timestamp.proto"; |
| 25 | + |
| 26 | +option csharp_namespace = "Google.Cloud.AIPlatform.V1"; |
| 27 | +option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; |
| 28 | +option java_multiple_files = true; |
| 29 | +option java_outer_classname = "SessionProto"; |
| 30 | +option java_package = "com.google.cloud.aiplatform.v1"; |
| 31 | +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; |
| 32 | +option ruby_package = "Google::Cloud::AIPlatform::V1"; |
| 33 | + |
| 34 | +// A session contains a set of actions between users and Vertex agents. |
| 35 | +message Session { |
| 36 | + option (google.api.resource) = { |
| 37 | + type: "aiplatform.googleapis.com/Session" |
| 38 | + pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}" |
| 39 | + plural: "sessions" |
| 40 | + singular: "session" |
| 41 | + }; |
| 42 | + |
| 43 | + // The expiration of the session. |
| 44 | + oneof expiration { |
| 45 | + // Optional. Timestamp of when this session is considered expired. |
| 46 | + // This is *always* provided on output, regardless of what was sent |
| 47 | + // on input. |
| 48 | + // The minimum value is 24 hours from the time of creation. |
| 49 | + google.protobuf.Timestamp expire_time = 13 |
| 50 | + [(google.api.field_behavior) = OPTIONAL]; |
| 51 | + |
| 52 | + // Optional. Input only. The TTL for this session. |
| 53 | + // The minimum value is 24 hours. |
| 54 | + google.protobuf.Duration ttl = 14 [ |
| 55 | + (google.api.field_behavior) = OPTIONAL, |
| 56 | + (google.api.field_behavior) = INPUT_ONLY |
| 57 | + ]; |
| 58 | + } |
| 59 | + |
| 60 | + // Identifier. The resource name of the session. |
| 61 | + // Format: |
| 62 | + // 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}'. |
| 63 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 64 | + |
| 65 | + // Output only. Timestamp when the session was created. |
| 66 | + google.protobuf.Timestamp create_time = 3 |
| 67 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 68 | + |
| 69 | + // Output only. Timestamp when the session was updated. |
| 70 | + google.protobuf.Timestamp update_time = 4 |
| 71 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 72 | + |
| 73 | + // Optional. The display name of the session. |
| 74 | + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 75 | + |
| 76 | + // The labels with user-defined metadata to organize your Sessions. |
| 77 | + // |
| 78 | + // Label keys and values can be no longer than 64 characters |
| 79 | + // (Unicode codepoints), can only contain lowercase letters, numeric |
| 80 | + // characters, underscores and dashes. International characters are allowed. |
| 81 | + // |
| 82 | + // See https://goo.gl/xmQnxf for more information and examples of labels. |
| 83 | + map<string, string> labels = 8; |
| 84 | + |
| 85 | + // Optional. Session specific memory which stores key conversation points. |
| 86 | + google.protobuf.Struct session_state = 10 |
| 87 | + [(google.api.field_behavior) = OPTIONAL]; |
| 88 | + |
| 89 | + // Required. Immutable. String id provided by the user |
| 90 | + string user_id = 12 [ |
| 91 | + (google.api.field_behavior) = IMMUTABLE, |
| 92 | + (google.api.field_behavior) = REQUIRED |
| 93 | + ]; |
| 94 | +} |
| 95 | + |
| 96 | +// An event represents a message from either the user or agent. |
| 97 | +message SessionEvent { |
| 98 | + option (google.api.resource) = { |
| 99 | + type: "aiplatform.googleapis.com/SessionEvent" |
| 100 | + pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}/events/{event}" |
| 101 | + plural: "sessionEvents" |
| 102 | + singular: "sessionEvent" |
| 103 | + }; |
| 104 | + |
| 105 | + // Identifier. The resource name of the event. |
| 106 | + // Format:`projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}/events/{event}`. |
| 107 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 108 | + |
| 109 | + // Required. The name of the agent that sent the event, or user. |
| 110 | + string author = 3 [(google.api.field_behavior) = REQUIRED]; |
| 111 | + |
| 112 | + // Optional. Content of the event provided by the author. |
| 113 | + Content content = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 114 | + |
| 115 | + // Required. The invocation id of the event, multiple events can have the same |
| 116 | + // invocation id. |
| 117 | + string invocation_id = 5 [(google.api.field_behavior) = REQUIRED]; |
| 118 | + |
| 119 | + // Optional. Actions executed by the agent. |
| 120 | + EventActions actions = 6 [(google.api.field_behavior) = OPTIONAL]; |
| 121 | + |
| 122 | + // Required. Timestamp when the event was created on client side. |
| 123 | + google.protobuf.Timestamp timestamp = 8 |
| 124 | + [(google.api.field_behavior) = REQUIRED]; |
| 125 | + |
| 126 | + // Optional. Error code if the response is an error. Code varies by model. |
| 127 | + string error_code = 9 [(google.api.field_behavior) = OPTIONAL]; |
| 128 | + |
| 129 | + // Optional. Error message if the response is an error. |
| 130 | + string error_message = 10 [(google.api.field_behavior) = OPTIONAL]; |
| 131 | + |
| 132 | + // Optional. Metadata relating to this event. |
| 133 | + EventMetadata event_metadata = 11 [(google.api.field_behavior) = OPTIONAL]; |
| 134 | +} |
| 135 | + |
| 136 | +// Metadata relating to a LLM response event. |
| 137 | +message EventMetadata { |
| 138 | + // Optional. Metadata returned to client when grounding is enabled. |
| 139 | + GroundingMetadata grounding_metadata = 1 |
| 140 | + [(google.api.field_behavior) = OPTIONAL]; |
| 141 | + |
| 142 | + // Optional. Indicates whether the text content is part of a unfinished text |
| 143 | + // stream. Only used for streaming mode and when the content is plain text. |
| 144 | + bool partial = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 145 | + |
| 146 | + // Optional. Indicates whether the response from the model is complete. |
| 147 | + // Only used for streaming mode. |
| 148 | + bool turn_complete = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 149 | + |
| 150 | + // Optional. Flag indicating that LLM was interrupted when generating the |
| 151 | + // content. Usually it's due to user interruption during a bidi streaming. |
| 152 | + bool interrupted = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 153 | + |
| 154 | + // Optional. Set of ids of the long running function calls. |
| 155 | + // Agent client will know from this field about which function call is long |
| 156 | + // running. Only valid for function call event. |
| 157 | + repeated string long_running_tool_ids = 5 |
| 158 | + [(google.api.field_behavior) = OPTIONAL]; |
| 159 | + |
| 160 | + // Optional. The branch of the event. |
| 161 | + // The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of |
| 162 | + // agent_2, and agent_2 is the parent of agent_3. |
| 163 | + // Branch is used when multiple child agents shouldn't see their siblings' |
| 164 | + // conversation history. |
| 165 | + string branch = 6 [(google.api.field_behavior) = OPTIONAL]; |
| 166 | + |
| 167 | + // The custom metadata of the LlmResponse. |
| 168 | + google.protobuf.Struct custom_metadata = 7; |
| 169 | + |
| 170 | + // Optional. Audio transcription of user input. |
| 171 | + Transcription input_transcription = 10 |
| 172 | + [(google.api.field_behavior) = OPTIONAL]; |
| 173 | + |
| 174 | + // Optional. Audio transcription of model output. |
| 175 | + Transcription output_transcription = 11 |
| 176 | + [(google.api.field_behavior) = OPTIONAL]; |
| 177 | +} |
| 178 | + |
| 179 | +// Actions are parts of events that are executed by the agent. |
| 180 | +message EventActions { |
| 181 | + // Optional. If true, it won't call model to summarize function response. |
| 182 | + // Only used for function_response event. |
| 183 | + bool skip_summarization = 1 [(google.api.field_behavior) = OPTIONAL]; |
| 184 | + |
| 185 | + // Optional. Indicates that the event is updating the state with the given |
| 186 | + // delta. |
| 187 | + google.protobuf.Struct state_delta = 2 |
| 188 | + [(google.api.field_behavior) = OPTIONAL]; |
| 189 | + |
| 190 | + // Optional. Indicates that the event is updating an artifact. key is the |
| 191 | + // filename, value is the version. |
| 192 | + map<string, int32> artifact_delta = 3 |
| 193 | + [(google.api.field_behavior) = OPTIONAL]; |
| 194 | + |
| 195 | + // Optional. The agent is escalating to a higher level agent. |
| 196 | + bool escalate = 6 [(google.api.field_behavior) = OPTIONAL]; |
| 197 | + |
| 198 | + // Optional. Will only be set by a tool response indicating tool request euc. |
| 199 | + // Struct key is the function call id since one function call response (from |
| 200 | + // model) could correspond to multiple function calls. Struct value is the |
| 201 | + // required auth config, which can be another struct. |
| 202 | + google.protobuf.Struct requested_auth_configs = 7 |
| 203 | + [(google.api.field_behavior) = OPTIONAL]; |
| 204 | + |
| 205 | + // Optional. If set, the event transfers to the specified agent. |
| 206 | + string transfer_agent = 8 [(google.api.field_behavior) = OPTIONAL]; |
| 207 | +} |
| 208 | + |
| 209 | +// Audio transcription in Server Content. |
| 210 | +message Transcription { |
| 211 | + // Optional. Transcription text. |
| 212 | + string text = 1 [(google.api.field_behavior) = OPTIONAL]; |
| 213 | + |
| 214 | + // Optional. The bool indicates the end of the transcription. |
| 215 | + bool finished = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 216 | +} |
0 commit comments