Claude Platform Docs

배포

배포 생성
client.Beta.Deployments.New(ctx, params) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments
배포 나열
client.Beta.Deployments.List(ctx, params) (*PageCursor[BetaManagedAgentsDeployment], error)
GET/v1/deployments
배포 가져오기
client.Beta.Deployments.Get(ctx, deploymentID, query) (*BetaManagedAgentsDeployment, error)
GET/v1/deployments/{deployment_id}
배포 업데이트
client.Beta.Deployments.Update(ctx, deploymentID, params) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}
배포 보관
client.Beta.Deployments.Archive(ctx, deploymentID, body) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}/archive
지금 배포 실행
client.Beta.Deployments.Run(ctx, deploymentID, body) (*BetaManagedAgentsDeploymentRun, error)
POST/v1/deployments/{deployment_id}/run
배포 일시 중지
client.Beta.Deployments.Pause(ctx, deploymentID, body) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}/pause
배포 일시 중지 해제
client.Beta.Deployments.Unpause(ctx, deploymentID, body) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}/unpause
Models
type BetaManagedAgentsAgentArchivedDeploymentPausedReasonError struct { Type: "agent_archived_error" }

The deployment's agent was archived.

Type BetaManagedAgentsAgentArchivedDeploymentPausedReasonErrorType
type BetaManagedAgentsCronSchedule struct { Type: "cron"; Expression; Timezone; /* 2 more */ }

5-field POSIX cron schedule with computed runtime timestamps.

Type BetaManagedAgentsCronScheduleType
Expression string

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 string

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

minLength1
LastRunAt Time Optional

Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.

formatdate-time
UpcomingRunsAt []Time Optional

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.

type BetaManagedAgentsCronScheduleParamsResp struct { Type: "cron"; Expression; Timezone }

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

Type BetaManagedAgentsCronScheduleParamsType
Expression string

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 string

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

minLength1
type BetaManagedAgentsDeployment struct { Type: "deployment"; ID; Agent; /* 14 more */ }

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.

type BetaManagedAgentsDeploymentInitialEventUnion interface{…}

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

One of the following:
type BetaManagedAgentsDeploymentInitialEventParamsUnion interface{…}

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

One of the following:
type BetaManagedAgentsUserMessageEventParams struct { Type: "user.message"; Content }

Parameters for sending a user message to the session.

type BetaManagedAgentsUserDefineOutcomeEventParams struct { Type: "user.define_outcome"; Description; Rubric; MaxIterations }

Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.

type BetaManagedAgentsSystemMessageEventParams struct { Type: "system.message"; Content }

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. At most one per request: it must be the final event and immediately follow the user.message, user.tool_result, or user.custom_tool_result it accompanies. Only supported on models that accept mid-conversation system messages.

Type BetaManagedAgentsSystemMessageEventParamsType

System content blocks to append. Text-only.

Type BetaManagedAgentsSystemContentBlockType
Text string

The text content.

minLength1
type BetaManagedAgentsDeploymentPausedReasonUnion interface{…}

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

One of the following:
type BetaManagedAgentsManualDeploymentPausedReason struct { Type: "manual" }

The caller invoked the pause endpoint on the deployment.

Type BetaManagedAgentsManualDeploymentPausedReasonType
type BetaManagedAgentsErrorDeploymentPausedReason struct { Type: "error"; Error }

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

Type BetaManagedAgentsErrorDeploymentPausedReasonType
One of the following:
type BetaManagedAgentsDeploymentPausedReasonErrorUnion interface{…}

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

One of the following:
type BetaManagedAgentsDeploymentStatus string

Lifecycle status of a deployment.

One of the following:
const BetaManagedAgentsDeploymentStatusActive BetaManagedAgentsDeploymentStatus = "active"

The deployment is active and can run sessions. Archived deployments also report this status; check archived_at to distinguish them.

const BetaManagedAgentsDeploymentStatusPaused BetaManagedAgentsDeploymentStatus = "paused"

The deployment is paused. Autonomous triggers are suppressed; manual runs are still permitted.

type BetaManagedAgentsDeploymentSystemMessageEvent struct { Type: "system.message"; Content }

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.

Type BetaManagedAgentsDeploymentSystemMessageEventType

System content blocks to append. Text-only.

Type BetaManagedAgentsSystemContentBlockType
Text string

The text content.

minLength1
type BetaManagedAgentsDeploymentUserDefineOutcomeEvent struct { Type: "user.define_outcome"; Description; Rubric; MaxIterations }

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

Type BetaManagedAgentsDeploymentUserDefineOutcomeEventType
Description string

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

Rubric BetaManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion

How to grade the outcome. Text or file reference.

One of the following:
type BetaManagedAgentsFileRubric struct { Type: "file"; FileID }

Rubric referenced by a file uploaded via the Files API.

Type BetaManagedAgentsFileRubricType
FileID string

ID of the rubric file.

type BetaManagedAgentsTextRubric struct { Type: "text"; Content }

Rubric content provided inline as text.

Type BetaManagedAgentsTextRubricType
Content string

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

MaxIterations int64 Optional

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

formatint32
type BetaManagedAgentsDeploymentUserMessageEvent struct { Type: "user.message"; Content }

A user message sent to the session.

type BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError struct { Type: "environment_archived_error" }

The deployment's environment was archived.

Type BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType
type BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError struct { Type: "environment_not_found_error" }

The deployment's environment no longer exists.

Type BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType
type BetaManagedAgentsErrorDeploymentPausedReason struct { Type: "error"; Error }

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

Type BetaManagedAgentsErrorDeploymentPausedReasonType
One of the following:
type BetaManagedAgentsFileNotFoundDeploymentPausedReasonError struct { Type: "file_not_found_error" }

A file resource referenced by the deployment no longer exists.

Type BetaManagedAgentsFileNotFoundDeploymentPausedReasonErrorType
type BetaManagedAgentsFileResourceConfig struct { Type: "file"; FileID; MountPath }

A file mounted into each session's container.

Type BetaManagedAgentsFileResourceConfigType
FileID string

ID of a previously uploaded file.

MountPath string Optional

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

type BetaManagedAgentsGitHubRepositoryResourceConfig struct { Type: "github_repository"; URL; Checkout; MountPath }

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

Type BetaManagedAgentsGitHubRepositoryResourceConfigType
URL string

Github URL of the repository

Checkout BetaManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion Optional

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

One of the following:
type BetaManagedAgentsBranchCheckout struct { Type: "branch"; Name }
Type BetaManagedAgentsBranchCheckoutType
Name string

Branch name to check out.

minLength1
maxLength255
type BetaManagedAgentsCommitCheckout struct { Type: "commit"; Sha }
Type BetaManagedAgentsCommitCheckoutType
Sha string

Full commit SHA to check out.

minLength7
maxLength64
MountPath string Optional

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

type BetaManagedAgentsManualDeploymentPausedReason struct { Type: "manual" }

The caller invoked the pause endpoint on the deployment.

Type BetaManagedAgentsManualDeploymentPausedReasonType
type BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonError struct { Type: "mcp_egress_blocked_error" }

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

Type BetaManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType
type BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError struct { Type: "memory_store_archived_error" }

A memory store referenced by the deployment is archived.

Type BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType
type BetaManagedAgentsMemoryStoreResourceConfig struct { Type: "memory_store"; MemoryStoreID; Access; Instructions }

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

Type BetaManagedAgentsMemoryStoreResourceConfigType
MemoryStoreID string

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

Access BetaManagedAgentsMemoryStoreResourceConfigAccess Optional

Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.

One of the following:
const BetaManagedAgentsMemoryStoreResourceConfigAccessReadWrite BetaManagedAgentsMemoryStoreResourceConfigAccess = "read_write"
const BetaManagedAgentsMemoryStoreResourceConfigAccessReadOnly BetaManagedAgentsMemoryStoreResourceConfigAccess = "read_only"
Instructions string Optional

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

type BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonError struct { Type: "organization_disabled_error" }

The deployment's organization is disabled.

Type BetaManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType
type BetaManagedAgentsSchedule struct { Type: "cron"; Expression; Timezone; /* 2 more */ }

A recurring schedule with computed runtime timestamps. Discriminated union — only cron is supported currently.

Type BetaManagedAgentsScheduleType
Expression string

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 string

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

minLength1
LastRunAt Time Optional

Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.

formatdate-time
UpcomingRunsAt []Time Optional

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.

type BetaManagedAgentsScheduleParams struct { Type: "cron"; Expression; Timezone }

A recurring schedule. Discriminated union — only cron is supported currently.

Type BetaManagedAgentsScheduleParamsType
Expression string

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 string

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

minLength1
type BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError struct { Type: "self_hosted_resources_unsupported_error" }

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

Type BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType
type BetaManagedAgentsSessionResourceConfigUnion interface{…}

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

One of the following:
type BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError struct { Type: "session_resource_not_found_error" }

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

Type BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType
type BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError struct { Type: "skill_not_found_error" }

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

Type BetaManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType
type BetaManagedAgentsUnknownDeploymentPausedReasonError struct { Type: "unknown_error" }

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

Type BetaManagedAgentsUnknownDeploymentPausedReasonErrorType
type BetaManagedAgentsVaultArchivedDeploymentPausedReasonError struct { Type: "vault_archived_error" }

A vault referenced by the deployment is archived.

Type BetaManagedAgentsVaultArchivedDeploymentPausedReasonErrorType
type BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError struct { Type: "vault_not_found_error" }

A vault referenced by the deployment no longer exists.

Type BetaManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType
type BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError struct { Type: "workspace_archived_error" }

The deployment's workspace was archived.

Type BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType