CWSANDBOX_NO_SUITABLE_RUNNER (or CWSANDBOX_PROFILE_MISMATCH if the client asked for a specific profile) and reports which capabilities or resources caused the rejection, so the client knows whether to retry with a smaller request, ask the admin for a more permissive profile, or pick a different runner.
CoreWeave sandboxes are in public preview. For access, contact your CoreWeave account team, CoreWeave Support, or email support@coreweave.com.
Before you begin
Profiles are created and managed with the CoreWeave Intelligent CLI (cwic). Install and authenticate it before running any of the commands on this page.
YAML examples on this page show only the most relevant spec fields for the section you’re reading. A complete profile also needs a top-level display_name (and optionally description and labels). The Get started walkthrough and the Profile reference show a full example.
Profile commands
Thecwic sandbox profile group manages profiles. Binding a profile to a runner is a runner operation, covered at the end of this page.
All input accepts YAML or JSON. The runner edit command is how you change which profiles a runner exposes. See Manage profile bindings.
Create a profile
You can create a profile interactively with the wizard or non-interactively from a file. The wizard collects display name, description, namespace strategy, and egress modes interactively, then opens your editor with a pre-filled spec so you can add ingress, runtime class, or pod overrides before submitting.- Display name (required, unique within your organization).
- Description (optional).
- Namespace strategy, one of
per-user,per-profile,per-org,static. The wizard prompts for the namespace name when you pickstatic. See Choose a namespace strategy for what each option means. - Egress modes, multi-select from
internet,user,org,profile,allowlist,none. Forallowlist, the wizard asks for a mode name and CIDR list. See Configure egress for what each mode allows.
Use a file instead
File mode accepts YAML or JSON. It’s the preferred path for repeatable setups and for agents that author profile specs:Set the compute shape
The compute shape determines which image sandboxes run, the resources they receive, and the nodes they land on. These fields live directly underspec and shape the container and the node it runs on.
Use
instance_types for portable intent (this profile wants H100s) and node_selector for cluster-specific labels you control.
Pick a runtime class
runtime_class is a free-form string forwarded as Kubernetes runtimeClassName on the sandbox pod. CoreWeave doesn’t ship a curated list of supported values: you can use any runtime class that you have installed and registered on the target CKS cluster.
Leave runtime_class unset to use the node default (typically runc), which is appropriate for trusted workloads inside your own organization. If you need stronger isolation, install the runtime of your choice on the cluster, define a RuntimeClass object that references it, and set runtime_class in the profile to that object’s name.
A profile that references a runtime class the cluster lacks fails to schedule sandboxes. The runner surfaces the error.
Choose a namespace strategy
spec.namespace controls which Kubernetes namespace each sandbox lands in. The strategy you pick determines how Kubernetes groups sandboxes for organizational boundaries that it scopes by namespace: resource quotas, NetworkPolicies, RBAC, secrets, service discovery, and per-namespace cost allocation. A finer-grained strategy gives you tighter blast radius for those mechanisms and easier per-user or per-profile accounting.
Namespaces are an organizational boundary, not a security one. Two pods in different namespaces still share the node kernel. For untrusted workloads (for example, model-generated commands or third-party code), rely on runtime_class (see Pick a runtime class) and spec.network for the actual isolation, and use the namespace strategy on top to keep accounting, quotas, and policy clean.
Additional fields:
namespacePrefixis prepended to autogenerated names. Keep it short. Namespaces have a 63-character limit.staticNamespaceis required whenstrategy: static. Must be a valid DNS-1123 label.autoCreatedefaults totrue. Set it tofalsewhen you provision namespaces out-of-band.labelsandannotationsapply to autocreated namespaces. Useful for policy engines and cost allocation.
Configure egress
spec.network.egress controls outbound traffic. You declare named modes and pick one as the default. Sandboxes inherit the default unless they opt into a different mode at launch.
If you omit spec.network entirely, sandboxes default to no outbound connectivity.
The “Examples” column is illustrative, not prescriptive: a mode is appropriate any time its reachability semantics match what your workload needs.
Allowlist a fixed set of upstreams
A test runner that only needs GitHub and a public CDN:Offer a split posture
Expose two modes so most sandboxes get internet while specific jobs opt intonone:
egress: deny-all get no outbound. Everything else inherits the default.
Expose sandbox ports with ingress
Ingress configuration controls how sandbox users reach ports inside their sandboxes. Underspec.network.ingress, you define one or more named exposure levels. Each level is a reachability tier (for example, internal for sandboxes inside the organization or public for endpoints reachable from the open internet) that you configure with a scope and a Kubernetes Service strategy. When sandbox users expose a port, they pick from these names.
The following example defines two levels, internal and public:
Scope
Service configuration
Every exposure level creates a Kubernetes Service in front of the sandbox pod.service.serviceType picks which Service type the runner creates: ClusterIP for in-cluster reachability, NodePort to reach the sandbox through any cluster node’s IP on an allocated port, or LoadBalancer for an externally provisioned address.
Two optional annotation fields plug into cluster add-ons:
service.serviceSelectorAnnotationpins which address pool allocates the external address (for example, MetalLB).service.dnsAnnotationlets a DNS controller (for example, ExternalDNS) provision a record for the sandbox.
{key, value} pairs.
Ingress resource
When the exposure level needs an HTTP entry point in addition to a Service (for example, a public hostname routed by your cluster’s ingress controller), set theingress block. The runner creates a Kubernetes Ingress resource alongside the Service:
controllerNamematches your cluster’s ingress controller (for example,nginxoristio) and selects which controller programs the route.templateis a Go-template string that produces the hostname for each sandbox. Available variables are{{.SandboxID}}and{{.Namespace}}.
expectsExternalAddress
Set to true when the exposure needs a provisioned external IP before the sandbox is considered ready. The control plane waits for the LoadBalancer or ingress controller to assign an address before marking the sandbox healthy.
Fine-grained pod control
The preceding fields cover most profiles. When you need direct control over the underlying Kubernetes pod,spec.pod exposes a partial PodSpec plus pod metadata. Use it for fields the structured profile shape doesn’t model: volumes, init containers, security context, tolerations, scheduler-specific annotations, and similar pod settings.
sandbox-id) that it manages itself.
If you only need to pin instance types, prefer the top-level spec.instance_types. Keep spec.pod for the cases that need PodSpec depth.
Schedule sandboxes through the SUNK Pod Scheduler
On a cluster that runs CoreWeave SUNK, you can usespec.pod to route sandbox pods through the SUNK Pod Scheduler so they run on nodes managed by SUNK, and can even share nodes with Slurm jobs. The profile sets schedulerName and the SUNK annotations on the pod. Sandboxes launched against the profile then flow through Slurm for placement.
See SUNK Pod Scheduler integration for an end-to-end walkthrough including the profile YAML, the required terminationGracePeriodSeconds value, and how to drive placement with annotations such as sunk.coreweave.com/partition. For the underlying scheduler behavior and annotation contract, see the SUNK Pod Scheduler reference.
Manage profile bindings
Bindings determine which profiles a runner exposes to sandbox users. A binding attaches a profile to a runner so the runner enforces that profile’s policies and guardrails for every sandbox it places. Bindings live inside the runner object, not as standalone resources. Update bindings withcwic sandbox runner edit:
profile_bindings list. The control plane replaces the entire list in one transaction. The control plane detaches any binding you omit from the patch, so the patch must include every binding you want to keep, not only the ones you’re adding or changing. Matching is by profile_template_id, the on-wire field name for the profile’s ID.
profile_template_id, the ID of the profile being referenced.profile_name, an optional alias sandboxes use to pick this profile at launch. Falls back to the profile’s display name when omitted.is_default, whether this binding is the fallback when a sandbox doesn’t specify a profile. Exactly one binding per runner must betrue.
cwic sandbox runner edit [RUNNER-ID] with no -f) prompts for binding changes interactively if you’d rather not author the patch by hand or through an agent.
Update an existing profile
cwic sandbox profile edit opens the current spec in your editor, then submits the diff:
cwic sandbox runner edit before cwic sandbox profile delete. See Update semantics for the full conceptual picture.
For a safer rollout, version the display name (agent-v1, agent-v2) and migrate runners one at a time by editing each runner’s bindings. When agent-v1 has no remaining bindings, delete it.
Delete a profile
Delete a profile withcwic sandbox profile delete. The argument is a profile ID or its short display name:
--yes to skip the prompt for scripted use, and pass multiple IDs to delete several profiles in one command:
cwic sandbox runner edit before retrying the delete.
Deletion is permanent. Running sandboxes that were launched against the profile continue to run with their original spec, but you can’t launch new sandboxes against a deleted profile.
Next steps
- The Profile reference documents every field with types, defaults, and validation rules.
- Get started walks through deploying a runner end-to-end.