Class AgentCreateParams
-
- All Implemented Interfaces:
-
com.anthropic.core.Params
public final class AgentCreateParams implements Params
Create Agent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAgentCreateParams.BuilderA builder for AgentCreateParams.
public final classAgentCreateParams.BodyRequest parameters for creating an
agent.public final classAgentCreateParams.ModelModel identifier. Accepts the model string, e.g.
claude-opus-4-6, or amodel_configobject for additional configuration controlpublic final classAgentCreateParams.MetadataArbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
public final classAgentCreateParams.ToolUnion type for tool configurations in the tools array.
-
Method Summary
Modifier and Type Method Description final Optional<List<AnthropicBeta>>betas()Optional header to specify the beta version(s) you want to use. final AgentCreateParams.Modelmodel()Model identifier. final Stringname()Human-readable name for the agent. final Optional<String>description()Description of what the agent does. final Optional<List<BetaManagedAgentsUrlMcpServerParams>>mcpServers()MCP servers this agent connects to. final Optional<AgentCreateParams.Metadata>metadata()Arbitrary key-value metadata. final Optional<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 Optional<List<BetaManagedAgentsSkillParams>>skills()Skills available to the agent. final Optional<String>system()System prompt for the agent. final Optional<List<AgentCreateParams.Tool>>tools()Tool configurations available to the agent. final JsonField<AgentCreateParams.Model>_model()Returns the raw JSON value of model. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<List<BetaManagedAgentsUrlMcpServerParams>>_mcpServers()Returns the raw JSON value of mcpServers. final JsonField<AgentCreateParams.Metadata>_metadata()Returns the raw JSON value of metadata. final JsonField<BetaManagedAgentsMultiagentParams>_multiagent()Returns the raw JSON value of multiagent. final JsonField<List<BetaManagedAgentsSkillParams>>_skills()Returns the raw JSON value of skills. final JsonField<String>_system()Returns the raw JSON value of system. final JsonField<List<AgentCreateParams.Tool>>_tools()Returns the raw JSON value of tools. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final AgentCreateParams.BuildertoBuilder()final AgentCreateParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static AgentCreateParams.Builderbuilder()Returns a mutable builder for constructing an instance of AgentCreateParams. -
-
Method Detail
-
betas
final Optional<List<AnthropicBeta>> betas()
Optional header to specify the beta version(s) you want to use.
-
model
final AgentCreateParams.Model model()
Model identifier. Accepts the model string, e.g.
claude-opus-4-6, or amodel_configobject for additional configuration control
-
description
final Optional<String> description()
Description of what the agent does.
-
mcpServers
final Optional<List<BetaManagedAgentsUrlMcpServerParams>> mcpServers()
MCP servers this agent connects to. Maximum 20. Names must be unique within the array.
-
metadata
final Optional<AgentCreateParams.Metadata> metadata()
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
-
multiagent
final Optional<BetaManagedAgentsMultiagentParams> multiagent()
A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the
agentsroster.
-
skills
final Optional<List<BetaManagedAgentsSkillParams>> skills()
Skills available to the agent.
-
tools
final Optional<List<AgentCreateParams.Tool>> tools()
Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed.
-
_model
final JsonField<AgentCreateParams.Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_mcpServers
final JsonField<List<BetaManagedAgentsUrlMcpServerParams>> _mcpServers()
Returns the raw JSON value of mcpServers.
Unlike mcpServers, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<AgentCreateParams.Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_multiagent
final JsonField<BetaManagedAgentsMultiagentParams> _multiagent()
Returns the raw JSON value of multiagent.
Unlike multiagent, this method doesn't throw if the JSON field has an unexpected type.
-
_skills
final JsonField<List<BetaManagedAgentsSkillParams>> _skills()
Returns the raw JSON value of skills.
Unlike skills, this method doesn't throw if the JSON field has an unexpected type.
-
_system
final JsonField<String> _system()
Returns the raw JSON value of system.
Unlike system, this method doesn't throw if the JSON field has an unexpected type.
-
_tools
final JsonField<List<AgentCreateParams.Tool>> _tools()
Returns the raw JSON value of tools.
Unlike tools, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final AgentCreateParams.Builder toBuilder()
-
_body
final AgentCreateParams.Body _body()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static AgentCreateParams.Builder builder()
Returns a mutable builder for constructing an instance of AgentCreateParams.
The following fields are required:
.model() .name()
-
-
-
-