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)
This endpoint is in beta: requests must send
managed-agents-2026-04-01in this header.
-
betas
final AgentCreateParams.Builder betas(Optional<List<AnthropicBeta>> betas)
Alias for calling Builder.betas with
betas.orElse(null).
-
workspaceId
final AgentCreateParams.Builder workspaceId(String workspaceId)
Optional header to select the Workspace for this request. The value is a Workspace ID (for example,
wrkspc_011CZkZaBF1tNoB5wlCeusgy).Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.
-
workspaceId
final AgentCreateParams.Builder workspaceId(Optional<String> workspaceId)
Alias for calling Builder.workspaceId with
workspaceId.orElse(null).
-
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:
-
additionalHeaders
final AgentCreateParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final AgentCreateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
additionalQueryParams
final AgentCreateParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final AgentCreateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
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.
-
model
final AgentCreateParams.Builder model(AgentCreateParams.Model model)
Model identifier. Accepts the model string, e.g.
claude-opus-5-5, 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.
-
executionIdentity
final AgentCreateParams.Builder executionIdentity(BetaManagedAgentsExecutionIdentityParams executionIdentity)
Execution principal for runs of this agent. Omitting it, sending null, or sending
{"type": "service_account"}stores the default.
-
executionIdentity
final AgentCreateParams.Builder executionIdentity(Optional<BetaManagedAgentsExecutionIdentityParams> executionIdentity)
Alias for calling Builder.executionIdentity with
executionIdentity.orElse(null).
-
executionIdentity
final AgentCreateParams.Builder executionIdentity(JsonField<BetaManagedAgentsExecutionIdentityParams> executionIdentity)
Sets Builder.executionIdentity to an arbitrary JSON value.
You should usually call Builder.executionIdentity with a well-typed BetaManagedAgentsExecutionIdentityParams value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
executionIdentity
final AgentCreateParams.Builder executionIdentity(BetaManagedAgentsAwsRoleExecutionIdentityParams awsRole)
Alias for calling executionIdentity with
BetaManagedAgentsExecutionIdentityParams.ofAwsRole(awsRole).
-
executionIdentity
final AgentCreateParams.Builder executionIdentity(BetaManagedAgentsServiceAccountExecutionIdentityParams serviceAccount)
Alias for calling executionIdentity with
BetaManagedAgentsExecutionIdentityParams.ofServiceAccount(serviceAccount).
-
awsRoleExecutionIdentity
final AgentCreateParams.Builder awsRoleExecutionIdentity(String roleArn)
Alias for calling executionIdentity with the following:
BetaManagedAgentsAwsRoleExecutionIdentityParams.builder() .roleArn(roleArn) .build()
-
mcpServers
final AgentCreateParams.Builder mcpServers(List<BetaManagedAgentsUrlMcpServerParams> mcpServers)
MCP servers this agent connects to. Maximum 20. Names must be unique within the array. Every server must be referenced by an
mcp_toolsetintools; unreferenced servers are rejected. See the MCP connector guide.
-
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)
Multiagent orchestration configuration.
-
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.
-
multiagent
final AgentCreateParams.Builder multiagent(BetaManagedAgentsMultiagentCoordinatorParams coordinator)
Alias for calling multiagent with
BetaManagedAgentsMultiagentParams.ofCoordinator(coordinator).
-
multiagent
final AgentCreateParams.Builder multiagent(BetaManagedAgentsMultiagent20261001Params multiagent20261001)
Alias for calling multiagent with
BetaManagedAgentsMultiagentParams.ofMultiagent20261001(multiagent20261001).
-
coordinatorMultiagent
final AgentCreateParams.Builder coordinatorMultiagent(List<BetaManagedAgentsMultiagentRosterEntryParams> agents)
Alias for calling multiagent with the following:
BetaManagedAgentsMultiagentCoordinatorParams.builder() .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() .skillId(skillId) .build()
-
addCustomSkill
final AgentCreateParams.Builder addCustomSkill(String skillId)
Alias for calling addSkill with the following:
BetaManagedAgentsCustomSkillParams.builder() .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 256 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() .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)
-
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)
-
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()
-
-
-
-