Claude Platform Docs

Environments

Create Environment
$ ant beta:environments create
POST/v1/environments
List Environments
$ ant beta:environments list
GET/v1/environments
Get Environment
$ ant beta:environments retrieve
GET/v1/environments/{environment_id}
Update Environment
$ ant beta:environments update
POST/v1/environments/{environment_id}
Delete Environment
$ ant beta:environments delete
DELETE/v1/environments/{environment_id}
Archive Environment
$ ant beta:environments archive
POST/v1/environments/{environment_id}/archive
Models
beta_cloud_config: object{ networking, packages, type }

cloud environment configuration.

beta_cloud_config_params: object{ type, networking, packages }

Request params for cloud environment configuration.

Fields default to null; on update, omitted fields preserve the existing value.

beta_environment: object{ id, archived_at, config, 7 more }

Unified Environment resource for both cloud and self-hosted environments.

beta_environment_delete_response: object{ id, type }

Response after deleting an environment.

id: string

Environment identifier

type: "environment_deleted"

The type of response

beta_limited_network: object{ allow_mcp_servers, allow_package_managers, allowed_hosts, type }

Limited network access.

allow_mcp_servers: boolean

Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the allowed_hosts array.

allow_package_managers: boolean

Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the allowed_hosts array.

allowed_hosts: array of string

Specifies domains the container can reach.

type: "limited"

Network policy type

beta_limited_network_params: object{ type, allow_mcp_servers, allow_package_managers, allowed_hosts }

Limited network request params.

Fields default to null; on update, omitted fields preserve the existing value.

type: "limited"

Network policy type

allow_mcp_servers: optional boolean

Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the allowed_hosts array. Defaults to false.

allow_package_managers: optional boolean

Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the allowed_hosts array. Defaults to false on creation. Must be true when packages are specified.

allowed_hosts: optional array of string

Specifies domains the container can reach.

beta_packages: object{ apt, cargo, gem, 4 more }

Packages (and their versions) available in this environment.

apt: array of string

Ubuntu/Debian packages to install

cargo: array of string

Rust packages to install

gem: array of string

Ruby packages to install

go: array of string

Go packages to install

npm: array of string

Node.js packages to install

pip: array of string

Python packages to install

type: optional "packages"

Package configuration type

beta_packages_params: object{ apt, cargo, gem, 4 more }

Specify packages (and optionally their versions) available in this environment.

When versioning, use the version semantics relevant for the package manager, e.g. for pip use package==1.0.0. You are responsible for validating the package and version exist. Unversioned installs the latest.

Under limited networking, requires networking.allow_package_managers to be true.

apt: optional array of string

Ubuntu/Debian packages to install

cargo: optional array of string

Rust packages to install

gem: optional array of string

Ruby packages to install

go: optional array of string

Go packages to install

npm: optional array of string

Node.js packages to install

pip: optional array of string

Python packages to install

type: optional "packages"

Package configuration type

beta_self_hosted_config: object{ type }

Configuration for self-hosted environments.

type: "self_hosted"

Environment type

beta_self_hosted_config_params: object{ type }

Request params for self_hosted environment configuration.

type: "self_hosted"

Environment type

beta_unrestricted_network: object{ type }

Unrestricted network access.

type: "unrestricted"

Network policy type

EnvironmentsWork

Get Work Item
$ ant beta:environments:work retrieve
GET/v1/environments/{environment_id}/work/{work_id}
Poll for Work
$ ant beta:environments:work poll
GET/v1/environments/{environment_id}/work/poll
Acknowledge Work
$ ant beta:environments:work ack
POST/v1/environments/{environment_id}/work/{work_id}/ack
Record Heartbeat
$ ant beta:environments:work heartbeat
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat
Stop Work
$ ant beta:environments:work stop
POST/v1/environments/{environment_id}/work/{work_id}/stop
List Work Items
$ ant beta:environments:work list
GET/v1/environments/{environment_id}/work
Update Work Item
$ ant beta:environments:work update
POST/v1/environments/{environment_id}/work/{work_id}
Get Queue Statistics
$ ant beta:environments:work stats
GET/v1/environments/{environment_id}/work/stats