Gemini Enterprise for Customer Experience v1 API - Class Agent (1.0.0-beta01)

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.

Inheritance

object > Agent

Namespace

Google.Cloud.Ces.V1

Assembly

Google.Cloud.Ces.V1.dll

Constructors

Agent()

public Agent()

Agent(Agent)

public Agent(Agent other)
Parameter
Name Description
other Agent

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.

Property Value
Type Description
RepeatedFieldCallback

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.

Property Value
Type Description
RepeatedFieldCallback

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.

Property Value
Type Description
RepeatedFieldCallback

AgentName

public AgentName AgentName { get; set; }

AgentName-typed view over the Name resource name property.

Property Value
Type Description
AgentName

AgentTypeCase

public Agent.AgentTypeOneofCase AgentTypeCase { get; }
Property Value
Type Description
AgentAgentTypeOneofCase

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.

Property Value
Type Description
RepeatedFieldCallback

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.

Property Value
Type Description
RepeatedFieldCallback

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.

Property Value
Type Description
RepeatedFieldCallback

ChildAgents

public RepeatedField<string> ChildAgents { get; }

Optional. List of child agents in the agent tree. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

Property Value
Type Description
RepeatedFieldstring

ChildAgentsAsAgentNames

public ResourceNameList<AgentName> ChildAgentsAsAgentNames { get; }

AgentName-typed view over the ChildAgents resource name property.

Property Value
Type Description
ResourceNameListAgentName

CreateTime

public Timestamp CreateTime { get; set; }

Output only. Timestamp when the agent was created.

Property Value
Type Description
Timestamp

Description

public string Description { get; set; }

Optional. Human-readable description of the agent.

Property Value
Type Description
string

DisplayName

public string DisplayName { get; set; }

Required. Display name of the agent.

Property Value
Type Description
string

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.

Property Value
Type Description
string

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.

Property Value
Type Description
string

Guardrails

public RepeatedField<string> Guardrails { get; }

Optional. List of guardrails for the agent. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

Property Value
Type Description
RepeatedFieldstring

GuardrailsAsGuardrailNames

public ResourceNameList<GuardrailName> GuardrailsAsGuardrailNames { get; }

GuardrailName-typed view over the Guardrails resource name property.

Property Value
Type Description
ResourceNameListGuardrailName

Instruction

public string Instruction { get; set; }

Optional. Instructions for the LLM model to guide the agent's behavior.

Property Value
Type Description
string

LlmAgent

public Agent.Types.LlmAgent LlmAgent { get; set; }

Optional. The default agent type.

Property Value
Type Description
AgentTypesLlmAgent

ModelSettings

public ModelSettings ModelSettings { get; set; }

Optional. Configurations for the LLM model.

Property Value
Type Description
ModelSettings

Name

public string Name { get; set; }

Identifier. The unique identifier of the agent. Format: projects/{project}/locations/{location}/apps/{app}/agents/{agent}

Property Value
Type Description
string

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.

Property Value
Type Description
AgentTypesRemoteDialogflowAgent

Tools

public RepeatedField<string> Tools { get; }

Optional. List of available tools for the agent. Format: projects/{project}/locations/{location}/apps/{app}/tools/{tool}

Property Value
Type Description
RepeatedFieldstring

ToolsAsToolNames

public ResourceNameList<ToolName> ToolsAsToolNames { get; }

ToolName-typed view over the Tools resource name property.

Property Value
Type Description
ResourceNameListToolName

Toolsets

public RepeatedField<Agent.Types.AgentToolset> Toolsets { get; }

Optional. List of toolsets for the agent.

Property Value
Type Description
RepeatedFieldAgentTypesAgentToolset

TransferRules

public RepeatedField<TransferRule> TransferRules { get; }

Optional. Agent transfer rules. If multiple rules match, the first one in the list will be used.

Property Value
Type Description
RepeatedFieldTransferRule

UpdateTime

public Timestamp UpdateTime { get; set; }

Output only. Timestamp when the agent was last updated.

Property Value
Type Description
Timestamp