---
title: "Cosmonic: Sandbox AI agents and tools"
description: "Run every AI agent and tool in its own Cosmonic sandbox: deny-by-default, only the calls you grant, any model through a gateway. Free on macOS, Windows, Linux."
canonical: "https://cosmonic.com/"
---

# Sandbox Agents and Tools

*An AI agent, such as Pi, Codex, or Goose, and two tools run on Cosmonic, each in its own sandbox. Everything is locked and deny-by-default until capabilities are granted: the agent may call user.lookup, reach a model through the LLM gateway, and call tickets.update; the CRM tool may read users at crm.acme.com; the ticket tool may write tickets at tickets.acme.com. The model is pluggable: Claude, ChatGPT, Gemini, DeepSeek, Perplexity, Mistral, Grok, Qwen, Kimi, or a local model through Ollama. You ask the agent to close ticket 4821 for Jane; it looks Jane up, closes the ticket through the tools it was granted, and replies that the ticket is closed. The same sandbox runs on macOS, Windows, Linux, Kubernetes, the major clouds, on-prem, air-gapped, and at the edge.*

Runs on

macOS Windows Linux ![Amazon Web Services](https://cosmonic.com/home/logos/cloud-aws.webp) ![Microsoft Azure](https://cosmonic.com/home/logos/cloud-azure.webp) ![Google Cloud](https://cosmonic.com/home/logos/cloud-gcp.webp) ![Oracle Cloud](https://cosmonic.com/home/logos/cloud-oracle.webp) ![IBM Cloud](https://cosmonic.com/home/logos/cloud-ibm.webp) ![Alibaba Cloud](https://cosmonic.com/home/logos/cloud-alibaba.webp) ![OVHcloud](https://cosmonic.com/home/logos/cloud-ovh.webp) ![Rackspace Technology](https://cosmonic.com/home/logos/cloud-rackspace.webp) ![VMware](https://cosmonic.com/home/logos/cloud-vmware.webp) ![Red Hat OpenShift](https://cosmonic.com/home/logos/cloud-openshift.webp) ![Kubernetes](https://cosmonic.com/home/logos/cloud-k8s.webp) ![Amazon EKS](https://cosmonic.com/home/logos/cloud-eks.webp) ![Azure AKS](https://cosmonic.com/home/logos/cloud-aks.webp) ![Google GKE](https://cosmonic.com/home/logos/cloud-gke.webp) ![K3s](https://cosmonic.com/home/logos/cloud-k3s.webp) ![Rancher by SUSE](https://cosmonic.com/home/logos/cloud-rancher.webp) On-prem Air-gapped Edge

Every agent and every tool runs in **its own sandbox**.

Each starts with **no access** to your files, network, or keys, and can make only the calls **you** grant, through any model you choose.

[Download the Desktop beta](https://learn.cosmonic.com/cosmonic-desktop-beta?utm_source=apex&utm_medium=hero&utm_campaign=desktop_beta) [See how it works](https://cosmonic.com/#agents)

Prompt to sandbox

## A sandbox for your agents

Ask any model for an MCP server, a function, or a whole app. Cosmonic Desktop builds what it writes into a WebAssembly component of a few hundred kilobytes, and runs it in a sandbox that can reach **only what it declared**.

Your coding agent writes and runs code in your name: MCP servers, scripts, and tools, all with access to **your files, network, and keys**.

Run agent code in a **sandbox** instead, where every app starts with no access to any of it until **you** grant it.

[Download the Desktop beta](https://learn.cosmonic.com/cosmonic-desktop-beta?utm_source=apex&utm_medium=agents&utm_campaign=desktop_beta)

[Screen animation: pick an AI, ask it to build an MCP server, watch it land in a 348 KB sandbox, then connect it to the AI tools allowed to use it](https://cosmonic.com/home/sandbox-agents-build-night.mp4)

Works with the agents you already use

Claude Code Codex Gemini CLI Antigravity Kiro OpenClaw opencode Hermes Agent Pi Cowork Cursor Cursor CLI GitHub Copilot Cline Zed Goose Kilo Code Crush Augment CLI Trae Warp

[![CNCF wasmCloud](https://cosmonic.com/home/logos/cloud-wasmcloud.webp) Open source core CNCF wasmCloud](https://wasmcloud.com)

At scale

## And run thousands at once

Even locally.

Containers

120 apps/server

100 MB/app

Cosmonic sandboxes

10,000+ apps/server

~231 KB idle

A fresh sandbox per call is cheap, and idle ones cost nothing, so you can sandbox everything you run without taxing your laptop. Real numbers vary with what your workloads do.

How it works

## Move fast and trust nothing

Most software runs with **too much access** to your files, keys, network, and more.

Cosmonic sandboxes can only reach what you allow. It isn’t that the code tries something and gets blocked. It has no way to try.

Inspect · read before it runs

github-mcp Component 1.9 MB on disk

Can reach only what you granted

Network api.github.com

Never granted never requested, never reachable

All other network

Your files & home folder

Secrets & keys

*A real MCP server from Cosmonic Desktop’s built-in app catalog: it reaches GitHub’s API and nothing else. [More on the AI sandbox for agent code →](https://cosmonic.com/ai-sandbox/)*

What you build

## Sandbox all the things

Containers give code far more access than it needs, and they get heavy when you run a lot of them. Put AI-generated apps, MCP servers, and other untrusted code in a sandbox instead: usually a few hundred kilobytes to a few megabytes, with only the capabilities you grant.

### Agents

The agent itself, boxed in with the tools it calls.

### MCP servers

Give a model a tool without giving it your machine.

### Agent-written code

The script your agent just wrote, no trust required.

### Functions

One job, small and quick to start.

### Workflows

Chain apps into a pipeline; swap a step without a rebuild.

### Apps

The whole thing, front to back, running the same way everywhere.

Two ways in

## Start on your laptop. Ship on your cluster.

Cosmonic Desktop · Public beta

### Run the sandbox on your own machine

Runs entirely on your machine, online or off. Everything local is free, and stays free.

- Works with any coding agent that speaks MCP: Claude Code, Codex, Gemini, opencode, local models
- Inspect exactly what each app can reach
- The same manifest you deploy to production
- macOS, Windows, and Linux

[Download the Desktop beta](https://learn.cosmonic.com/cosmonic-desktop-beta?utm_source=apex&utm_medium=products&utm_campaign=desktop_beta)

Cosmonic Control

### Ship sandboxes on Kubernetes

The same sandbox and the same manifests as Desktop, now at production scale. Free to start.

- Thousands of sandboxes per node, scaling to zero when idle
- Per-workload capability grants and egress policy
- Declarative workloads, running beside the containers you already have
- EKS, AKS, GKE, OpenShift, VMware, on-prem, air-gapped

[Install Cosmonic Control](https://cosmonic.com/docs/install-cosmonic-control/?utm_source=apex&utm_medium=products&utm_campaign=trial&utm_content=install_control)

## Frequently asked questions

What does it mean to sandbox an AI agent?

The agent and every tool it calls each run in their own sandbox, not on your machine. Each starts with no access to your files, network, or keys. You grant specific calls, such as one tool reading users from your CRM, and anything you did not grant cannot be reached at all, so a prompt injection or a bad tool call has nowhere to go.

Can the agent use any model?

Yes. The agent reaches its model through an LLM gateway that is itself a granted capability, so you can switch between Claude, ChatGPT, Gemini, DeepSeek, Perplexity, Mistral, or a local model through Ollama without changing what the agent or its tools are allowed to touch.

What does Cosmonic Desktop actually run?

Anything you want contained: ready-made MCP servers and apps from its built-in catalog, the code your agent writes, functions, workflows, and whole applications. Each one runs in a sandbox that starts with no access to your files, network, or keys until you grant it.

How is this different from a container?

A container starts with broad access to the machine that launched it. A Cosmonic sandbox starts with none: an app can reach only what you granted. Sandboxes are also much smaller and quicker to start, so you can afford to run thousands of them, and they run beside the containers you already have rather than replacing them. The [AI sandbox guide](https://cosmonic.com/blog/ai-sandbox-guide/) compares containers, microVMs, and WebAssembly in depth.

Do I need Kubernetes?

No. Cosmonic Desktop runs entirely on your own machine, with no cluster involved. Kubernetes only enters the picture when you want to ship to production, where Cosmonic Control runs the same sandbox and the same manifests on clusters you already have.

Which AI tools does it work with?

Cosmonic Desktop ships an MCP server, so any coding agent that speaks MCP can build and deploy into the sandbox, including Claude Code, Codex, Gemini, opencode, and local models. Nothing here is tied to one vendor.

## Build fast. Run securely.

Put the sandbox on your cluster in an afternoon, or run the whole thing on your laptop for free this evening.

[Download the Desktop beta](https://learn.cosmonic.com/cosmonic-desktop-beta?utm_source=apex&utm_medium=footer_cta&utm_campaign=desktop_beta) [Install Cosmonic Control](https://cosmonic.com/docs/install-cosmonic-control/?utm_source=apex&utm_medium=footer_cta&utm_campaign=trial&utm_content=install_control)
