Class AgentConfig.Builder (3.100.0)

public static final class AgentConfig.Builder extends GeneratedMessage.Builder<AgentConfig.Builder> implements AgentConfigOrBuilder

Represents configuration for an Agent.

Protobuf type google.cloud.aiplatform.v1beta1.AgentConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllSubAgents(Iterable<String> values)

public AgentConfig.Builder addAllSubAgents(Iterable<String> values)

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The subAgents to add.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

addAllTools(Iterable<? extends Tool> values)

public AgentConfig.Builder addAllTools(Iterable<? extends Tool> values)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.aiplatform.v1beta1.Tool>
Returns
Type Description
AgentConfig.Builder

addSubAgents(String value)

public AgentConfig.Builder addSubAgents(String value)

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The subAgents to add.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

addSubAgentsBytes(ByteString value)

public AgentConfig.Builder addSubAgentsBytes(ByteString value)

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the subAgents to add.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

addTools(Tool value)

public AgentConfig.Builder addTools(Tool value)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Tool
Returns
Type Description
AgentConfig.Builder

addTools(Tool.Builder builderForValue)

public AgentConfig.Builder addTools(Tool.Builder builderForValue)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Tool.Builder
Returns
Type Description
AgentConfig.Builder

addTools(int index, Tool value)

public AgentConfig.Builder addTools(int index, Tool value)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Tool
Returns
Type Description
AgentConfig.Builder

addTools(int index, Tool.Builder builderForValue)

public AgentConfig.Builder addTools(int index, Tool.Builder builderForValue)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Tool.Builder
Returns
Type Description
AgentConfig.Builder

addToolsBuilder()

public Tool.Builder addToolsBuilder()

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Tool.Builder

addToolsBuilder(int index)

public Tool.Builder addToolsBuilder(int index)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Tool.Builder

build()

public AgentConfig build()
Returns
Type Description
AgentConfig

buildPartial()

public AgentConfig buildPartial()
Returns
Type Description
AgentConfig

clear()

public AgentConfig.Builder clear()
Returns
Type Description
AgentConfig.Builder
Overrides

clearAgentId()

public AgentConfig.Builder clearAgentId()

Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the sub_agents field. It must be unique within the agents map.

optional string agent_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

clearAgentType()

public AgentConfig.Builder clearAgentType()

Optional. The type or class of the agent (e.g., "LlmAgent", "RouterAgent", "ToolUseAgent"). Useful for the autorater to understand the expected behavior of the agent.

string agent_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

clearDescription()

public AgentConfig.Builder clearDescription()

Optional. A high-level description of the agent's role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

clearInstruction()

public AgentConfig.Builder clearInstruction()

Optional. Provides instructions for the LLM model, guiding the agent's behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the AgentEvent.state_delta field.

string instruction = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

clearSubAgents()

public AgentConfig.Builder clearSubAgents()

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

clearTools()

public AgentConfig.Builder clearTools()

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentConfig.Builder

getAgentId()

public String getAgentId()

Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the sub_agents field. It must be unique within the agents map.

optional string agent_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The agentId.

getAgentIdBytes()

public ByteString getAgentIdBytes()

Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the sub_agents field. It must be unique within the agents map.

optional string agent_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for agentId.

getAgentType()

public String getAgentType()

Optional. The type or class of the agent (e.g., "LlmAgent", "RouterAgent", "ToolUseAgent"). Useful for the autorater to understand the expected behavior of the agent.

string agent_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The agentType.

getAgentTypeBytes()

public ByteString getAgentTypeBytes()

Optional. The type or class of the agent (e.g., "LlmAgent", "RouterAgent", "ToolUseAgent"). Useful for the autorater to understand the expected behavior of the agent.

string agent_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for agentType.

getDefaultInstanceForType()

public AgentConfig getDefaultInstanceForType()
Returns
Type Description
AgentConfig

getDescription()

public String getDescription()

Optional. A high-level description of the agent's role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A high-level description of the agent's role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getInstruction()

public String getInstruction()

Optional. Provides instructions for the LLM model, guiding the agent's behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the AgentEvent.state_delta field.

string instruction = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The instruction.

getInstructionBytes()

public ByteString getInstructionBytes()

Optional. Provides instructions for the LLM model, guiding the agent's behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the AgentEvent.state_delta field.

string instruction = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for instruction.

getSubAgents(int index)

public String getSubAgents(int index)

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The subAgents at the given index.

getSubAgentsBytes(int index)

public ByteString getSubAgentsBytes(int index)

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the subAgents at the given index.

getSubAgentsCount()

public int getSubAgentsCount()

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of subAgents.

getSubAgentsList()

public ProtocolStringList getSubAgentsList()

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the subAgents.

getTools(int index)

public Tool getTools(int index)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Tool

getToolsBuilder(int index)

public Tool.Builder getToolsBuilder(int index)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Tool.Builder

getToolsBuilderList()

public List<Tool.Builder> getToolsBuilderList()

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getToolsCount()

public int getToolsCount()

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getToolsList()

public List<Tool> getToolsList()

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Tool>

getToolsOrBuilder(int index)

public ToolOrBuilder getToolsOrBuilder(int index)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ToolOrBuilder

getToolsOrBuilderList()

public List<? extends ToolOrBuilder> getToolsOrBuilderList()

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1beta1.ToolOrBuilder>

hasAgentId()

public boolean hasAgentId()

Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the sub_agents field. It must be unique within the agents map.

optional string agent_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the agentId field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AgentConfig other)

public AgentConfig.Builder mergeFrom(AgentConfig other)
Parameter
Name Description
other AgentConfig
Returns
Type Description
AgentConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AgentConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AgentConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AgentConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AgentConfig.Builder
Overrides

removeTools(int index)

public AgentConfig.Builder removeTools(int index)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AgentConfig.Builder

setAgentId(String value)

public AgentConfig.Builder setAgentId(String value)

Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the sub_agents field. It must be unique within the agents map.

optional string agent_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The agentId to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setAgentIdBytes(ByteString value)

public AgentConfig.Builder setAgentIdBytes(ByteString value)

Required. Unique identifier of the agent. This ID is used to refer to this agent, e.g., in AgentEvent.author, or in the sub_agents field. It must be unique within the agents map.

optional string agent_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for agentId to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setAgentType(String value)

public AgentConfig.Builder setAgentType(String value)

Optional. The type or class of the agent (e.g., "LlmAgent", "RouterAgent", "ToolUseAgent"). Useful for the autorater to understand the expected behavior of the agent.

string agent_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The agentType to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setAgentTypeBytes(ByteString value)

public AgentConfig.Builder setAgentTypeBytes(ByteString value)

Optional. The type or class of the agent (e.g., "LlmAgent", "RouterAgent", "ToolUseAgent"). Useful for the autorater to understand the expected behavior of the agent.

string agent_type = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for agentType to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setDescription(String value)

public AgentConfig.Builder setDescription(String value)

Optional. A high-level description of the agent's role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public AgentConfig.Builder setDescriptionBytes(ByteString value)

Optional. A high-level description of the agent's role and responsibilities. Critical for evaluating if the agent is routing tasks correctly.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setInstruction(String value)

public AgentConfig.Builder setInstruction(String value)

Optional. Provides instructions for the LLM model, guiding the agent's behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the AgentEvent.state_delta field.

string instruction = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The instruction to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setInstructionBytes(ByteString value)

public AgentConfig.Builder setInstructionBytes(ByteString value)

Optional. Provides instructions for the LLM model, guiding the agent's behavior. Can be static or dynamic. Dynamic instructions can contain placeholders like {variable_name} that will be resolved at runtime using the AgentEvent.state_delta field.

string instruction = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for instruction to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setSubAgents(int index, String value)

public AgentConfig.Builder setSubAgents(int index, String value)

Optional. The list of valid agent IDs that this agent can delegate to. This defines the directed edges in the multi-agent system graph topology.

repeated string sub_agents = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The subAgents to set.

Returns
Type Description
AgentConfig.Builder

This builder for chaining.

setTools(int index, Tool value)

public AgentConfig.Builder setTools(int index, Tool value)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Tool
Returns
Type Description
AgentConfig.Builder

setTools(int index, Tool.Builder builderForValue)

public AgentConfig.Builder setTools(int index, Tool.Builder builderForValue)

Optional. The list of tools available to this agent.

repeated .google.cloud.aiplatform.v1beta1.Tool tools = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Tool.Builder
Returns
Type Description
AgentConfig.Builder