Resource: Agent
An agent acts as the fundamental building block that provides instructions to the Large Language Model (LLM) for executing specific tasks.
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "modelSettings": { object ( |
| Fields | |
|---|---|
name |
Identifier. The unique identifier of the agent. Format: |
displayName |
Required. Display name of the agent. |
description |
Optional. Human-readable description of the agent. |
modelSettings |
Optional. Configurations for the LLM model. |
instruction |
Optional. Instructions for the LLM model to guide the agent's behavior. |
tools[] |
Optional. List of available tools for the agent. Format: |
childAgents[] |
Optional. List of child agents in the agent tree. Format: |
beforeAgentCallbacks[] |
Optional. The callbacks to execute before the agent is called. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
afterAgentCallbacks[] |
Optional. The callbacks to execute after the agent is called. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
beforeModelCallbacks[] |
Optional. The callbacks to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
afterModelCallbacks[] |
Optional. The callbacks to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
beforeToolCallbacks[] |
Optional. The callbacks to execute before the tool is invoked. If there are multiple tool invocations, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
afterToolCallbacks[] |
Optional. The callbacks to execute after the tool is invoked. If there are multiple tool invocations, the callback will be executed multiple times. The provided callbacks are executed sequentially in the exact order they are given in the list. If a callback returns an overridden response, execution stops and any remaining callbacks are skipped. |
createTime |
Output only. Timestamp when the agent 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. Timestamp when the agent 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: |
guardrails[] |
Optional. List of guardrails for the agent. Format: |
etag |
Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. |
toolsets[] |
Optional. List of toolsets for the agent. |
generatedSummary |
Output only. If the agent is generated by the LLM assistant, this field contains a descriptive summary of the generation. |
Union field agent_type. The type of agent. agent_type can be only one of the following: |
|
llmAgent |
Optional. The default agent type. |
remoteDialogflowAgent |
Optional. The remote Dialogflow agent to be used for the agent execution. If this field is set, all other agent level properties will be ignored. Note: If the Dialogflow agent is in a different project from the app, you should grant |
Agent.LlmAgent
This type has no fields.
Default agent type. The agent uses instructions and callbacks specified in the agent to perform the task using a large language model.
Agent.RemoteDialogflowAgent
The agent which will transfer execution to a remote Dialogflow agent flow. The Dialogflow agent will process subsequent user queries until the session ends or flow ends, and the control is transferred back to the parent CES agent.
| JSON representation |
|---|
{ "agent": string, "flowId": string, "environmentId": string, "inputVariableMapping": { string: string, ... }, "outputVariableMapping": { string: string, ... } } |
| Fields | |
|---|---|
agent |
Required. The [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents agent resource name. Format: |
flowId |
Required. The flow ID of the flow in the Dialogflow agent. |
environmentId |
Optional. The environment ID of the Dialogflow agent to be used for the agent execution. If not specified, the draft environment will be used. |
inputVariableMapping |
Optional. The mapping of the app variables names to the Dialogflow session parameters names to be sent to the Dialogflow agent as input. An object containing a list of |
outputVariableMapping |
Optional. The mapping of the Dialogflow session parameters names to the app variables names to be sent back to the CES agent after the Dialogflow agent execution ends. An object containing a list of |
Agent.AgentToolset
A toolset with a selection of its tools.
| JSON representation |
|---|
{ "toolset": string, "toolIds": [ string ] } |
| Fields | |
|---|---|
toolset |
Required. The resource name of the toolset. Format: |
toolIds[] |
Optional. The tools IDs to filter the toolset. |
Methods |
|
|---|---|
|
Creates a new agent in the given app. |
|
Deletes the specified agent. |
|
Gets details of the specified agent. |
|
Lists agents in the given app. |
|
Updates the specified agent. |