Skip to main content

Blog

Sandboxing the code AI agents run, and the systems that make it dense and fast. Engineering deep dives and security notes from the Cosmonic team.

Sandbox AI agents by the million with the Cosmonic Agent SDK
||10 min read

The open source Cosmonic Agent SDK gives every AI agent and every tool its own sandbox, small enough to run by the million.​

If you run AI agents in production, you're used to compromising between security, cost, and scale. Today we're releasing the open source Cosmonic Agent SDK so you don't have to choose.

When you build with the Agent SDK, every AI agent and tool gets its own sandbox. Each one ships as a compiled component of about a hundred KB to a handful of MB. They run side-by-side in one process, start in about a millisecond, and scale to zero. In our latest benchmark, one server held 1.75 million Codex agents, using about 70 KB of memory each while idle.

Agents work with OpenAI-compatible model APIs (plus Anthropic) and MCP tools. Your sandboxes run on any machine you control, and they're built on open standards so you aren't locked to one vendor or one cloud.

Cosmonic at KubeCon + CloudNativeCon NA 2026
||6 min read

We're heading to Salt Lake City for KubeCon + CloudNativeCon NA 2026, and we'd love to see you there!

From November 9-12, you can find us at Booth 224 showing sandboxed agents and tools built with the open source Cosmonic Agent SDK on Cosmonic Desktop and Cosmonic Control, running a hands-on workshop on sandboxing agent tools on Kubernetes, and talking portable GPU inference at Cloud Native AI + Inference Day.

Stop Remote Code Execution with a Sandbox: You Can't Execute What You Don't Have
||28 min read

Your upload service, running as root, unzips a malicious file someone uploaded. A minute later there's a new program on your machine that runs as root, too, and you don't even know it's there. One crafted upload, and an attacker is a step away from remote code execution (RCE).

You can contain the vulnerabilities in the code you depend on with a secure, deny-by-default sandbox.

Memory-safe languages like Rust help, but they aren't enough on their own. RUSTSEC-2026-0367, a published flaw in the Rust zip crate, shipped despite the best efforts of its developers.

zip is one of the most widely used libraries for opening .zip files in Rust, which makes it a great case study for platform engineering teams trying to survive the #vulnpocalypse.

And it's not just open source. In many organizations, critical bugs like this one are being found so fast that CI pipelines fail constantly.

Kafka as a Capability with Cosmonic Control
||7 min read

Cosmonic Control v0.12 ships native Kafka through cosmonic:kafka@0.5.0. Workloads can publish records, process events, use a stateful pull consumer, or commit Kafka transactions without carrying a broker address or credential in component code.

For serverless event processing, start with the handler interface. The host owns the Kafka consumer and keeps its group membership stable. It creates component instances when partitions have work, runs different partitions concurrently, and can reclaim every guest instance when the stream is quiet. Kafka stays connected while your compute scales independently, all the way to zero.

Cosmonic Desktop: a sandbox for your agent's code, now in public beta
||7 min read

Your agent wrote the code. But do you trust it? Where does it run? What can it access?

For a lot of us, the answers are, "On my machine" and "Everything I can access." AI agents run code in our names. They carry all of our credentials and tokens, our file and network access.

And it isn't only the code they write. Every MCP server you install is third-party code wired straight into a model's tool-use loop — it takes model-shaped input, it usually holds credentials, and it can usually reach the network. You add one with a copied command, and it runs with everything you have. It's one of the toughest problems of the agentic era so far: how do we move quickly with guardrails we can trust?

Cosmonic Desktop is our answer: a free, cross-platform desktop app for running, managing, and creating sandboxed apps.

Built on open standards and designed for the agentic era, it gives your AI agents a way to run the code they generate inside a capability-driven sandbox, isolated from your files, your network, or your keys unless you explicitly allow it, and ready to deploy to the infrastructure you already run.

Cosmonic Desktop is free and available in public beta today on macOS, Linux, and Windows. It runs entirely on your machine, with no login or cloud connection required.

AI Sandbox: The Complete Guide to Sandboxing AI Agents in 2026
||24 min read

Today, AI agents execute code, call APIs, read files, manipulate databases, and orchestrate multi-step workflows across production infrastructure. They can be tremendously accelerative tools for enterprises, but each of those actions comes with a blast radius, and the sheer speed at which they occur means that organizations need an AI sandbox to contain it.

Without proper sandboxing of AI agents, teams face an overwhelming risk surface:

  • A single hallucinated tool call can exfiltrate a database.
  • A prompt injection can escalate to credential theft.
  • A poisoned Model Context Protocol (MCP) tool can pivot from an AI agent into production systems.

This guide covers what an AI sandbox is, why AI agents need one, the four dominant approaches to isolation, and how to choose among them. In doing so, we'll explore the under-discussed questions of agent tooling and AI-generated code, where a great deal of risk resides, and the blast radius is considerable.

Wasmtime, AI, and the New Security Frontier
||8 min read

Last month the Bytecode Alliance published security advisories for Wasmtime: the largest set of advisories the project has ever published at once, triple the total number issued in all of 2025. The accompanying patch releases (Wasmtime versions 43.0.1, 42.0.2, 36.0.7, and 24.0.7) address 12 vulnerabilities surfaced with the help of a frontier AI model.

Wasmtime is one of the most rigorously engineered runtimes in open source: written in Rust, continuously fuzz-tested, backed by multiple organizations who treat it as security-critical infrastructure. What this release demonstrates is that surfacing vulnerabilities in even the most hardened codebases is no longer the hard part. Finding them quickly and at scale is now within reach of any well-resourced team with access to a capable model.

The hard part is what happens next. Teams have to review each finding, triage severity and blast radius, and patch across active versions, while coordinating disclosure with production embedders before vulnerabilities become public. That work still requires deep expertise, sustained investment, and the kind of trust that only comes from years of doing it right. It shouldn't come as a surprise that, according to a technical blog from Anthropic Red Team, over 99% of vulnerabilities uncovered through similar research have not yet been patched.

At Cosmonic, we're privileged to be part of the Bytecode Alliance, and proud to be part of a community with the commitment to swift releases and advisories like the ones we saw in April.