Deployments
Create Deployment
BetaManagedAgentsDeployment Beta.Deployments.Create(parameters, cancellationToken = default)List Deployments
DeploymentListPage Beta.Deployments.List(parameters, cancellationToken = default)Get Deployment
BetaManagedAgentsDeployment Beta.Deployments.Retrieve(parameters, cancellationToken = default)Update Deployment
BetaManagedAgentsDeployment Beta.Deployments.Update(parameters, cancellationToken = default)Archive Deployment
BetaManagedAgentsDeployment Beta.Deployments.Archive(parameters, cancellationToken = default)Run Deployment Now
BetaManagedAgentsDeploymentRun Beta.Deployments.Run(parameters, cancellationToken = default)Pause Deployment
BetaManagedAgentsDeployment Beta.Deployments.Pause(parameters, cancellationToken = default)Unpause Deployment
BetaManagedAgentsDeployment Beta.Deployments.Unpause(parameters, cancellationToken = default)Models
class BetaManagedAgentsAgentArchivedDeploymentPausedReasonError { Type = "agent_archived_error"; }The deployment's agent was archived.
The deployment's agent was archived.
class BetaManagedAgentsCronSchedule { Type = "cron"; Expression; Timezone; /* 2 more */ }5-field POSIX cron schedule with computed runtime timestamps.
5-field POSIX cron schedule with computed runtime timestamps.
required string Expression5-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).
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).
required string TimezoneIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
DateTimeOffset? LastRunAtTime the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.
Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.
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 { Type = "cron"; Expression; Timezone; }5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.
5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.
required string Expression5-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).
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).
required string TimezoneRequired. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.
Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.
class BetaManagedAgentsDeployment { 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.
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.
class BetaManagedAgentsDeploymentInitialEvent: unionAn event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.
An event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.
class BetaManagedAgentsDeploymentUserMessageEvent { Type = "user.message"; Content; }A user message sent to the session.
A user message sent to the session.
class BetaManagedAgentsDeploymentUserDefineOutcomeEvent { Type = "user.define_outcome"; Description; Rubric; MaxIterations; }An outcome the agent should work toward. The agent begins work on receipt.
An outcome the agent should work toward. The agent begins work on receipt.
class BetaManagedAgentsDeploymentSystemMessageEvent { 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.
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.
required IReadOnlyList<BetaManagedAgentsSystemContentBlock> ContentSystem content blocks to append. Text-only.
System content blocks to append. Text-only.
required string TextThe text content.
The text content.
class BetaManagedAgentsDeploymentInitialEventParams: unionAn event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.
An event sent to a session immediately after it is created. Supports user.message, user.define_outcome, and system.message.
class BetaManagedAgentsUserMessageEventParams { Type = "user.message"; Content; }Parameters for sending a user message to the session.
Parameters for sending a user message to the session.
class BetaManagedAgentsUserDefineOutcomeEventParams { Type = "user.define_outcome"; Description; Rubric; MaxIterations; }Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.
Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.
class BetaManagedAgentsSystemMessageEventParams { 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.
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.
required IReadOnlyList<BetaManagedAgentsSystemContentBlock> ContentSystem content blocks to append. Text-only.
System content blocks to append. Text-only.
required string TextThe text content.
The text content.
class BetaManagedAgentsDeploymentPausedReason: unionWhy a deployment is paused. Non-null exactly when status is paused.
Why a deployment is paused. Non-null exactly when status is paused.
class BetaManagedAgentsManualDeploymentPausedReason { Type = "manual"; }The caller invoked the pause endpoint on the deployment.
The caller invoked the pause endpoint on the deployment.
class BetaManagedAgentsErrorDeploymentPausedReason { Type = "error"; Error; }A scheduled fire recorded a failed run whose error auto-pauses the deployment.
A scheduled fire recorded a failed run whose error auto-pauses the deployment.
required BetaManagedAgentsDeploymentPausedReasonError ErrorThe failed run's error.
The failed run's error.
class BetaManagedAgentsDeploymentPausedReasonError: unionThe error that triggered an auto-pause. Matches the failed run's error.type.
The error that triggered an auto-pause. Matches the failed run's error.type.
enum BetaManagedAgentsDeploymentStatusLifecycle status of a deployment.
Lifecycle status of a deployment.
The deployment is active and can run sessions. Archived deployments also report this status; check archived_at to distinguish them.
The deployment is paused. Autonomous triggers are suppressed; manual runs are still permitted.
class BetaManagedAgentsDeploymentSystemMessageEvent { 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.
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.
required IReadOnlyList<BetaManagedAgentsSystemContentBlock> ContentSystem content blocks to append. Text-only.
System content blocks to append. Text-only.
required string TextThe text content.
The text content.
class BetaManagedAgentsDeploymentUserDefineOutcomeEvent { Type = "user.define_outcome"; Description; Rubric; MaxIterations; }An outcome the agent should work toward. The agent begins work on receipt.
An outcome the agent should work toward. The agent begins work on receipt.
class BetaManagedAgentsDeploymentUserMessageEvent { Type = "user.message"; Content; }A user message sent to the session.
A user message sent to the session.
class BetaManagedAgentsEnvironmentArchivedDeploymentPausedReasonError { Type = "environment_archived_error"; }The deployment's environment was archived.
The deployment's environment was archived.
class BetaManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError { Type = "environment_not_found_error"; }The deployment's environment no longer exists.
The deployment's environment no longer exists.
class BetaManagedAgentsErrorDeploymentPausedReason { Type = "error"; Error; }A scheduled fire recorded a failed run whose error auto-pauses the deployment.
A scheduled fire recorded a failed run whose error auto-pauses the deployment.
required BetaManagedAgentsDeploymentPausedReasonError ErrorThe failed run's error.
The failed run's error.
class BetaManagedAgentsFileNotFoundDeploymentPausedReasonError { Type = "file_not_found_error"; }A file resource referenced by the deployment no longer exists.
A file resource referenced by the deployment no longer exists.
class BetaManagedAgentsFileResourceConfig { Type = "file"; FileID; MountPath; }A file mounted into each session's container.
A file mounted into each session's container.
ID of a previously uploaded file.
Mount path in the container. Defaults to /mnt/session/uploads/<file_id>.
class BetaManagedAgentsGitHubRepositoryResourceConfig { Type = "github_repository"; Url; Checkout; MountPath; }A GitHub repository mounted into each session's container. The authorization token is write-only and never returned.
A GitHub repository mounted into each session's container. The authorization token is write-only and never returned.
class BetaManagedAgentsManualDeploymentPausedReason { Type = "manual"; }The caller invoked the pause endpoint on the deployment.
The caller invoked the pause endpoint on the deployment.
class BetaManagedAgentsMcpEgressBlockedDeploymentPausedReasonError { Type = "mcp_egress_blocked_error"; }An MCP server host used by the deployment's agent is blocked by the environment's network policy.
An MCP server host used by the deployment's agent is blocked by the environment's network policy.
class BetaManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError { Type = "memory_store_archived_error"; }A memory store referenced by the deployment is archived.
A memory store referenced by the deployment is archived.
class BetaManagedAgentsMemoryStoreResourceConfig { Type = "memory_store"; MemoryStoreID; Access; Instructions; }A memory store attached to each session created from this deployment.
A memory store attached to each session created from this deployment.
The memory store ID (memstore_...). Must belong to the caller's organization and workspace.
Access? AccessAccess mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.
Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.
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 { Type = "organization_disabled_error"; }The deployment's organization is disabled.
The deployment's organization is disabled.
class BetaManagedAgentsSchedule { Type = "cron"; Expression; Timezone; /* 2 more */ }A recurring schedule with computed runtime timestamps. Discriminated union — only cron is supported currently.
A recurring schedule with computed runtime timestamps. Discriminated union — only cron is supported currently.
required string Expression5-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).
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).
required string TimezoneIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
DateTimeOffset? LastRunAtTime the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.
Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.
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 { Type = "cron"; Expression; Timezone; }A recurring schedule. Discriminated union — only cron is supported currently.
A recurring schedule. Discriminated union — only cron is supported currently.
required string Expression5-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).
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).
required string TimezoneRequired. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.
Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.
class BetaManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError { Type = "self_hosted_resources_unsupported_error"; }The deployment configures resources, but its environment is self-hosted and cannot mount them.
The deployment configures resources, but its environment is self-hosted and cannot mount them.
class BetaManagedAgentsSessionResourceConfig: unionA configured session resource. Echoes the input minus write-only credentials.
A configured session resource. Echoes the input minus write-only credentials.
class BetaManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError { Type = "session_resource_not_found_error"; }A referenced resource no longer exists and its kind was not reported.
A referenced resource no longer exists and its kind was not reported.
class BetaManagedAgentsSkillNotFoundDeploymentPausedReasonError { Type = "skill_not_found_error"; }A skill referenced by the deployment's agent no longer exists.
A skill referenced by the deployment's agent no longer exists.
class BetaManagedAgentsUnknownDeploymentPausedReasonError { Type = "unknown_error"; }An unrecognized error auto-paused the deployment. A fallback variant; matches a run whose error.type is unknown_error.
An unrecognized error auto-paused the deployment. A fallback variant; matches a run whose error.type is unknown_error.
class BetaManagedAgentsVaultArchivedDeploymentPausedReasonError { Type = "vault_archived_error"; }A vault referenced by the deployment is archived.
A vault referenced by the deployment is archived.
class BetaManagedAgentsVaultNotFoundDeploymentPausedReasonError { Type = "vault_not_found_error"; }A vault referenced by the deployment no longer exists.
A vault referenced by the deployment no longer exists.
class BetaManagedAgentsWorkspaceArchivedDeploymentPausedReasonError { Type = "workspace_archived_error"; }The deployment's workspace was archived.
The deployment's workspace was archived.