Create agent
Create a new agent with optional capabilities and configuration. Supports runtype, external, and claude_managed agent types. External-agent auth credentials are accepted on write but returned as <redacted>; a configuration copied from a management response must replace that placeholder with the real credential before create.
Authentication
AuthorizationBearer
API key or Clerk session token
Request
This endpoint expects an object.
name
agentType
Allowed values:
capabilities
claudeManagedConfig
config
description
externalConfig
icon
maxTurns
primaryFlowIdDeprecated
primaryFlowId is retired: primary-flow agents were removed (ADR 0024). Attach the flow to the agent as a runtime tool ({ toolType: ‘flow’, flowId }) or dispatch the flow directly via POST /v1/dispatch.
Response
Agent created
agentType
capabilities
claudeManagedConfig
config
configHash
createdAt
description
draftVersionId
externalConfig
External-agent configuration. Configured auth.credentials values are write-only and returned as <redacted>, never plaintext.
healthStatus
icon
id
lastHealthCheckAt
lastModifiedSource
name
organizationId
publishedVersionId
status
updatedAt
userId
_warnings
dashboardUrl
sandboxCapabilityIssues
Errors
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error