kosa8 / Use cases

Use case · Agent frameworks · Updated 2026-10-31

Give the code your agent framework runs a microVM of its own.

A sandbox for an agent framework is where the code and shell commands your agent produces run, instead of in your own process. kosa8 gives that code a microVM on your own Mac or Linux machine, with no cloud account: it is tested with the OpenAI Agents SDK, smolagents and the Vercel AI SDK, and reaches LangChain.js and Mastra through MCP. For LangGraph and CrewAI in Python, a small tool that calls documented kosa8 commands does the same job.

01Where does your agent's code run today?

Many frameworks run generated code close to home. smolagents runs a CodeAgent's Python in your own process by default, through its LocalPythonExecutor. LangChain's Python REPL tool runs code with exec() on your machine. Hosted sandboxes move the code to someone else's cloud. kosa8 keeps it on your hardware, behind a hypervisor, with a network closed to anything you did not allow.

02OpenAI Agents SDK

The SDK's DockerSandboxClient works against kosa8's Docker-compatible API with no code change. kosa8 tested openai-agents 0.24.0: create, start, write and read files, exec in /workspace, export the workspace and delete all worked. A full run with a model was not part of the test.

terminal
kosa8 daemon start
export DOCKER_HOST="unix://$HOME/.kosa8/run/kosa8.sock"
pip install openai-agents docker

03smolagents

Set executor_type="docker" and point the Docker SDK at kosa8. kosa8 tested smolagents 1.26.0's DockerExecutor with its defaults, including building its own image.

Containers created through the Docker API run in kosa8's shared engine VM, one VM separated from your computer by a hypervisor and from each other by container isolation. For a machine of its own per task, use a kosa8 sandbox directly.

04Vercel AI SDK

@kosa8/ai-sdk-sandbox implements the AI SDK 7 sandbox interfaces, so an agent's tools read, write and run commands in a session that is its own microVM, with a network policy such as deny-all. Tested with [email protected]; it needs Node 22 or later.

05LangGraph, LangChain and CrewAI

LangChain.js and Mastra reach kosa8 through MCP: kosa8's docs test @langchain/mcp-adapters 2.0.1 and @mastra/mcp 2.4.1 against kosa8 mcp serve, which gives the agent 30 tools to create and use sandboxes.

LangGraph and CrewAI in Python have no separately documented kosa8 integration. The pattern is a custom tool that sends the code to a sandbox with no network, using kosa8 CLI commands, and in LangGraph an interrupt() so a person approves each run:

terminal
kosa8 sandbox create runner --egress deny --memory 512
kosa8 sandbox pull runner python:3.12-slim
kosa8 sandbox run runner python:3.12-slim python -c "print(2+2)"

06Checkpoint, fork and audit

A sandbox can be checkpointed and rewound with memory and processes intact, or forked into live copies to try several approaches at once, from the CLI, from @kosa8/sdk or through MCP tools such as sandbox_checkpoint and sandbox_fork. Every path enters the same daemon, so every action is in the hash-chained audit log.

07How to start

  1. Install kosa8 and start its daemon.

  2. Point a Docker-based executor at kosa8, or install the adapter for your framework.

08Questions

Which agent frameworks has kosa8 tested?

The OpenAI Agents SDK's DockerSandboxClient, smolagents' DockerExecutor and the Vercel AI SDK through @kosa8/ai-sdk-sandbox, plus LangChain.js, Mastra and the AI SDK's MCP client through kosa8 mcp serve. LangGraph and CrewAI in Python are not separately documented.

Does each agent get its own microVM through the Docker API?

No. Containers created through kosa8's Docker-compatible API share one engine VM. For a microVM per task, with its own network rule and checkpoints, use kosa8 sandbox, @kosa8/sdk, the AI SDK adapter or the MCP tools.

Do I need a cloud account?

No. The sandboxes, their files and the commands the agent runs stay on your machine. Only the model calls go to whichever provider your agent uses.

Which machines can run it?

kosa8 runs its microVMs on an Apple silicon Mac (Apple's Virtualization framework) or on x86-64 Linux (KVM). On an Intel Mac it installs as the command-line tool only and drives sandboxes on one of those machines.

09Guides and articles

10Sources

11Try it on your own machine

Install kosa8 and move your agent's code execution off your own process and onto a microVM you control.

Download kosa8 See plans

Updated 2026-10-31