Claude Platform Docs

Deployments

Create Deployment
beta.deployments.create(DeploymentCreateParams**kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments
List Deployments
beta.deployments.list(DeploymentListParams**kwargs) -> SyncPageCursor[BetaManagedAgentsDeployment]
GET/v1/deployments
Get Deployment
beta.deployments.retrieve(strdeployment_id, DeploymentRetrieveParams**kwargs) -> BetaManagedAgentsDeployment
GET/v1/deployments/{deployment_id}
Update Deployment
beta.deployments.update(strdeployment_id, DeploymentUpdateParams**kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}
Archive Deployment
beta.deployments.archive(strdeployment_id, DeploymentArchiveParams**kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}/archive
Run Deployment Now
beta.deployments.run(strdeployment_id, DeploymentRunParams**kwargs) -> BetaManagedAgentsDeploymentRun
POST/v1/deployments/{deployment_id}/run
Pause Deployment
beta.deployments.pause(strdeployment_id, DeploymentPauseParams**kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}/pause
Unpause Deployment
beta.deployments.unpause(strdeployment_id, DeploymentUnpauseParams**kwargs) -> BetaManagedAgentsDeployment
POST/v1/deployments/{deployment_id}/unpause
Models
class BetaManagedAgentsAgentArchivedDeploymentPausedReasonError:

The deployment's agent was archived.

type: Literal["agent_archived_error"]
class BetaManagedAgentsCronSchedule:

5-field POSIX cron schedule with computed runtime timestamps.

expression: str

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: str

IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").

minLength1
type: Literal["cron"]
last_run_at: Optional[datetime]

A timestamp in RFC 3339 format

formatdate-time
upcoming_runs_at: Optional[List[datetime]]

Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (archived_at set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.

class BetaManagedAgentsCronScheduleParams:

5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

expression: str

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: str

Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

minLength1
type: Literal["cron"]
class BetaManagedAgentsDeployment:

A deployment is a configured instance of an agent — it binds the agent to everything needed to run it autonomously: an environment, credentials, initial events, and an optional schedule.

An event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.

One of the following:

An event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.

One of the following:

Why a deployment is paused. Non-null exactly when status is paused.

One of the following:
class BetaManagedAgentsManualDeploymentPausedReason:

The caller invoked the pause endpoint on the deployment.

type: Literal["manual"]
class BetaManagedAgentsErrorDeploymentPausedReason:

A scheduled fire recorded a failed run whose error auto-pauses the deployment.

The error that triggered an auto-pause. Matches the failed run's error.type.

One of the following:
type: Literal["error"]

The error that triggered an auto-pause. Matches the failed run's error.type.

One of the following:
Literal["active", "paused"]

Lifecycle status of a deployment.

One of the following:
"active"
"paused"
class BetaManagedAgentsDeploymentSystemMessageEvent:

Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a role: "system" turn rather than replacing the top-level system prompt.

System content blocks to append. Text-only.

text: str

The text content.

minLength1
type: Literal["text"]
type: Literal["system.message"]
class BetaManagedAgentsDeploymentUserDefineOutcomeEvent:

An outcome the agent should work toward. The agent begins work on receipt.

description: str

What the agent should produce. This is the task specification.

rubric: Rubric

Rubric for grading the quality of an outcome.

One of the following:
class BetaManagedAgentsFileRubric:

Rubric referenced by a file uploaded via the Files API.

file_id: str

ID of the rubric file.

type: Literal["file"]
class BetaManagedAgentsTextRubric:

Rubric content provided inline as text.

content: str

Rubric content. Plain text or markdown — the grader treats it as freeform text.

type: Literal["text"]
type: Literal["user.define_outcome"]
max_iterations: Optional[int]

Eval→revision cycles before giving up. Default 3, max 20.

formatint32
class BetaManagedAgentsDeploymentUserMessageEvent:

A user message sent to the session.

content: List[Content]

Array of content blocks for the user message.

One of the following:
class BetaManagedAgentsTextBlock:

Regular text content.

text: str

The text content.

minLength1
type: Literal["text"]
class BetaManagedAgentsImageBlock:

Image content specified directly as base64 data or as a reference via a URL.

class BetaManagedAgentsDocumentBlock:

Document content, either specified directly as base64 data, as text, or as a reference via a URL.

class BetaManagedAgentsRedactedBlock:

Placeholder for content withheld by Anthropic model policy.

type: Literal["redacted"]
type: Literal["user.message"]
class BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError:

The deployment's environment was archived.

type: Literal["environment_archived_error"]
class BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError:

The deployment's environment no longer exists.

type: Literal["environment_not_found_error"]
class BetaManagedAgentsErrorDeploymentPausedReason:

A scheduled fire recorded a failed run whose error auto-pauses the deployment.

The error that triggered an auto-pause. Matches the failed run's error.type.

One of the following:
type: Literal["error"]
class BetaManagedAgentsFileNotFoundDeploymentPausedReasonError:

A file resource referenced by the deployment no longer exists.

type: Literal["file_not_found_error"]
class BetaManagedAgentsFileResourceConfig:

A file mounted into each session's container.

file_id: str

ID of a previously uploaded file.

type: Literal["file"]
mount_path: Optional[str]

Mount path in the container. Defaults to /mnt/session/uploads/<file_id>.

class BetaManagedAgentsGitHubRepositoryResourceConfig:

A GitHub repository mounted into each session's container. The authorization token is write-only and never returned.

type: Literal["github_repository"]
url: str

Github URL of the repository

checkout: Optional[Checkout]

Branch or commit to check out. Defaults to the repository's default branch.

One of the following:
class BetaManagedAgentsBranchCheckout:
name: str

Branch name to check out.

minLength1
maxLength255
type: Literal["branch"]
class BetaManagedAgentsCommitCheckout:
sha: str

Full commit SHA to check out.

minLength7
maxLength64
type: Literal["commit"]
mount_path: Optional[str]

Mount path in the container. Defaults to /workspace/<repo-name>.

class BetaManagedAgentsManualDeploymentPausedReason:

The caller invoked the pause endpoint on the deployment.

type: Literal["manual"]
class BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError:

An MCP server host used by the deployment's agent is blocked by the environment's network policy.

type: Literal["mcp_egress_blocked_error"]
class BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError:

A memory store referenced by the deployment is archived.

type: Literal["memory_store_archived_error"]
class BetaManagedAgentsMemoryStoreResourceConfig:

A memory store attached to each session created from this deployment.

memory_store_id: str

The memory store ID (memstore_...). Must belong to the caller's organization and workspace.

type: Literal["memory_store"]
access: Optional[Literal["read_write", "read_only"]]

Access mode for an attached memory store.

One of the following:
"read_write"
"read_only"
instructions: Optional[str]

Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.

class BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError:

The deployment's organization is disabled.

type: Literal["organization_disabled_error"]
class BetaManagedAgentsSchedule:

5-field POSIX cron schedule with computed runtime timestamps.

expression: str

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: str

IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").

minLength1
type: Literal["cron"]
last_run_at: Optional[datetime]

A timestamp in RFC 3339 format

formatdate-time
upcoming_runs_at: Optional[List[datetime]]

Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (archived_at set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.

class BetaManagedAgentsScheduleParams:

5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

expression: str

5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

minLength1
maxLength256
timezone: str

Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

minLength1
type: Literal["cron"]
class BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError:

The deployment configures resources, but its environment is self-hosted and cannot mount them.

type: Literal["self_hosted_resources_unsupported_error"]

A configured session resource. Echoes the input minus write-only credentials.

One of the following:
class BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError:

A referenced resource no longer exists and its kind was not reported.

type: Literal["session_resource_not_found_error"]
class BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError:

A skill referenced by the deployment's agent no longer exists.

type: Literal["skill_not_found_error"]
class BetaManagedAgentsUnknownDeploymentPausedReasonError:

An unrecognized error auto-paused the deployment. A fallback variant; matches a run whose error.type is unknown_error.

type: Literal["unknown_error"]
class BetaManagedAgentsVaultArchivedDeploymentPausedReasonError:

A vault referenced by the deployment is archived.

type: Literal["vault_archived_error"]
class BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError:

A vault referenced by the deployment no longer exists.

type: Literal["vault_not_found_error"]
class BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError:

The deployment's workspace was archived.

type: Literal["workspace_archived_error"]