public sealed class Agent : IMessage<Agent>, IEquatable<Agent>, IDeepCloneable<Agent>, IBufferMessage, IMessage
Reference documentation and code samples for the Gemini Enterprise for Customer Experience v1 API class Agent.
An agent acts as the fundamental building block that provides instructions to the Large Language Model (LLM) for executing specific tasks.
Namespace
Google.Cloud.Ces.V1Assembly
Google.Cloud.Ces.V1.dll
Constructors
Agent()
public Agent()
Agent(Agent)
public Agent(Agent other)
Properties
AfterAgentCallbacks
public RepeatedField<Callback> AfterAgentCallbacks { get; }
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.
AfterModelCallbacks
public RepeatedField<Callback> AfterModelCallbacks { get; }
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.
AfterToolCallbacks
public RepeatedField<Callback> AfterToolCallbacks { get; }
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.
AgentName
public AgentName AgentName { get; set; }
AgentTypeCase
public Agent.AgentTypeOneofCase AgentTypeCase { get; }
BeforeAgentCallbacks
public RepeatedField<Callback> BeforeAgentCallbacks { get; }
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.
BeforeModelCallbacks
public RepeatedField<Callback> BeforeModelCallbacks { get; }
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.
BeforeToolCallbacks
public RepeatedField<Callback> BeforeToolCallbacks { get; }
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.
ChildAgents
public RepeatedField<string> ChildAgents { get; }
Optional. List of child agents in the agent tree.
Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}
ChildAgentsAsAgentNames
public ResourceNameList<AgentName> ChildAgentsAsAgentNames { get; }
AgentName -typed view over the ChildAgents resource name property.
CreateTime
public Timestamp CreateTime { get; set; }
Output only. Timestamp when the agent was created.
Description
public string Description { get; set; }
Optional. Human-readable description of the agent.
DisplayName
public string DisplayName { get; set; }
Required. Display name of the agent.
Etag
public string Etag { get; set; }
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.
GeneratedSummary
public string GeneratedSummary { get; set; }
Output only. If the agent is generated by the LLM assistant, this field contains a descriptive summary of the generation.
Guardrails
public RepeatedField<string> Guardrails { get; }
Optional. List of guardrails for the agent.
Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
GuardrailsAsGuardrailNames
public ResourceNameList<GuardrailName> GuardrailsAsGuardrailNames { get; }
GuardrailName -typed view over the Guardrails resource name property.
Instruction
public string Instruction { get; set; }
Optional. Instructions for the LLM model to guide the agent's behavior.
LlmAgent
public Agent.Types.LlmAgent LlmAgent { get; set; }
Optional. The default agent type.
ModelSettings
public ModelSettings ModelSettings { get; set; }
Optional. Configurations for the LLM model.
Name
public string Name { get; set; }
Identifier. The unique identifier of the agent.
Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}
RemoteDialogflowAgent
public Agent.Types.RemoteDialogflowAgent RemoteDialogflowAgent { get; set; }
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 roles/dialogflow.client
to the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com
.
Tools
public RepeatedField<string> Tools { get; }
Optional. List of available tools for the agent.
Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}
ToolsAsToolNames
public ResourceNameList<ToolName> ToolsAsToolNames { get; }
Toolsets
public RepeatedField<Agent.Types.AgentToolset> Toolsets { get; }
Optional. List of toolsets for the agent.
TransferRules
public RepeatedField<TransferRule> TransferRules { get; }
Optional. Agent transfer rules. If multiple rules match, the first one in the list will be used.
UpdateTime
public Timestamp UpdateTime { get; set; }
Output only. Timestamp when the agent was last updated.

