Class AgentCreateParams.Builder
-
- All Implemented Interfaces:
public final class AgentCreateParams.BuilderA builder for AgentCreateParams.
-
-
Method Summary
-
-
Method Detail
-
betas
final AgentCreateParams.Builder betas(List<AnthropicBeta> betas)
Optional header to specify the beta version(s) you want to use.
-
betas
final AgentCreateParams.Builder betas(Optional<List<AnthropicBeta>> betas)
Alias for calling Builder.betas with
betas.orElse(null).
-
addBeta
final AgentCreateParams.Builder addBeta(AnthropicBeta beta)
Adds a single AnthropicBeta to betas.
-
addBeta
final AgentCreateParams.Builder addBeta(String value)
Sets addBeta to an arbitrary String.
You should usually call addBeta with a well-typed AnthropicBeta constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
body
final AgentCreateParams.Builder body(AgentCreateParams.Body body)
Sets the entire request body.
This is generally only useful if you are already constructing the body separately. Otherwise, it's more convenient to use the top-level setters instead:
-
model
final AgentCreateParams.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.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.Builder model(BetaManagedAgentsModel betaManagedAgents)
Alias for calling model with
Model.ofBetaManagedAgents(betaManagedAgents).
-
model
final AgentCreateParams.Builder model(BetaManagedAgentsModelConfigParams betaManagedAgentsModelConfigParams)
Alias for calling model with
Model.ofBetaManagedAgentsModelConfigParams(betaManagedAgentsModelConfigParams).
-
name
final AgentCreateParams.Builder name(String name)
Human-readable name for the agent.
-
name
final AgentCreateParams.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.Builder description(String description)
Description of what the agent does.
-
description
final AgentCreateParams.Builder description(Optional<String> description)
Alias for calling Builder.description with
description.orElse(null).
-
description
final AgentCreateParams.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.Builder mcpServers(List<BetaManagedAgentsUrlMcpServerParams> mcpServers)
MCP servers this agent connects to. Maximum 20. Names must be unique within the array.
-
mcpServers
final AgentCreateParams.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.Builder addMcpServer(BetaManagedAgentsUrlMcpServerParams mcpServer)
Adds a single BetaManagedAgentsUrlMcpServerParams to mcpServers.
-
metadata
final AgentCreateParams.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.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.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.Builder multiagent(Optional<BetaManagedAgentsMultiagentParams> multiagent)
Alias for calling Builder.multiagent with
multiagent.orElse(null).
-
multiagent
final AgentCreateParams.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.Builder coordinatorMultiagent(List<BetaManagedAgentsMultiagentRosterEntryParams> agents)
Alias for calling multiagent with the following:
BetaManagedAgentsMultiagentParams.builder() .type(BetaManagedAgentsMultiagentParams.Type.COORDINATOR) .agents(agents) .build()
-
skills
final AgentCreateParams.Builder skills(List<BetaManagedAgentsSkillParams> skills)
Skills available to the agent.
-
skills
final AgentCreateParams.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.Builder addSkill(BetaManagedAgentsSkillParams skill)
Adds a single BetaManagedAgentsSkillParams to skills.
-
addSkill
final AgentCreateParams.Builder addSkill(BetaManagedAgentsAnthropicSkillParams anthropic)
Alias for calling addSkill with
BetaManagedAgentsSkillParams.ofAnthropic(anthropic).
-
addSkill
final AgentCreateParams.Builder addSkill(BetaManagedAgentsCustomSkillParams custom)
Alias for calling addSkill with
BetaManagedAgentsSkillParams.ofCustom(custom).
-
addAnthropicSkill
final AgentCreateParams.Builder addAnthropicSkill(String skillId)
Alias for calling addSkill with the following:
BetaManagedAgentsAnthropicSkillParams.builder() .type(BetaManagedAgentsAnthropicSkillParams.Type.ANTHROPIC) .skillId(skillId) .build()
-
addCustomSkill
final AgentCreateParams.Builder addCustomSkill(String skillId)
Alias for calling addSkill with the following:
BetaManagedAgentsCustomSkillParams.builder() .type(BetaManagedAgentsCustomSkillParams.Type.CUSTOM) .skillId(skillId) .build()
-
system
final AgentCreateParams.Builder system(String system)
System prompt for the agent.
-
system
final AgentCreateParams.Builder system(Optional<String> system)
Alias for calling Builder.system with
system.orElse(null).
-
system
final AgentCreateParams.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.Builder tools(List<AgentCreateParams.Tool> tools)
Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed.
-
tools
final AgentCreateParams.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.Builder addTool(AgentCreateParams.Tool tool)
-
addTool
final AgentCreateParams.Builder addTool(BetaManagedAgentsAgentToolset20260401Params agentToolset20260401)
Alias for calling addTool with
Tool.ofAgentToolset20260401(agentToolset20260401).
-
addTool
final AgentCreateParams.Builder addTool(BetaManagedAgentsMcpToolsetParams mcpToolset)
Alias for calling addTool with
Tool.ofMcpToolset(mcpToolset).
-
addTool
final AgentCreateParams.Builder addTool(BetaManagedAgentsCustomToolParams custom)
Alias for calling addTool with
Tool.ofCustom(custom).
-
addMcpToolsetTool
final AgentCreateParams.Builder addMcpToolsetTool(String mcpServerName)
Alias for calling addTool with the following:
BetaManagedAgentsMcpToolsetParams.builder() .type(BetaManagedAgentsMcpToolsetParams.Type.MCP_TOOLSET) .mcpServerName(mcpServerName) .build()
-
additionalBodyProperties
final AgentCreateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final AgentCreateParams.Builder putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final AgentCreateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final AgentCreateParams.Builder removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final AgentCreateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys)
-
additionalHeaders
final AgentCreateParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final AgentCreateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
putAdditionalHeader
final AgentCreateParams.Builder putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final AgentCreateParams.Builder putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final AgentCreateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final AgentCreateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final AgentCreateParams.Builder replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final AgentCreateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final AgentCreateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final AgentCreateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final AgentCreateParams.Builder removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final AgentCreateParams.Builder removeAllAdditionalHeaders(Set<String> names)
-
additionalQueryParams
final AgentCreateParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final AgentCreateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
putAdditionalQueryParam
final AgentCreateParams.Builder putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final AgentCreateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final AgentCreateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final AgentCreateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final AgentCreateParams.Builder replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final AgentCreateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final AgentCreateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final AgentCreateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final AgentCreateParams.Builder removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final AgentCreateParams.Builder removeAllAdditionalQueryParams(Set<String> keys)
-
build
final AgentCreateParams build()
Returns an immutable instance of AgentCreateParams.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.model() .name()
-
-
-
-