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-5-5, 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()This endpoint is in beta: requests must send managed-agents-2026-04-01in this header.final Optional<String>workspaceId()Optional header to select the Workspace for this request. 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<BetaManagedAgentsExecutionIdentityParams>executionIdentity()Execution principal for runs of this agent. final Optional<List<BetaManagedAgentsUrlMcpServerParams>>mcpServers()MCP servers this agent connects to. final Optional<AgentCreateParams.Metadata>metadata()Arbitrary key-value metadata. final Optional<BetaManagedAgentsMultiagentParams>multiagent()Multiagent orchestration configuration. 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<BetaManagedAgentsExecutionIdentityParams>_executionIdentity()Returns the raw JSON value of executionIdentity. 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. SpanData_spanData()The data for the OpenTelemetry span of a call to the method with these parameters. 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()
This endpoint is in beta: requests must send
managed-agents-2026-04-01in this header.
-
workspaceId
final Optional<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.
-
model
final AgentCreateParams.Model model()
Model identifier. Accepts the model string, e.g.
claude-opus-5-5, or amodel_configobject for additional configuration control
-
description
final Optional<String> description()
Description of what the agent does.
-
executionIdentity
final Optional<BetaManagedAgentsExecutionIdentityParams> executionIdentity()
Execution principal for runs of this agent. Omitting it, sending null, or sending
{"type": "service_account"}stores the default.
-
mcpServers
final Optional<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.
-
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()
Multiagent orchestration configuration.
-
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 256 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.
-
_executionIdentity
final JsonField<BetaManagedAgentsExecutionIdentityParams> _executionIdentity()
Returns the raw JSON value of executionIdentity.
Unlike executionIdentity, 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.
-
_spanData
SpanData _spanData()
The data for the OpenTelemetry span of a call to the method with these parameters.
-
builder
final static AgentCreateParams.Builder builder()
Returns a mutable builder for constructing an instance of AgentCreateParams.
The following fields are required:
.model() .name()
-
-
-
-