This guide walks through deploying sandboxes on a CoreWeave Kubernetes Service (CKS) cluster end to end. You’ll do the following:Documentation Index
Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
Use this file to discover all available pages before exploring further.
- Create a profile
- Deploy a runner
- Run your first sandbox from the Python client
- Delete the runner when you’re done.
cwic) and through direct curl calls against the control plane REST API. Pick whichever fits your workflow. The wizard and from-file cwic tabs are equivalent; the from-file and curl tabs accept YAML or JSON bodies, which makes them a natural interface for CI scripts and for agents (such as Claude Code or Codex) that author profile and runner specs on your behalf.
CoreWeave sandboxes are in public preview. For access, contact your CoreWeave account team, reach out to CoreWeave Support, or email support@coreweave.com.
Prerequisites
For the administrator steps, complete the following:- A CKS cluster in your CoreWeave organization, in the
STATUS_RUNNINGstate. View your clusters and their status on the Clusters page in the cloud console. Note the cluster’s zone and name; both are reused below. - The
SANDBOX_ADMINaction in Identity and Access Management (IAM), which lets you create profiles and runners. Create or update a policy that grants this action on the Access Policies page in the cloud console. - A CoreWeave API access token. Generate one from the Tokens page in the cloud console and copy the Token Secret value. For more on tokens, see Manage API Access Tokens.
- cwic
- curl
Install the CoreWeave Intelligent CLI (The token is stored in your local cwic config; subsequent cwic commands read it automatically. There is no environment variable to set.
cwic), then sign in with the token:- The
SANDBOX_USERIAM action, which lets you create sandboxes against the data plane. GrantingSANDBOX_ADMINalso grantsSANDBOX_USER. - A CoreWeave API access token. For more information, see Manage API Access Tokens.
- Python 3.11 or newer in the environment that runs the SDK. The Python version inside the sandbox is independent and is set by the
container_imageyou pass toSandbox.run()or by the profile’s default.
Create a profile
A profile defines the execution environment for sandboxes a runner produces: namespace strategy, network policies, and pod constraints. Create one before you deploy a runner. The example profile below uses a per-user namespace strategy and denies all outbound network access from sandboxes. Adjust the network policy for your environment: switch the modetype to internet for unrestricted egress, allowlist to permit specific CIDRs, or org, profile, or user to scope traffic to other sandboxes you control. Available egress types are internet, user, org, profile, allowlist, and none. For namespace strategies, ingress, pod placement, and binding management, see Configure a sandbox profile.
The cwic from-file tab uses this YAML body. Save it as profile.yaml:
- cwic wizard
- cwic from file
- curl
The wizard collects display name, description, namespace strategy, and egress modes interactively, then opens your editor with a pre-filled spec to review before submitting:
Deploy a runner on a CKS cluster
A runner is the Kubernetes workload that schedules sandbox pods on your cluster. CoreWeave operates the runner. You deploy it on a specific cluster.- Cloud console
- cwic wizard
- cwic from file
- curl
The cloud console deploy flow requires at least one profile to already exist for your organization. Create a profile before you use this tab.
- Open the Clusters page in the cloud console.
- Select the cluster you want to deploy a runner on.
- In the Sandbox runner card, click Enable sandbox runner.
Pending to Ready. The runner then accepts sandbox requests.Run your first sandbox
Wait for the runner to reach theReady state before you send sandbox requests:
-
Cloud console: Open the cluster’s Sandbox runner card and watch the status badge until it shows
Ready. -
cwic: Run
cwic sandbox runner get [RUNNER-ID]and look forINSTALLto beREADY. For a longer view, usecwic sandbox runner describe [RUNNER-ID]. -
curl: Poll the runner until
installStatusisREADY:
Ready, anyone in your organization with a CoreWeave API access token can create sandboxes against it.
To install the SDK, run:
CWSANDBOX_API_KEY. For more information, see Manage API Access Tokens.
Hello! appears in the output.
This example does the following:
Sandbox.run()creates a sandbox using the runner’s default profile and returns it inside a context manager. The sandbox tears down on context exit.exec()runs a command inside the sandbox and returns aProcessobject..result()waits for the command to complete and returns the output.
Disable the runner
When you no longer need sandboxes on the cluster, disable the runner. The runner is removed from the cluster and stops accepting sandbox requests. Stop running sandboxes from the Python client before you disable the runner if you need clean teardown.- Cloud console
- cwic
- curl
- Open the cluster’s Sandbox runner card.
- Click Disable sandbox runner and confirm.
Next steps
The following resources cover next steps:- The Python client page introduces the SDK and links into reference material.
- The Python client tutorial walks through configuration, command execution, file operations, and cleanup.
- The Python client guides cover lifecycle, streaming, RL training, SWE-bench, SUNK integration, and other advanced topics.