---
title: "Sandboxed AI Agents and WebAssembly on Kubernetes | Cosmonic Control"
description: "Run AI agents and their tools on Kubernetes, each in its own deny-by-default sandbox, governed by RBAC and admission policy. 1.75M agents on one server, scale to zero, air-gap ready."
canonical: "https://cosmonic.com/control/"
---

Kubernetes-native · Cloud, on-prem, or air-gapped

# Agents by the million on the Kubernetes you already run.

Cosmonic Control gives **every agent and every tool its own deny-by-default sandbox**, packs many into shared host pods, and governs them with your RBAC and admission policy, on infrastructure you run.

[Install Cosmonic Control →](https://cosmonic.com/docs/install-cosmonic-control/) [Talk to us](mailto:support@cosmonic.com?subject=Cosmonic%20Control)

Runs on any Kubernetes · Helm install in minutes · Free to start

Agents on Kubernetes

## A sandbox for every agent and every tool

Enterprises build two kinds of agents:

- **General-purpose agents** are open-ended assistants for employees.
- **Special-purpose agents** have one job and the tools for it, and a company might run dozens for every customer.

Control sandboxes both, then goes further for special-purpose agents at scale: many sandboxes share one host pod, and each reaches only what it was granted.

### Grants live in the manifest

Everything an agent or tool can reach is a line in its Workload. RBAC decides who may apply it, and the Kyverno and ValidatingAdmissionPolicy sets that ship with Control check it.

### The host holds the keys

The host makes every model call, to the OpenAI-compatible endpoint or Anthropic you choose, with credentials the agent never holds.

### Sessions live outside the agent

Each conversation is encrypted and kept in NATS JetStream on your cluster, so an agent picks up where it left off on any host.

### Runs start over HTTP or NATS

Start a run with an HTTP request in the OpenAI Responses API format or a NATS message. Agents built with the open source [Agent SDK](https://cosmonic.com/agent-sdk/) run on Desktop and Control without changes.

[Run an agent on Cosmonic Control](https://cosmonic.com/docs/agent-sdk/run-on-control/)

Kubernetes-native

## Deploy sandboxes like any other workload

Control is a distributed control plane for sandboxed workloads. Platform teams deploy and manage workloads with the tools they already use like **Helm, kubectl, and GitOps**. Developers just build and publish components.

**Operator and developer concerns stay separate.** Start with the [install guide](https://cosmonic.com/docs/install-cosmonic-control/), then see the [custom resources](https://cosmonic.com/docs/custom-resources/) you deploy with.

kind: Workload github-summarizer (MCP server)

net → api.github.com:443 granted

net → \* (all other hosts) denied

fs → cluster volumes, secrets denied

env → other tenants' config denied

*Your existing CI/CD delivers Wasm components through Control onto multi-tenant Kubernetes hosts, densely packed beside your pods and containers.*

Use cases

## What teams run on Control

Whether you're deploying agent code, untrusted plugins, or high-density services, Cosmonic Control provides sandboxing that works everywhere from the cloud to highly regulated environments.

### Agents & MCP servers

Run the agents, [MCP servers](https://cosmonic.com/docs/securely-deploy-mcp-on-kubernetes/), and AI-generated code your teams build at cluster scale, each one capability-bounded, with 1.75 million agents held on a single server.

### Untrusted & third-party code

Execute customer plugins, partner logic, and other code from outside your trust boundary [deny-by-default](https://cosmonic.com/ai-sandbox/), each in its own sandbox with only its own grants. Teams that need separate processes or nodes get their own host group.

### High-density services

Replace idle-heavy containers and microVMs with sandboxes that scale to zero: [denser and cheaper](https://cosmonic.com/control/agent-density/) on the Kubernetes you already run.

### Regulated & air-gapped

Run in classified, sovereign, or offline environments. [Mirror every image to your registry](https://cosmonic.com/docs/operations/air-gapped-installation/) and keep code and data inside the cluster.

Density that changes the math

## Pack more onto every node

A container or microVM carries its own OS and idle cost for every workload. A Cosmonic sandbox carries no OS, holds kilobytes while it waits, and wakes when work arrives. So one server holds what used to take a fleet.

1.75 million

agents on one server, each in its own sandbox

~70 KB

memory per agent while it waits for a message

72,000 / s

agents started, every one answered

Measured on one Cosmonic Control host on an AWS EC2 c9g.16xlarge (64 Arm cores, 128 GB), 9 November 2026, with the Codex harness and a mock model. [See the data and method](https://cosmonic.com/control/agent-density/). Sandbox workloads are WebAssembly components running on CNCF [wasmCloud](https://wasmcloud.com/), the open source runtime Control embeds. Open standards and an open source runtime mean no lock-in.

Your infrastructure

## Cloud, on-prem, or fully air-gapped

Control installs on any Kubernetes cluster with Helm. Your code and data never leave the cluster: designed from the ground up for regulated, sovereign, and classified environments.

### Any Kubernetes

Managed cloud (EKS, GKE, AKS) or your own distribution. If it runs Kubernetes, it runs Control.

### On-prem & private cloud

Run in your own data center, including a documented path for VMware vSphere / VKS.

### Air-gapped

Mirror every chart and image to your internal registry and install with no connection to the public internet.

Runs on any Kubernetes

![Kubernetes](https://cosmonic.com/control/logos/kubernetes.png) ![Amazon EKS](https://cosmonic.com/control/logos/eks.png) ![Google GKE](https://cosmonic.com/control/logos/gke.png) ![Microsoft Azure AKS](https://cosmonic.com/control/logos/aks.png) ![Red Hat OpenShift](https://cosmonic.com/control/logos/openshift.png) ![VMware Cloud Foundation](https://cosmonic.com/control/logos/vmware.png) ![Rancher by SUSE](https://cosmonic.com/control/logos/rancher.png) ![K3s](https://cosmonic.com/control/logos/k3s.png)

Platform engineering

## One platform, many teams

Control gives a platform team the governance and visibility to run everyone's workloads on shared infrastructure, safely. It's the secure-compute layer your internal developer platform runs on: dense, sandboxed Wasm workloads behind the golden paths your teams already use.

Multi-tenancy & RBAC

[Isolate teams by namespace and tenant](https://cosmonic.com/docs/multitenancy/), with [per-tenant access control](https://cosmonic.com/docs/operations/tenant-rbac/).

Built-in observability

Metrics, logs, and traces out of the box: Prometheus, Loki, Tempo, and dashboards.

Autoscaling & scale-to-zero

Workloads scale with demand and cost nothing while idle.

GPU hosts

Schedule AI and inference workloads onto NVIDIA GPU nodes.

GitOps-native

Workloads are CRDs and OCI artifacts, so your existing pipelines manage them.

Ingress & egress control

Built-in ingress routes traffic to workloads; egress stays denied except where you allow it.

Integrates with your stack

![GitHub](https://cosmonic.com/control/logos/github.png) ![Argo CD](https://cosmonic.com/control/logos/argo.png) ![NATS](https://cosmonic.com/control/logos/nats.png) ![Jaeger](https://cosmonic.com/control/logos/jaeger.png) ![Envoy](https://cosmonic.com/control/logos/envoy.png) ![Backstage](https://cosmonic.com/control/logos/backstage.png) ![wasmCloud](https://cosmonic.com/control/logos/wasmcloud.png)

Desktop to cluster

## From laptop to launch

Develop and sandbox agents, MCP servers, and AI-generated code locally with [Cosmonic Desktop](https://cosmonic.com/desktop/), then run the exact same capability-bounded workloads at cluster scale with Control. Same model, same manifest, no rewrite between your laptop and production. Agents built with the Agent SDK run on both without changes.

[Install Cosmonic Desktop (Beta) →](https://learn.cosmonic.com/cosmonic-desktop-beta?utm_source=apex&utm_medium=control_continuum&utm_campaign=desktop_beta)

wasmCloud and Cosmonic Control

## Open source at the core, built for the enterprise

**wasmCloud**, a CNCF project, is a cloud native platform for running WebAssembly workloads across any cloud, Kubernetes, datacenter, or edge. **Cosmonic Control** is the enterprise distribution of wasmCloud, bringing WebAssembly sandboxing to enterprise Kubernetes environments.

*What Cosmonic Control adds to open source wasmCloud*

|  | wasmCloud (open source) | Cosmonic Control |
| --- | --- | --- |
| Platform |  |  |
| Sandbox runtime | The [open source host](https://wasmcloud.com) that runs each component deny-by-default. | The same open source host, built with Cosmonic's host plugins. |
| Ingress and routing | Hosts serve HTTP by hostname. You build the routing in front of them. | [Built-in ingress](https://cosmonic.com/docs/operations/ingress-and-workloads/) with load balancing, and the option to plug in to your existing mesh. Requests are spread across every host running a workload, a failed host is taken out of rotation automatically, and you can split traffic between versions for gradual rollouts. Control keeps Envoy up to date over xDS as workloads change. |
| Kubernetes | An operator and Workload CRDs. | Adds [ProjectEnvironment roles](https://cosmonic.com/docs/operations/tenant-rbac/) (owner, admin, member, viewer) for each team on Enterprise. |
| Messaging | You run and secure your own NATS. | [Nexus](https://cosmonic.com/docs/operations/nexus-auth-and-tls/): NATS with JetStream, TLS and authentication on by default, and scheduled backups. |
| Security |  |  |
| Workload identity | The runtime tells each plugin which workload and component is calling. | The Kafka, NATS, and agent plugins authorize every call on that host-asserted identity and the grants you declare. Hosts and the Cosmonic operator [authenticate to Nexus](https://cosmonic.com/docs/operations/nexus-auth-and-tls/#how-clients-prove-who-they-are) with Kubernetes ServiceAccount tokens. |
| Credential brokering | Kubernetes Secrets are handed to the workload, which makes the call itself. | Host plugins [broker each credential](https://cosmonic.com/ai-sandbox/principles/policy-enforcement-points/), holding it and making the call themselves. Model keys and NATS credentials never enter a component, and Kafka credentials stay on the host once you claim them as host-owned, so a compromised component has no secret to leak. |
| Policy | Build it yourself. | [Kyverno and ValidatingAdmissionPolicy sets](https://cosmonic.com/docs/operations/securing-a-cluster/#admission-policies) for egress, registries, image digests, host interfaces, placement and limits. |
| Vulnerability response | The project's [public security policy](https://github.com/wasmCloud/wasmCloud/blob/main/SECURITY.md). | A private reporting address, security fixes shipped as patch releases on the current release line, and response SLAs available on Enterprise. |
| Agents and integrations |  |  |
| Agents | Build it yourself. | The host makes every model call, keeps each session encrypted, and [starts runs over HTTP or NATS](https://cosmonic.com/docs/agent-sdk/run-on-control/). Agents are never given credentials. |
| Agent SDK | Build it yourself. | Runs agents built with the open source [Cosmonic Agent SDK](https://cosmonic.com/docs/agent-sdk/). The same agent runs on Cosmonic Desktop and on Control without changes. |
| GPU model serving | Build it yourself. | A GPU host image and an [OpenAI-compatible API](https://cosmonic.com/docs/operations/openai-compatible-llm/) (chat completions, Responses, and embeddings) that serves open-weight models from a sandboxed component on your own GPU nodes. |
| Connections to your systems | Core interfaces such as HTTP, NATS, and key-value. | Host plugins for [Kafka](https://cosmonic.com/docs/api-reference/cosmonic-kafka/), GitHub, and code workspaces. The host owns each connection and its credentials, and enforces every workload's grants, down to Kafka topics. |
| Operations |  |  |
| High availability | You size and spread the replicas yourself. | [Highly available by default](https://cosmonic.com/docs/operations/high-availability/). On a cluster of three or more nodes, Control keeps serving traffic and running workloads through the loss of a pod or a node, with no extra setup. |
| Autoscaling | WorkloadDeployments scale with the Kubernetes [Horizontal Pod Autoscaler or KEDA](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/autoscaling). | The same autoscalers, with routing that keeps up: an HTTPTrigger sends traffic to the deployment being scaled, and each side of a weighted split scales on its own. |
| Observability | OpenTelemetry signals from the host. | A bundled collector, Prometheus, Loki and Tempo, with [Perses dashboards](https://cosmonic.com/docs/observability/) for hosts, workloads and Nexus, and opt-in traces that follow one request from Envoy through the host to the component. |
| Releases | Community releases. | Supported release lines with patch releases, signed build provenance on every image, and a single setting that points every image at your own registry for [air-gapped installs](https://cosmonic.com/docs/operations/air-gapped-installation/). |
| Support | Community support. | Community support on the free tier. [Enterprise](https://cosmonic.com/control/#pricing) adds support from the Cosmonic engineers who build Control, with SLAs available. |

### No lock-in to Cosmonic

Control is compatible with open source [wasmCloud](https://wasmcloud.com) hosts and runs wasmCloud workloads. A workload built on standard interfaces runs unchanged on either, so you can move to plain wasmCloud whenever you choose.

### Portable, standard components

Workloads are WebAssembly components built to the W3C Component Model and WASI, shipped as ordinary OCI artifacts. They run on any conformant host, so nothing you build is trapped in Cosmonic.

### Fits the stack you already run

Kubernetes-native CRDs and an operator, standard OCI registries, and your own CI/CD, RBAC, and observability. No parallel platform to buy into, and no bespoke format to migrate off later.

[![wasmCloud](https://cosmonic.com/docs/img/logo-wasmCloud.svg)](https://wasmcloud.com)

Powered by wasmCloud, the open source WebAssembly platform donated to the CNCF. The runtime that enforces your sandboxes is open to inspect, fork, and self-host.

Pricing

## Free to start, enterprise when you need it

Install the full control plane on any cluster for free. Enterprise adds the controls and support that production platforms require.

Free

### Free to get started

The full sandbox and control plane on your own Kubernetes.

- ✓ The deny-by-default WebAssembly sandbox
- ✓ CRDs, operator, and Perses dashboards
- ✓ [Built-in observability](https://cosmonic.com/docs/observability/)
- ✓ Community support

[Read the install guide →](https://cosmonic.com/docs/install-cosmonic-control/)

Enterprise

### Talk to us

For production platforms and regulated environments.

- ✓ Unlimited HTTPTriggers per namespace
- ✓ [Project grouping](https://cosmonic.com/docs/custom-resources/#projectenvironment) and the Artifact pre-fetch controller
- ✓ [Air-gapped](https://cosmonic.com/docs/operations/air-gapped-installation/) and on-prem deployment support
- ✓ Support and SLAs

[Talk to us →](mailto:support@cosmonic.com?subject=Cosmonic%20Control%20enterprise)

FAQ

## Agents and WebAssembly on Kubernetes, answered

**Can I run AI agents on Kubernetes with Cosmonic Control?**

Yes. You deploy agents with `kubectl apply`, like any other workload. Each agent and each of its tools runs in its own deny-by-default sandbox inside shared host pods, the host makes every model call with credentials the agent never holds, and runs start over HTTP or NATS. [Run an agent on Cosmonic Control](https://cosmonic.com/docs/agent-sdk/run-on-control/) walks through it.

**How is this different from the Kubernetes Agent Sandbox project?**

Agent Sandbox manages one isolated, stateful pod per agent. Cosmonic Control sandboxes any agent, and goes further for special-purpose agents at scale. It isolates each agent and tool inside shared host pods, with per-component grants that admission policy can check.

**How is Cosmonic Control different from wasmCloud?**

wasmCloud is the open source runtime: it runs each WebAssembly component in its own deny-by-default sandbox. Cosmonic Control runs that same host and adds the platform around it: Nexus, a managed NATS with TLS, authentication and backups; host plugins that hold credentials for model calls, Kafka and GitHub so workloads never see them; Kyverno and ValidatingAdmissionPolicy sets; Envoy ingress; bundled observability with Perses dashboards; and supported release lines with Cosmonic support. [See the comparison](https://cosmonic.com/control/#open-standards).

**Am I locked in to Cosmonic?**

No. Cosmonic Control is compatible with open source wasmCloud hosts and runs wasmCloud workloads. Workloads are standard WebAssembly components shipped as OCI artifacts, so a workload built on standard interfaces runs unchanged on plain wasmCloud. Only workloads that use Control's own host plugins, such as the Kafka or agent plugins, need Control.

**Can I enforce agent policy with Kyverno or ValidatingAdmissionPolicy?**

Yes. Cosmonic Control ships equivalent policy sets for both, covering egress, registries, image digests, host interfaces, placement, and limits.

**Can you run WebAssembly on Kubernetes?**

Yes. Cosmonic Control installs on any Kubernetes cluster with Helm and runs WebAssembly components as first-class workloads through Kubernetes operators and CRDs, alongside your existing containers.

**How is a WebAssembly workload different from a container?**

A WebAssembly component carries no operating system and runs deny-by-default: no file, network, or host access until granted. That makes it small enough to give every agent and every tool its own sandbox. On one server, Control has held 1.75 million agents, about 70 KB each while idle.

**Can Cosmonic Control run in an air-gapped Kubernetes cluster?**

Yes. Mirror every chart and image to your internal registry and install with no connection to the public internet. Your code and data never leave the cluster.

**How does it scale workloads to zero?**

Idle WebAssembly workloads cost nothing to run. Control scales them to zero and starts them again when work arrives, so you reclaim the idle capacity a per-pod container footprint would hold.

**Does it support multi-tenancy?**

Yes. Teams are isolated by namespace and tenant with per-tenant RBAC, so a platform team can run many teams' workloads on shared infrastructure safely.

**Does it work with my GitOps pipeline?**

Workloads are CRDs and OCI artifacts, so your existing GitOps tooling (Argo CD, Helm, GitHub Actions) manages them like any other Kubernetes resource.

**Does Cosmonic Control replace my internal developer platform?**

No. Control is the secure-compute layer an internal developer platform runs on. It exposes workloads as CRDs and OCI artifacts behind your existing tooling (Backstage, Argo CD, Helm), so platform teams add dense, sandboxed Wasm compute without swapping their portal.

Get started

## Bring the sandbox to your cluster

Install Cosmonic Control free on any Kubernetes cluster, or talk to us about enterprise and air-gapped deployments.

[Install Cosmonic Control →](https://cosmonic.com/docs/install-cosmonic-control/) [Talk to us](mailto:support@cosmonic.com?subject=Cosmonic%20Control)

Any Kubernetes · Cloud, on-prem, or air-gapped
