The virtual operating system for agents.

An isolated operating system for every agent, embedded in the backend you already run: a file system, code execution, tools, and human review.

Read the Docs
runs
PiPi
Claude CodeClaude Code
CodexCodex
OpenCodeOpenCode

What agentOS is.

agentOS is an open-source library that boots a small virtual operating system for each agent VM you run: a virtual kernel with a file system, processes, networking, and deny-by-default permissions, inside your backend. Agents like Pi, Claude Code, Codex, and OpenCode run in it, and your code, or a framework like Eve or Flue, drives them through sessions, bindings, and workflows.

npm install @rivet-dev/agentos @agentos-software/pi

The benefits of a sandbox, without the sandbox.

Sandbox providers give every agent a full VM across a network gap and leave orchestration to you. agentOS runs each agent in its own VM inside your backend, with sessions, workflows, and approvals built in.

agentOSFull sandbox
Your backend
OSOSOSOSOSOSOSOS
22–131 MB per agent
Your backend
network
Sandbox1 GiB
Sandbox1 GiB
Sandbox1 GiB
Backend integrationBindings call your functions directly.Network calls back to your backend.
VirtualizationV8 isolates and WebAssembly: a kernel virtualized inside your process, nothing to boot.MicroVMs booted per agent on separate hosts.
IsolationOne VM per customer or job. VMs share no file system, memory, or crash fate.One container or microVM per agent.
Heavy workloadsMount a Docker, E2B, or Daytona sandbox into the same file system when a job needs native binaries, file watching, or a GPU.Native.
CredentialsStay on the host. Bindings run your functions server-side; agents see only inputs and outputs.Injected into the sandbox environment.
PermissionsGranular and deny-by-default.Coarse, container-level.
Infrastructurenpm installVendor account and API keys.

Faster starts, less memory, lower cost.

Measured against E2B, the fastest mainstream sandbox cold start, and Daytona, the cheapest per-second sandbox, as of March 30, 2026.

Workload: Minimal shell workload running simple commands

Cold Start
0xfaster
agentOSWhat's measured: Time from requesting an execution to first code running.

Why the gap: agentOS runs agents in-process — V8 isolates and Wasm inside your host. No VM to boot, no network hop, no disk image. Sandboxes must boot an entire environment, allocate memory, and establish a network connection before code can run.

Sandbox baseline: E2B, the fastest mainstream sandbox provider as of March 30, 2026.

agentOS: Median of 10,000 runs (100 iterations x 100 samples) on Intel i7-12700KF.
4.8 ms
Fastest sandbox440 ms
Memory Per Instance
0xsmaller
agentOSWhat's measured: Memory footprint added per concurrent execution.

Why the gap: In-process isolates share the host's memory. Each additional execution only adds its own heap and stack. Sandboxes allocate a dedicated environment with a minimum memory reservation, even if the code inside uses far less.

Sandbox baseline: Daytona, the cheapest mainstream sandbox provider as of March 30, 2026. Default sandbox: 1 vCPU + 1 GiB RAM.

agentOS: ~22 MB for the minimal shell workload under sustained load.
~22 MB
Cheapest sandbox~1024 MB

Sandboxes reserve idle RAM per agent.

Cost Per Execution-Second
0xcheaper
agentOSWhat's measured: server price per second / concurrent executions per server

Why it's cheaper: Each execution uses ~22 MB instead of a ~1024 MB sandbox minimum. And you run on your own hardware, which is significantly cheaper than per-second sandbox billing.

Sandbox baseline: Daytona, the cheapest mainstream sandbox provider as of March 30, 2026. Default sandbox: 1 vCPU + 1 GiB RAM at $0.0504/vCPU-h + $0.0162/GiB-h.

agentOS: ~22 MB baseline per execution, assuming 70% utilization (industry-standard HPA scaling threshold). Select a hardware tier above to compare.
$0.000000073/s
Cheapest sandbox$0.000018/s

Assumes one agent per sandbox, needed for isolation.

Measured on Intel i7-12700KF. Cold start baseline: E2B, the fastest mainstream sandbox provider as of March 30, 2026. Cost baseline: Daytona, the cheapest mainstream sandbox provider as of March 30, 2026 (1 vCPU + 1 GiB default). Cost assumes 70% utilization on self-hosted hardware vs. per-second sandbox billing. Benchmark document

Any execution layer.

Agents write JavaScript, Python, and shell. agentOS runs all three natively behind one exec API, so an agent can script its work in JavaScript as easily as in bash.

agentos vm · /home/agentos
The agent writes one program instead of a chain of tool calls.Node.js runtime docs

Everything your agent expects from an operating system.

A persistent file system, session memory, integrations, human oversight, and preview URLs, in a single npm package.

Any agent harness

Claude Code, Codex, OpenCode, and Pi all run behind one unified API. Swap or add agents without touching your infrastructure.

Persistent file system

Mount a host directory, S3, Google Drive, or a custom JavaScript file system. State survives sleep and wake.

State previews

Every app the agent runs gets its own unique preview URL, served straight from the VM.

Integrations

Bindings turn your JavaScript functions into CLI commands inside the VM. Connect MCP servers, skills, and other agents.

Human in the loop

Each tool call raises a permission request your app approves or denies, from a client UI or a server-side hook. Unanswered requests reject after 120 seconds, and interactive PTYs let a person take over.

Memory

Sessions persist automatically with replayable transcripts, and sqlite3 runs inside the VM for structured agent memory.

Orchestrate fleets of agents in a few lines of code.

Durable sessions, multiplayer, and agent-to-agent delegation are built in, and every event streams back to your code. It works with the frameworks you already use, including Eve and Flue.

agents.ts
import { createClient } from "@rivet-dev/agentos/client";
import type { registry } from "./server";
 
const client = createClient<typeof registry>("http://localhost:6420");
const agent = client.vm.getOrCreate("my-agent").connect();
 
// Stream events (tool calls, text output, etc.)
agent.on("sessionEvent", (data) => console.log(data.event));
 
// Create a session and send a prompt
const session = await agent.createSession("pi", { env: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY! } });
await agent.sendPrompt(session.sessionId, "Write a Python script that calculates pi");

Multiplayer

Multiple humans and agents in one live session, collaborating in realtime.

Durable sessions

Every run is a managed session with its own state, history, and lifecycle. Pause, resume, and replay.

Workflows

Chain durable, multi-step workflows that survive restarts and pick up exactly where they left off.

Observability

Stream every event, tool call, and state change for full visibility into what your agents are doing.

Start local. Scale to millions.

agentOS runs as Rivet Actors, so agents live next to their state and deploy wherever you already ship. The same SDK runs as a library in development and as a platform in production.

Local Development as a Library

Install a package and run locally. No servers, no infrastructure — VMs and agents run in your process during development.

Get Started
Rivet

Rivet Cloud

Fully managed agentOS on a global edge network. Bring your own cloud or run on Rivet Compute. Zero-ops, scales to millions of agents.

Sign Up

Self-Host

Run the open-source Rivet platform on your own infrastructure — Kubernetes, Hetzner, VMs, and more.

Self-Hosting Docs

Give your agents an OS.

agentOS is open source under Apache 2.0. Install it from npm and run it inside your existing backend.

Read the DocsView on GitHub