Class AgentCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class AgentCreateParams.Body.BuilderA builder for Body.
-
-
Method Summary
Modifier and Type Method Description final AgentCreateParams.Body.Buildermodel(AgentCreateParams.Model model)Model identifier. final AgentCreateParams.Body.Buildermodel(JsonField<AgentCreateParams.Model> model)Sets Builder.model to an arbitrary JSON value. final AgentCreateParams.Body.Buildermodel(BetaManagedAgentsModel betaManagedAgents)Alias for calling model with Model.ofBetaManagedAgents(betaManagedAgents).final AgentCreateParams.Body.Buildermodel(BetaManagedAgentsModelConfigParams betaManagedAgentsModelConfigParams)Alias for calling model with Model.ofBetaManagedAgentsModelConfigParams(betaManagedAgentsModelConfigParams).final AgentCreateParams.Body.Buildername(String name)Human-readable name for the agent. final AgentCreateParams.Body.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final AgentCreateParams.Body.Builderdescription(String description)Description of what the agent does. final AgentCreateParams.Body.Builderdescription(Optional<String> description)Alias for calling Builder.description with description.orElse(null).final AgentCreateParams.Body.Builderdescription(JsonField<String> description)Sets Builder.description to an arbitrary JSON value. final AgentCreateParams.Body.BuildermcpServers(List<BetaManagedAgentsUrlMcpServerParams> mcpServers)MCP servers this agent connects to. final AgentCreateParams.Body.BuildermcpServers(JsonField<List<BetaManagedAgentsUrlMcpServerParams>> mcpServers)Sets Builder.mcpServers to an arbitrary JSON value. final AgentCreateParams.Body.BuilderaddMcpServer(BetaManagedAgentsUrlMcpServerParams mcpServer)Adds a single BetaManagedAgentsUrlMcpServerParams to mcpServers. final AgentCreateParams.Body.Buildermetadata(AgentCreateParams.Metadata metadata)Arbitrary key-value metadata. final AgentCreateParams.Body.Buildermetadata(JsonField<AgentCreateParams.Metadata> metadata)Sets Builder.metadata to an arbitrary JSON value. final AgentCreateParams.Body.Buildermultiagent(BetaManagedAgentsMultiagentParams multiagent)A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the agentsroster.final AgentCreateParams.Body.Buildermultiagent(Optional<BetaManagedAgentsMultiagentParams> multiagent)Alias for calling Builder.multiagent with multiagent.orElse(null).final AgentCreateParams.Body.Buildermultiagent(JsonField<BetaManagedAgentsMultiagentParams> multiagent)Sets Builder.multiagent to an arbitrary JSON value. final AgentCreateParams.Body.BuildercoordinatorMultiagent(List<BetaManagedAgentsMultiagentRosterEntryParams> agents)Alias for calling multiagent with the following: BetaManagedAgentsMultiagentParams.builder() .type(BetaManagedAgentsMultiagentParams.Type.COORDINATOR) .agents(agents) .build()final AgentCreateParams.Body.Builderskills(List<BetaManagedAgentsSkillParams> skills)Skills available to the agent. final AgentCreateParams.Body.Builderskills(JsonField<List<BetaManagedAgentsSkillParams>> skills)Sets Builder.skills to an arbitrary JSON value. final AgentCreateParams.Body.BuilderaddSkill(BetaManagedAgentsSkillParams skill)Adds a single BetaManagedAgentsSkillParams to skills. final AgentCreateParams.Body.BuilderaddSkill(BetaManagedAgentsAnthropicSkillParams anthropic)Alias for calling addSkill with BetaManagedAgentsSkillParams.ofAnthropic(anthropic).final AgentCreateParams.Body.BuilderaddSkill(BetaManagedAgentsCustomSkillParams custom)Alias for calling addSkill with BetaManagedAgentsSkillParams.ofCustom(custom).final AgentCreateParams.Body.BuilderaddAnthropicSkill(String skillId)Alias for calling addSkill with the following: BetaManagedAgentsAnthropicSkillParams.builder() .type(BetaManagedAgentsAnthropicSkillParams.Type.ANTHROPIC) .skillId(skillId) .build()final AgentCreateParams.Body.BuilderaddCustomSkill(String skillId)Alias for calling addSkill with the following: BetaManagedAgentsCustomSkillParams.builder() .type(BetaManagedAgentsCustomSkillParams.Type.CUSTOM) .skillId(skillId) .build()final AgentCreateParams.Body.Buildersystem(String system)System prompt for the agent. final AgentCreateParams.Body.Buildersystem(Optional<String> system)Alias for calling Builder.system with system.orElse(null).final AgentCreateParams.Body.Buildersystem(JsonField<String> system)Sets Builder.system to an arbitrary JSON value. final AgentCreateParams.Body.Buildertools(List<AgentCreateParams.Tool> tools)Tool configurations available to the agent. final AgentCreateParams.Body.Buildertools(JsonField<List<AgentCreateParams.Tool>> tools)Sets Builder.tools to an arbitrary JSON value. final AgentCreateParams.Body.BuilderaddTool(AgentCreateParams.Tool tool)Adds a single Tool to tools. final AgentCreateParams.Body.BuilderaddTool(BetaManagedAgentsAgentToolset20260401Params agentToolset20260401)Alias for calling addTool with Tool.ofAgentToolset20260401(agentToolset20260401).final AgentCreateParams.Body.BuilderaddTool(BetaManagedAgentsMcpToolsetParams mcpToolset)Alias for calling addTool with Tool.ofMcpToolset(mcpToolset).final AgentCreateParams.Body.BuilderaddTool(BetaManagedAgentsCustomToolParams custom)Alias for calling addTool with Tool.ofCustom(custom).final AgentCreateParams.Body.BuilderaddMcpToolsetTool(String mcpServerName)Alias for calling addTool with the following: BetaManagedAgentsMcpToolsetParams.builder() .type(BetaManagedAgentsMcpToolsetParams.Type.MCP_TOOLSET) .mcpServerName(mcpServerName) .build()final AgentCreateParams.Body.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final AgentCreateParams.Body.BuilderputAdditionalProperty(String key, JsonValue value)final AgentCreateParams.Body.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final AgentCreateParams.Body.BuilderremoveAdditionalProperty(String key)final AgentCreateParams.Body.BuilderremoveAllAdditionalProperties(Set<String> keys)final AgentCreateParams.Bodybuild()Returns an immutable instance of Body. -
-
Method Detail
-
model
final AgentCreateParams.Body.Builder model(AgentCreateParams.Model model)
Model identifier. Accepts the model string, e.g.
claude-opus-4-6, or amodel_configobject for additional configuration control
-
model
final AgentCreateParams.Body.Builder model(JsonField<AgentCreateParams.Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final AgentCreateParams.Body.Builder model(BetaManagedAgentsModel betaManagedAgents)
Alias for calling model with
Model.ofBetaManagedAgents(betaManagedAgents).
-
model
final AgentCreateParams.Body.Builder model(BetaManagedAgentsModelConfigParams betaManagedAgentsModelConfigParams)
Alias for calling model with
Model.ofBetaManagedAgentsModelConfigParams(betaManagedAgentsModelConfigParams).
-
name
final AgentCreateParams.Body.Builder name(String name)
Human-readable name for the agent.
-
name
final AgentCreateParams.Body.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final AgentCreateParams.Body.Builder description(String description)
Description of what the agent does.
-
description
final AgentCreateParams.Body.Builder description(Optional<String> description)
Alias for calling Builder.description with
description.orElse(null).
-
description
final AgentCreateParams.Body.Builder description(JsonField<String> description)
Sets Builder.description to an arbitrary JSON value.
You should usually call Builder.description with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
mcpServers
final AgentCreateParams.Body.Builder mcpServers(List<BetaManagedAgentsUrlMcpServerParams> mcpServers)
MCP servers this agent connects to. Maximum 20. Names must be unique within the array.
-
mcpServers
final AgentCreateParams.Body.Builder mcpServers(JsonField<List<BetaManagedAgentsUrlMcpServerParams>> mcpServers)
Sets Builder.mcpServers to an arbitrary JSON value.
You should usually call Builder.mcpServers with a well-typed
List<BetaManagedAgentsUrlMcpServerParams>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addMcpServer
final AgentCreateParams.Body.Builder addMcpServer(BetaManagedAgentsUrlMcpServerParams mcpServer)
Adds a single BetaManagedAgentsUrlMcpServerParams to mcpServers.
-
metadata
final AgentCreateParams.Body.Builder metadata(AgentCreateParams.Metadata metadata)
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
-
metadata
final AgentCreateParams.Body.Builder metadata(JsonField<AgentCreateParams.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
multiagent
final AgentCreateParams.Body.Builder multiagent(BetaManagedAgentsMultiagentParams multiagent)
A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the
agentsroster.
-
multiagent
final AgentCreateParams.Body.Builder multiagent(Optional<BetaManagedAgentsMultiagentParams> multiagent)
Alias for calling Builder.multiagent with
multiagent.orElse(null).
-
multiagent
final AgentCreateParams.Body.Builder multiagent(JsonField<BetaManagedAgentsMultiagentParams> multiagent)
Sets Builder.multiagent to an arbitrary JSON value.
You should usually call Builder.multiagent with a well-typed BetaManagedAgentsMultiagentParams value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
coordinatorMultiagent
final AgentCreateParams.Body.Builder coordinatorMultiagent(List<BetaManagedAgentsMultiagentRosterEntryParams> agents)
Alias for calling multiagent with the following:
BetaManagedAgentsMultiagentParams.builder() .type(BetaManagedAgentsMultiagentParams.Type.COORDINATOR) .agents(agents) .build()
-
skills
final AgentCreateParams.Body.Builder skills(List<BetaManagedAgentsSkillParams> skills)
Skills available to the agent.
-
skills
final AgentCreateParams.Body.Builder skills(JsonField<List<BetaManagedAgentsSkillParams>> skills)
Sets Builder.skills to an arbitrary JSON value.
You should usually call Builder.skills with a well-typed
List<BetaManagedAgentsSkillParams>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addSkill
final AgentCreateParams.Body.Builder addSkill(BetaManagedAgentsSkillParams skill)
Adds a single BetaManagedAgentsSkillParams to skills.
-
addSkill
final AgentCreateParams.Body.Builder addSkill(BetaManagedAgentsAnthropicSkillParams anthropic)
Alias for calling addSkill with
BetaManagedAgentsSkillParams.ofAnthropic(anthropic).
-
addSkill
final AgentCreateParams.Body.Builder addSkill(BetaManagedAgentsCustomSkillParams custom)
Alias for calling addSkill with
BetaManagedAgentsSkillParams.ofCustom(custom).
-
addAnthropicSkill
final AgentCreateParams.Body.Builder addAnthropicSkill(String skillId)
Alias for calling addSkill with the following:
BetaManagedAgentsAnthropicSkillParams.builder() .type(BetaManagedAgentsAnthropicSkillParams.Type.ANTHROPIC) .skillId(skillId) .build()
-
addCustomSkill
final AgentCreateParams.Body.Builder addCustomSkill(String skillId)
Alias for calling addSkill with the following:
BetaManagedAgentsCustomSkillParams.builder() .type(BetaManagedAgentsCustomSkillParams.Type.CUSTOM) .skillId(skillId) .build()
-
system
final AgentCreateParams.Body.Builder system(String system)
System prompt for the agent.
-
system
final AgentCreateParams.Body.Builder system(Optional<String> system)
Alias for calling Builder.system with
system.orElse(null).
-
system
final AgentCreateParams.Body.Builder system(JsonField<String> system)
Sets Builder.system to an arbitrary JSON value.
You should usually call Builder.system with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tools
final AgentCreateParams.Body.Builder tools(List<AgentCreateParams.Tool> tools)
Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed.
-
tools
final AgentCreateParams.Body.Builder tools(JsonField<List<AgentCreateParams.Tool>> tools)
Sets Builder.tools to an arbitrary JSON value.
You should usually call Builder.tools with a well-typed
List<Tool>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTool
final AgentCreateParams.Body.Builder addTool(AgentCreateParams.Tool tool)
-
addTool
final AgentCreateParams.Body.Builder addTool(BetaManagedAgentsAgentToolset20260401Params agentToolset20260401)
Alias for calling addTool with
Tool.ofAgentToolset20260401(agentToolset20260401).
-
addTool
final AgentCreateParams.Body.Builder addTool(BetaManagedAgentsMcpToolsetParams mcpToolset)
Alias for calling addTool with
Tool.ofMcpToolset(mcpToolset).
-
addTool
final AgentCreateParams.Body.Builder addTool(BetaManagedAgentsCustomToolParams custom)
Alias for calling addTool with
Tool.ofCustom(custom).
-
addMcpToolsetTool
final AgentCreateParams.Body.Builder addMcpToolsetTool(String mcpServerName)
Alias for calling addTool with the following:
BetaManagedAgentsMcpToolsetParams.builder() .type(BetaManagedAgentsMcpToolsetParams.Type.MCP_TOOLSET) .mcpServerName(mcpServerName) .build()
-
additionalProperties
final AgentCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final AgentCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final AgentCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final AgentCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final AgentCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final AgentCreateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.model() .name()
-
-
-
-