|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | +--- |
| 14 | +name: Agent |
| 15 | +description: Description |
| 16 | +base_url: projects/{{project}}/locations/{{location}}/apps/{{app}}/agents |
| 17 | +update_mask: true |
| 18 | +self_link: projects/{{project}}/locations/{{location}}/apps/{{app}}/agents/{{name}} |
| 19 | +create_url: projects/{{project}}/locations/{{location}}/apps/{{app}}/agents?agentId={{agent_id}} |
| 20 | +update_verb: PATCH |
| 21 | +id_format: projects/{{project}}/locations/{{location}}/apps/{{app}}/agents/{{name}} |
| 22 | +import_format: |
| 23 | + - projects/{{project}}/locations/{{location}}/apps/{{app}}/agents/{{name}} |
| 24 | +examples: |
| 25 | + - name: "ces_agent_basic" |
| 26 | + primary_resource_id: "ces_agent_basic" |
| 27 | + vars: |
| 28 | + agent_display_name: 'my-agent' |
| 29 | + app_display_name: 'my-app' |
| 30 | + agent_id: 'agent-id' |
| 31 | + app_id: 'app-id' |
| 32 | + child_agent_id: "child-agent-id" |
| 33 | + toolset_id: "toolset-id" |
| 34 | + - name: "ces_agent_remote_dialogflow_agent" |
| 35 | + primary_resource_id: "ces_agent_remote_dialogflow_agent" |
| 36 | + vars: |
| 37 | + agent_display_name: 'my-agent' |
| 38 | + app_display_name: 'my-app' |
| 39 | + agent_id: 'agent-id' |
| 40 | + app_id: 'app-id' |
| 41 | +parameters: |
| 42 | + - name: location |
| 43 | + type: String |
| 44 | + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. |
| 45 | + immutable: true |
| 46 | + url_param_only: true |
| 47 | + required: true |
| 48 | + - name: app |
| 49 | + type: String |
| 50 | + description: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. |
| 51 | + immutable: true |
| 52 | + url_param_only: true |
| 53 | + required: true |
| 54 | + - name: agentId |
| 55 | + type: String |
| 56 | + description: |- |
| 57 | + The ID to use for the agent, which will become the final component of |
| 58 | + the agent's resource name. If not provided, a unique ID will be |
| 59 | + automatically assigned for the agent. |
| 60 | + immutable: true |
| 61 | + url_param_only: true |
| 62 | +properties: |
| 63 | + - name: afterAgentCallbacks |
| 64 | + type: Array |
| 65 | + description: |- |
| 66 | + The callbacks to execute after the agent is called. |
| 67 | + The provided callbacks are executed sequentially in the exact order they |
| 68 | + are given in the list. If a callback returns an overridden response, |
| 69 | + execution stops and any remaining callbacks are skipped. |
| 70 | + item_type: |
| 71 | + type: NestedObject |
| 72 | + properties: |
| 73 | + - name: description |
| 74 | + type: String |
| 75 | + description: Human-readable description of the callback. |
| 76 | + - name: disabled |
| 77 | + type: Boolean |
| 78 | + description: |- |
| 79 | + Whether the callback is disabled. Disabled callbacks are ignored by the |
| 80 | + agent. |
| 81 | + - name: pythonCode |
| 82 | + type: String |
| 83 | + description: The python code to execute for the callback. |
| 84 | + required: true |
| 85 | + - name: afterModelCallbacks |
| 86 | + type: Array |
| 87 | + description: |- |
| 88 | + The callbacks to execute after the model is called. If there are multiple |
| 89 | + calls to the model, the callback will be executed multiple times. |
| 90 | + The provided callbacks are executed sequentially in the exact order they |
| 91 | + are given in the list. If a callback returns an overridden response, |
| 92 | + execution stops and any remaining callbacks are skipped. |
| 93 | + item_type: |
| 94 | + type: NestedObject |
| 95 | + properties: |
| 96 | + - name: description |
| 97 | + type: String |
| 98 | + description: Human-readable description of the callback. |
| 99 | + - name: disabled |
| 100 | + type: Boolean |
| 101 | + description: |- |
| 102 | + Whether the callback is disabled. Disabled callbacks are ignored by the |
| 103 | + agent. |
| 104 | + - name: pythonCode |
| 105 | + type: String |
| 106 | + description: The python code to execute for the callback. |
| 107 | + required: true |
| 108 | + - name: afterToolCallbacks |
| 109 | + type: Array |
| 110 | + description: |- |
| 111 | + The callbacks to execute after the tool is invoked. If there are multiple |
| 112 | + tool invocations, the callback will be executed multiple times. |
| 113 | + The provided callbacks are executed sequentially in the exact order they |
| 114 | + are given in the list. If a callback returns an overridden response, |
| 115 | + execution stops and any remaining callbacks are skipped. |
| 116 | + item_type: |
| 117 | + type: NestedObject |
| 118 | + properties: |
| 119 | + - name: description |
| 120 | + type: String |
| 121 | + description: Human-readable description of the callback. |
| 122 | + - name: disabled |
| 123 | + type: Boolean |
| 124 | + description: |- |
| 125 | + Whether the callback is disabled. Disabled callbacks are ignored by the |
| 126 | + agent. |
| 127 | + - name: pythonCode |
| 128 | + type: String |
| 129 | + description: The python code to execute for the callback. |
| 130 | + required: true |
| 131 | + - name: beforeAgentCallbacks |
| 132 | + type: Array |
| 133 | + description: |- |
| 134 | + The callbacks to execute before the agent is called. |
| 135 | + The provided callbacks are executed sequentially in the exact order they |
| 136 | + are given in the list. If a callback returns an overridden response, |
| 137 | + execution stops and any remaining callbacks are skipped. |
| 138 | + item_type: |
| 139 | + type: NestedObject |
| 140 | + properties: |
| 141 | + - name: description |
| 142 | + type: String |
| 143 | + description: Human-readable description of the callback. |
| 144 | + - name: disabled |
| 145 | + type: Boolean |
| 146 | + description: |- |
| 147 | + Whether the callback is disabled. Disabled callbacks are ignored by the |
| 148 | + agent. |
| 149 | + - name: pythonCode |
| 150 | + type: String |
| 151 | + description: The python code to execute for the callback. |
| 152 | + required: true |
| 153 | + - name: beforeModelCallbacks |
| 154 | + type: Array |
| 155 | + description: |- |
| 156 | + The callbacks to execute before the model is called. If there are multiple |
| 157 | + calls to the model, the callback will be executed multiple times. |
| 158 | + The provided callbacks are executed sequentially in the exact order they |
| 159 | + are given in the list. If a callback returns an overridden response, |
| 160 | + execution stops and any remaining callbacks are skipped. |
| 161 | + item_type: |
| 162 | + type: NestedObject |
| 163 | + properties: |
| 164 | + - name: description |
| 165 | + type: String |
| 166 | + description: Human-readable description of the callback. |
| 167 | + - name: disabled |
| 168 | + type: Boolean |
| 169 | + description: |- |
| 170 | + Whether the callback is disabled. Disabled callbacks are ignored by the |
| 171 | + agent. |
| 172 | + - name: pythonCode |
| 173 | + type: String |
| 174 | + description: The python code to execute for the callback. |
| 175 | + required: true |
| 176 | + - name: beforeToolCallbacks |
| 177 | + type: Array |
| 178 | + description: |- |
| 179 | + The callbacks to execute before the tool is invoked. If there are multiple |
| 180 | + tool invocations, the callback will be executed multiple times. |
| 181 | + The provided callbacks are executed sequentially in the exact order they |
| 182 | + are given in the list. If a callback returns an overridden response, |
| 183 | + execution stops and any remaining callbacks are skipped. |
| 184 | + item_type: |
| 185 | + type: NestedObject |
| 186 | + properties: |
| 187 | + - name: description |
| 188 | + type: String |
| 189 | + description: Human-readable description of the callback. |
| 190 | + - name: disabled |
| 191 | + type: Boolean |
| 192 | + description: |- |
| 193 | + Whether the callback is disabled. Disabled callbacks are ignored by the |
| 194 | + agent. |
| 195 | + - name: pythonCode |
| 196 | + type: String |
| 197 | + description: The python code to execute for the callback. |
| 198 | + required: true |
| 199 | + - name: childAgents |
| 200 | + type: Array |
| 201 | + description: |- |
| 202 | + List of child agents in the agent tree. |
| 203 | + Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` |
| 204 | + item_type: |
| 205 | + type: String |
| 206 | + - name: createTime |
| 207 | + type: String |
| 208 | + description: Timestamp when the agent was created. |
| 209 | + output: true |
| 210 | + - name: description |
| 211 | + type: String |
| 212 | + description: Human-readable description of the agent. |
| 213 | + - name: displayName |
| 214 | + type: String |
| 215 | + description: Display name of the agent. |
| 216 | + required: true |
| 217 | + - name: etag |
| 218 | + type: String |
| 219 | + description: |- |
| 220 | + Etag used to ensure the object hasn't changed during a read-modify-write |
| 221 | + operation. If the etag is empty, the update will overwrite any concurrent |
| 222 | + changes. |
| 223 | + output: true |
| 224 | + - name: generatedSummary |
| 225 | + type: String |
| 226 | + description: |- |
| 227 | + If the agent is generated by the LLM assistant, this field contains a |
| 228 | + descriptive summary of the generation. |
| 229 | + output: true |
| 230 | + - name: guardrails |
| 231 | + type: Array |
| 232 | + description: |- |
| 233 | + List of guardrails for the agent. |
| 234 | + Format: |
| 235 | + `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` |
| 236 | + item_type: |
| 237 | + type: String |
| 238 | + - name: instruction |
| 239 | + type: String |
| 240 | + description: Instructions for the LLM model to guide the agent's behavior. |
| 241 | + - name: modelSettings |
| 242 | + type: NestedObject |
| 243 | + description: Model settings contains various configurations for the LLM model. |
| 244 | + properties: |
| 245 | + - name: model |
| 246 | + type: String |
| 247 | + description: |- |
| 248 | + The LLM model that the agent should use. |
| 249 | + If not set, the agent will inherit the model from its parent agent. |
| 250 | + - name: temperature |
| 251 | + type: Double |
| 252 | + description: |- |
| 253 | + If set, this temperature will be used for the LLM model. Temperature |
| 254 | + controls the randomness of the model's responses. Lower temperatures |
| 255 | + produce responses that are more predictable. Higher temperatures produce |
| 256 | + responses that are more creative. |
| 257 | + - name: name |
| 258 | + type: String |
| 259 | + description: |- |
| 260 | + Identifier. The unique identifier of the agent. |
| 261 | + Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` |
| 262 | + output: true |
| 263 | + custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.tmpl' |
| 264 | + - name: llmAgent |
| 265 | + type: NestedObject |
| 266 | + description: |- |
| 267 | + Default agent type. The agent uses instructions and callbacks specified in |
| 268 | + the agent to perform the task using a large language model. |
| 269 | + allow_empty_object: true |
| 270 | + send_empty_value: true |
| 271 | + properties: |
| 272 | + [] |
| 273 | + - name: remoteDialogflowAgent |
| 274 | + type: NestedObject |
| 275 | + description: |- |
| 276 | + The agent which will transfer execution to an existing remote |
| 277 | + [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) |
| 278 | + agent flow. The corresponding Dialogflow agent will process subsequent user |
| 279 | + queries until the session ends or flow ends and the control is transferred |
| 280 | + back to the parent CES agent. |
| 281 | + properties: |
| 282 | + - name: agent |
| 283 | + type: String |
| 284 | + description: |- |
| 285 | + The |
| 286 | + [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents |
| 287 | + agent resource name. |
| 288 | + Format: `projects/{project}/locations/{location}/agents/{agent}` |
| 289 | + required: true |
| 290 | + - name: environmentId |
| 291 | + type: String |
| 292 | + description: |- |
| 293 | + The environment ID of the Dialogflow agent be used for the agent |
| 294 | + execution. If not specified, the draft environment will be used. |
| 295 | + - name: flowId |
| 296 | + type: String |
| 297 | + description: The flow ID of the flow in the Dialogflow agent. |
| 298 | + required: true |
| 299 | + - name: inputVariableMapping |
| 300 | + type: KeyValuePairs |
| 301 | + description: |- |
| 302 | + The mapping of the app variables names to the Dialogflow session |
| 303 | + parameters names to be sent to the Dialogflow agent as input. |
| 304 | + - name: outputVariableMapping |
| 305 | + type: KeyValuePairs |
| 306 | + description: |- |
| 307 | + The mapping of the Dialogflow session parameters names to the app |
| 308 | + variables names to be sent back to the CES agent after the Dialogflow |
| 309 | + agent execution ends. |
| 310 | + - name: tools |
| 311 | + type: Array |
| 312 | + description: |- |
| 313 | + List of available tools for the agent. |
| 314 | + Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` |
| 315 | + item_type: |
| 316 | + type: String |
| 317 | + - name: toolsets |
| 318 | + type: Array |
| 319 | + description: List of toolsets for the agent. |
| 320 | + item_type: |
| 321 | + type: NestedObject |
| 322 | + properties: |
| 323 | + - name: toolset |
| 324 | + type: String |
| 325 | + description: |- |
| 326 | + The resource name of the toolset. |
| 327 | + Format: |
| 328 | + `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}` |
| 329 | + required: true |
| 330 | + - name: toolIds |
| 331 | + type: Array |
| 332 | + description: The tools IDs to filter the toolset. |
| 333 | + item_type: |
| 334 | + type: String |
| 335 | + - name: updateTime |
| 336 | + type: String |
| 337 | + description: Timestamp when the agent was last updated. |
| 338 | + output: true |
0 commit comments