Every page
The whole manual on one page, grouped by what you came to do.
Get started#
OverviewZero Trust cybersecurity infrastructure for AI agents. A running microVM in under a minute from the CLI, the HTTP API, serverless functions QuickstartGet an API key, install the CLI or an SDK, and run code in a kosa8 Cloud sandbox in under a minute, in CLI, curl, Python, JavaScript, Go, RuAPI keys and authHow kosa8 Cloud authenticates: API keys with scopes, the CLI's browser sign-in, and short-lived capability tokens you hand to your own usersInstall the CLIOne line in a terminal, or the Mac app. Both take about a minute.kosa8 Cloud tourRun kosa8 sandboxes and functions on our hosts: sign up at app.kosa8.com, add a payment method, make an API key, and call it from the SDKs oLet your agent set it upPoint Claude Code, Codex or Cursor at kosa8.com/AGENTS.md and it installs kosa8, asks you for the sign-up code, and runs its work in sandbox
Core concepts#
SandboxesThe kosa8 Cloud sandbox lifecycle: create, read, extend and delete, with ttl_s, sleep_after_s, names, labels and states.Sizes and templateskosa8 Cloud sandbox sizes from 0.25 vCPU / 512 MiB to 16 vCPU / 32 GiB, the base, python, node and universal templates, and bringing your owExec and streamingRun commands in a kosa8 Cloud sandbox: buffered exec up to 90 seconds, streamed NDJSON or server-sent events with no limit, and background cFilesUpload, download and list files in a kosa8 Cloud sandbox: raw bytes in and out under /workspace, with ranges, appends and direct links for lFork, checkpoints, rewindSave a running kosa8 Cloud sandbox with its memory and processes, put it back, or copy it up to 1,000 times.Sleep and wakekosa8 Cloud sandboxes sleep when idle, with memory and disk saved, and wake on the next call.SnapshotsSave a kosa8 Cloud sandbox as a snapshot, memory and disk included, and start new sandboxes from it in seconds, with everything already inst
Serverless#
FunctionsDeploy a Python or Node.js function to kosa8 Cloud and call it by name: each call runs in a fresh microVM, with web endpoints, schedules andOne-call runRun code or a command on kosa8 Cloud in one API call or one CLI command: a fresh sandbox, streamed output, files back, a shareable run link.
Guides#
RL and evals#
RL trainingRun thousands of agent rollouts on kosa8 Cloud: batch create, fork a prepared state, leases that clean up after a crashed trainer, failure cRL rollouts in PythonUse kosa8 sandboxes for reinforcement learning and evals in Python: one sealed environment per episode, fork a prepared state into many, cheFan out from a snapshotSet up a kosa8 Cloud sandbox once, snapshot it, start N copies with fork or from the snapshot, shard a test suite or a batch of rollouts acrSWE-bench, Terminal-BenchSWE-bench Verified and Terminal-Bench 2.1, ready-made: every instance's official image and official grader, built by kosa8 on first use. A sHosted jobsSend tasks, a solver and a sealed grader; kosa8 Cloud runs every rollout server-side, retries infra failures, records each rollout to an RL
Coding agents#
Agent hookskosa8 hooks install puts kosa8's checks in front of every shell command, file read and write, web fetch and MCP call your coding agent makesConnect Claude, Cursor, CodexGive your AI coding agent kosa8 sandboxes in two commands: kosa8 mcp install adds the tools, kosa8 skill install teaches the agent when to uMCP serverConnect Claude, ChatGPT, Claude Code, Cursor, Codex or any MCP client to kosa8 Cloud with just a URL: a remote MCP server at api.kosa8.com/mOne task, one sandboxkosa8 prompt gives a coding agent one task in a fresh sandbox that sees one folder, holds no API key and is removed when the agent is done.Run an AI assistantClaude Code, Codex, Gemini and others, each in a sealed machine that can only reach what you allow — and never holds your API key.Agent compatibilityWhich AI coding agents and MCP clients kosa8 supports, and how: sandbox kits, keys kept out by the egress broker, checked tool calls, the koWriting a kitDescribe the environment an agent runs in: its image, what is installed, the one folder it sees, the hosts it reaches and the keys it uses.
Browsers and AI#
BrowsersHeadless Chromium for agents on kosa8 Cloud: open a browser, drive it with Playwright or Puppeteer over CDP through api.kosa8.com, take screAI GatewayRoute your sandboxes' model calls (OpenAI, Anthropic, Groq, Mistral, DeepSeek, OpenRouter, Google AI Studio) through kosa8 and Cloudflare AICode interpreterRun Python cells in a kosa8 Cloud sandbox that keep their variables between calls, with charts, HTML and JSON results, like a Jupyter kernelDesktop and computer useRun a Linux desktop with Chromium in a kosa8 Cloud sandbox: watch or take over through noVNC on a preview URL, drive the browser over CDP, aAndroid emulatorRun an Android emulator in a kosa8 Cloud sandbox for mobile agents and mobile RL: watch it through noVNC on a preview URL, reach adb from ouLocal modelsRun AI on your own machine. Nothing sent out, nothing charged per word.
Build and ship#
Templates galleryOne-click starter sandboxes on kosa8 Cloud: Claude Code, Cursor, the OpenAI Agents SDK, a browser agent, a data notebook, a web app with a lThe universal imageWhat is in kosa8-universal, the Ubuntu 24.04 sandbox image with agent CLIs (Claude Code, Codex, Gemini, Copilot), MCP servers, cloud CLIs, gSnapshots, background, envSave a kosa8 Cloud sandbox as a snapshot that outlives it and start new sandboxes from it, run a command that keeps going after the call retPreview URLsOpen a web server running in a kosa8 Cloud sandbox at its own https URL: private by default with a signed link, or public, per port.Terminal and large filesOpen an interactive terminal (PTY over WebSocket) in a kosa8 Cloud sandbox, and move files of any size with streamed uploads and downloads oSSH and VS CodeSSH, scp, port forwards and VS Code Remote-SSH into a kosa8 Cloud sandbox over its authenticated terminal, with no port 22 open anywhere.Embed a sandboxPut a kosa8 Cloud sandbox's terminal or desktop in your own app: a signed, expiring iframe URL, view-only or interactive, framed only by youWake on request, schedulesLet a request to a preview URL wake a sleeping kosa8 Cloud sandbox, and run commands in a sandbox on a cron schedule.Your GitHub reposConnect GitHub to kosa8 Cloud once, then start a sandbox or a run from any of your repos and send the changes back as a branch or a pull req@kosa8 in issues and PRsComment @kosa8 run or @kosa8 agent on a GitHub issue or pull request: a command or your own coding agent runs in a fresh kosa8 sandbox, repoGitHub App permissionsEvery permission the kosa8 GitHub App asks for, what it is used for and never used for, the exact token each kosa8 operation asks GitHub forPipelinesCI on kosa8 Cloud with no GitHub Actions: a .kosa8/pipeline.yml whose jobs each run in a sized sandbox, or your existing .github/workflows rGitHub Actions runnersRun GitHub Actions jobs on kosa8 Cloud: one ephemeral self-hosted runner per job, in its own sealed microVM, sized 2 to 16 vCPUs, with git aGitHub ActionRun a command in a sealed kosa8 Cloud sandbox from a GitHub Actions workflow: create, run, print the output, set exit-code and sandbox-id, dWebhooksVerify the Kosa8-Signature header on kosa8 Cloud webhooks in Node, Python and Go, and forward sandbox.error and spending_cap.reached to SlacMetrics, logs, labelsRead a kosa8 Cloud sandbox's CPU, memory, disk and network use, its recent commands with their output, find sandboxes by label, and get webhFramework integrationsRun kosa8 Cloud sandboxes from the OpenAI Agents SDK, Harbor, Inspect AI, LangChain Deep Agents, or code written for E2B, by changing a few OpenAPI and llms.txtThe kosa8 Cloud API described as OpenAPI 3.1 at api.kosa8.com/openapi.json, and in plain text for AI agents at api.kosa8.com/llms.txt.
Your own machines#
Air-gapped installInstall kosa8 and the desktop app from a USB copy on a machine with no network, with an offline site licence.Bring your own cloudRun kosa8 Cloud sandboxes on your own servers or Kubernetes nodes behind your own tunnel: what stays in your environment, what kosa8 sees, nYour first local sandboxMake a sealed machine, run something inside it, and see why it is not just a container.Save and undoCheckpoint before something risky, rewind after it goes wrong. About a second either way.Try several ideas at onceFork a machine per idea, run them in parallel, and let kosa8 report which worked.The desktop appA window onto every machine, container and save point — including the tree of what came from what.When something is wrongkosa8 doctor finds it, explains why it matters, and repairs what is safe to repair.UninstallRemove the CLI, the daemon, its login service and, if you want, your data.Verify a downloadCheck the release signature, the checksum and the package signatures yourself.
Migrate#
From E2BMove E2B code to kosa8 Cloud: point the E2B SDK at kosa8 with three environment variables, or change one import to kosa8's E2B-compatible PyFrom DaytonaMove Daytona Python code to kosa8 Cloud by changing one import to kosa8's Daytona-compatible module.From ModalMove Modal Sandbox code to kosa8 Cloud by changing import modal to kosa8's Modal-compatible module.
Security and governance#
Security Centerkosa8 Cloud's Security Center: a posture checklist from your org's own settings, an agent inventory, an org kill switch, SIEM streaming of tIf kosa8 were breachedThe GitHub agent incidents of 2025 and 2026, step by step, and exactly where kosa8's design breaks each attack chain and where it does not: Securing an agentEverything kosa8 does to secure an AI agent itself, not only the sandbox around it: the layers, the threats each one answers, and what none Keep API keys outHow kosa8's egress broker lets an AI agent use an API key it never holds: the sandbox gets a placeholder, and the real key is added on your SecretsGive a kosa8 Cloud sandbox API keys it never holds: the host's egress broker adds the real value to its requests, and the sandbox sees only Egress controlsChoose what a kosa8 Cloud sandbox may reach on the network: internet on or off, allow and deny lists, registry presets, per sandbox and per Network rules (local)What a kosa8 sandbox can reach, how to say so, and where it is enforced: the guard on your computer, DNS answered on the host, and the egresTool servers (MCP)Run third-party MCP servers behind kosa8's gateway: each in its own sandbox, with pinned tool definitions and checked arguments.MCP server catalogAdd GitHub, Playwright, Stripe, Notion, Linear and other official MCP servers to kosa8 in one step: sandboxed, pinned, with secrets kept outRules for tool callsDecide an AI agent's tool call by its arguments: allow it, deny it, or hold it until a person approves that exact call.Agent attack testsRun a fixed catalogue of AI-agent attacks against kosa8's own controls, labelled with OWASP LLM 2025 and MITRE ATLAS ids, and keep a signed Swarms and the threat feedRun many agents from one prepared sandbox, each in its own microVM, with one shared list of blocked hosts and one kill switch.Agent identityGive each AI agent a token the service verifies, so policy can differ between agents and the audit log names which one acted.Company rulesSigned policy that a laptop cannot edit its way around, and a record of every decision.Policy referenceEvery field of the two signed policy documents, where each is enforced, and what happens when a policy is missing or edited.The audit logWhat kosa8 writes down about every action, how to read it, and how to prove nobody edited it.Agent troubleshootingEvery refusal and warning an agent or its user can meet, what each one means and what to do about it.
SDKs#
OverviewDrive kosa8 from Python, TypeScript, Go, Ruby or Java. What the SDKs do in plain words, how to install each, and which page to read next.Local daemon HTTP APIThe kosa8 daemon's /kosa8/v1 API that every SDK is built on: transport, headers, streaming frames, errors, and each sandbox, process, snapsh
Python#
QuickstartRun code in a sealed microVM sandbox from Python in five minutes: install the kosa8 package with pip or uv, connect to the daemon, create a Developer guideEverything the kosa8 Python SDK does, in depth: connecting (socket, KOSA8_HOST, tokens, timeouts), sandboxes and egress, run, exec, stdin anAgents SDK, LangChainGive an OpenAI Agents SDK or LangChain/LangGraph agent a kosa8 sandbox as tools: run code, a shell that keeps cd, files, git and preview linErrorsEvery exception the kosa8 Python SDK (0.5.5) raises, including the kosa8 Cloud 402, 423, 429 and 504 errors: when it is raised, its attributAPI referenceEvery public class, function, method, constant and dataclass of the kosa8 Python SDK 0.5.5, including the toolbox and the kosa8 Cloud client
JavaScript / TypeScript#
Choosing a pathFour ways to drive kosa8 from Node: the @kosa8/sdk client, the Vercel AI SDK adapter, MCP, and the Docker API. What each is for, with a deciInstallInstall kosa8 and start its daemon, install @kosa8/sdk or @kosa8/ai-sdk-sandbox, check the connection with health() and version(), and set uQuickstartYour first kosa8 sandbox from Node in five steps: connect, create a sealed microVM, run a command, exec into a container, then checkpoint anConnectingHow @kosa8/sdk finds the daemon: the default socket, socketPath, KOSA8_HOST forms, KOSA8_TOKEN, KOSA8_INSECURE, the actor and agent-token heSandboxesCreate kosa8 sandboxes from Node with cpus, memory, disk, mounts, labels, packet capture and a broker; list, get, stop, start, delete and wiRunning coderun, exec, execFrames, startContainer, startInteractive, writeStdin and attach in @kosa8/sdk: streaming output, exit codes as results, stdinFilesGet files into and out of a kosa8 sandbox from Node: the workspace file calls (listFiles, readFile, writeFile), a host folder mount, exec wiNetwork and secretsSet a kosa8 sandbox's egress from Node: deny, any, fakenet or an allow-list; read what was refused; and use the credential broker so the ageCheckpoints and rewindSave a running kosa8 sandbox before a risky step and put it back in about half a second, processes and all, from Node. How checkpoints are sFork and exploreCopy a running kosa8 sandbox into live, independent copies from Node, and run several approaches in parallel to keep the fastest one that woSnapshotsSave a running kosa8 sandbox as a named snapshot from Node, restore it as many times as you like, encrypt it, and restore a sealed snapshot Approvals and policyWhen an org policy wants named people to approve an action, @kosa8/sdk throws Kosa8ApprovalRequiredError. How a human approves through the CVercel AI SDK@kosa8/ai-sdk-sandbox: run an AI SDK agent's files and commands in a kosa8 microVM. Sessions, the work container, restricted(), templates, nRecipesComplete, tested Node programs for kosa8: run LLM-generated code safely, a coding agent on a mounted repo, parallel test variants, checkpoinErrorsEvery error class @kosa8/sdk 0.5.3 throws, including timeouts and the kosa8 Cloud 402, 423, 429 and exec-timeout errors: when it is thrown, TroubleshootingProblems you can meet driving kosa8 from Node, with the real messages: daemon not running, socket path length on macOS, a locked Mac, disk sAPI referenceThe exported functions, classes, types and options of @kosa8/sdk 0.5.3 (local client, toolbox, the kosa8 Cloud client, RL runs and hosted jo
Go#
QuickstartRun code in a sealed microVM sandbox from Go in five minutes: install kosa8-go, connect to the daemon, create a sandbox with no network, runDeveloper guideEverything the local client in kosa8-go v0.5.3 can do, explained in plain words first and then in depth: connecting, contexts and timeouts, ErrorsEvery error kosa8-go v0.5.3 returns, including the kosa8 Cloud 402, 423, 429 and exec-timeout kinds: the Error type and its Kind, errors.Is API referenceEvery exported type, field, function, method and constant of github.com/kosa8ai/kosa8-go v0.5.3 (local client, toolbox and the kosa8 Cloud c
Ruby#
QuickstartRun code in a sealed microVM sandbox from Ruby in five minutes: install the kosa8 gem, connect to the daemon, create a sandbox with no netwoDeveloper guideEverything the kosa8 Ruby gem does, explained simply and then in depth: sandboxes, network rules, run, exec, stdin and attach, snapshots, foErrorsEvery exception the kosa8 Ruby gem 0.5.3 raises, including the kosa8 Cloud 402, 423, 429 and exec-timeout errors: the class hierarchy, when API referenceEvery public class, method, keyword argument, default, return value and exception of the kosa8 Ruby gem 0.5.3 (local client, toolbox and the
Java#
QuickstartRun code in a sealed microVM sandbox from Java in five minutes: add com.kosa8:kosa8 0.5.3 with Maven or Gradle, connect to the daemon, creatDeveloper guideEverything the kosa8 Java SDK does, in plain words first and then in depth: connecting locally or to a remote worker, sandboxes and network ErrorsEvery exception the kosa8 Java SDK (0.5.3) throws, including the kosa8 Cloud 402, 423, 429 and exec-timeout exceptions: the class hierarchy,API referenceEvery public class, constructor, method, builder option and record of com.kosa8:kosa8 0.5.3 (local client, toolbox and the kosa8 Cloud clien
Reference#
HTTP APICLIErrors and retriesEvery kosa8 Cloud error has a stable code, a failure_class and a retryable flag. What each status means, when to retry, and safe retries witLimits and pricingkosa8 Cloud limits: exec time, sandbox lifetimes, checkpoints, forks, file sizes, and what each plan includes. Prices are on kosa8.com/priciSecurityHow kosa8 isolates sandboxes, protects keys and records what happens, and where our compliance work stands.ChangelogWhat changed in kosa8: the CLI and desktop releases, kosa8 Cloud API changes, and SDK versions.
More#
How kosa8 worksThe parts of kosa8, what runs where, and what crosses each boundary — with the picture.ContributingBuild kosa8 from source, find your way around the packages, drive the service from your own program, and run the tests.Affiliate programThe kosa8 referral program has closed. Writers and creators can join the affiliate program for 20% of the payments of the teams they bring,