agentOS: an in-process operating system for agents built on WebAssembly and V8 isolates
Give agents an operating system as a library. Runs in your existing backend – no sandboxes, VMs, or SaaS. Powered by WebAssembly & V8 isolates.
At a glance
- What is it?
- agentOS from Rivet is a Rust and TypeScript project that boots a Linux-like virtual machine inside your own Node process, with a hosted mode on Rivet Cloud as the alternative. This review covers the library lifecycle, the in-memory default filesystem, the vendor benchmark table and the parts of the repository that are switched off.
- Who is it for?
- agentOS suits teams that already run a Node backend and want agent code execution inside that process, without managing microVMs. It is a poor fit if you need preview URLs from the library mode, browser execution today, or independent proof of the speed claims.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 3 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- rivet-dev/agentos4,900 ★ · +285
| Repository | 2026-09-10 | 2026-11-15 |
|---|---|---|
| rivet-dev/agentos | 4.6k | 4.9k |
285 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The VM lives inside your process and dies with it unless you persist
In library mode there is no separate service to deploy. You install a package and create a VM in the same process as your backend:
npm install @rivet-dev/agentos-coreimport { AgentOs } from "@rivet-dev/agentos-core";
// Boots a VM inside this process. It runs until dispose() or process exit.
const vm = await AgentOs.create();The comment in the example states the lifecycle: the VM runs until dispose() is called or the process exits. There is no idle sleep in this mode. The comparison table in the README makes the contrast with the hosted mode explicit, since hosted VMs sleep when idle unless a process is running.
The consequence is that a crash or restart of your Node process takes every agent VM with it. That is the price of having no extra infrastructure. It also means the agent shares your process's fate, memory and event loop, so a runaway agent is a problem for your backend and not for a disposable box somewhere else. The README points to a Resource Limits page for this, but the limit options themselves are not in the README text.
The default filesystem is in memory, and persistence is an explicit configuration step
A fresh VM keeps its filesystem in memory. Files written by an agent disappear when the VM is recreated unless you pass options to AgentOs.create(). The README's configuration example stores the root filesystem in SQLite:
import { resolve } from "node:path";
import { AgentOs } from "@rivet-dev/agentos-core";
const vm = await AgentOs.create({
// Store the root filesystem in SQLite so files survive VM recreation.
database: { type: "sqlite_file", path: resolve("agentos.sqlite") },
rootFilesystem: { type: "native", plugin: { id: "chunked_sqlite", config: {} } },The same call can attach other filesystems through a mounts array. One entry mounts a host directory at /mnt/code with the plugin id host_dir, a hostPath of /path/to/repo and readOnly set to true. A second entry mounts an S3 bucket at /mnt/data using the chunked_s3 plugin, though its options are cut off in the README.
The read-only host mount is the practical safety feature: an agent can read your repository but cannot write into it. Without that flag you would be handing the agent write access to a real directory. Details live on the Filesystem, Persistence and Permissions pages, which the README links and does not reproduce.
Library and hosted modes differ in lifecycle, clients and preview URLs
The README's quickstart splits into two paths with a four-row comparison. Library runs inside your process; hosted runs as a durable instance on Rivet Cloud or self-hosted. Library lifetime ends at dispose() or process exit; hosted sleeps when idle unless a process is running. Library clients are your backend only, while hosted clients can be your backend or browsers holding a scoped JWT. Library has no preview URLs; hosted offers expiring ones.
That last row decides some projects. If your agent starts a dev server and you want to show the result to a user, the library mode gives you no URL to hand over, and you would have to proxy it yourself. Browser access is the other split: in library mode only your backend can talk to the VM.
Hosted setup needs a project in the Rivet dashboard with agentOS chosen as the product, plus RIVET_NAMESPACE and RIVET_TOKEN set from that project. The README keeps the token on the backend and says a browser should get a JWT scoped to one VM. Self-hosting is documented on a separate page, so the hosted path is not tied to a single vendor deployment.
The hosted client is optional because every action is a plain HTTP call
The hosted client is installed with npm, and it creates or finds a VM by key:
npm install @rivet-dev/agentosimport { createAgentOsClient } from "@rivet-dev/agentos";
const client = createAgentOsClient({ endpoint: "https://api.rivet.dev" });
// Creates the VM on first use and returns the same VM for the same key.
const vm = client.agentOS.getOrCreate(["my-vm"]);GetOrCreate gives idempotent behaviour: the same key returns the same VM, which suits an agent session you want to resume. Actions carry a v1 prefix, as in vm.v1.process.run and vm.v1.filesystem.writeFile.
The README says the client is optional. Create the VM by key with your RIVET_TOKEN, then call POST /gateway/{vm_id}/action/v1.{group}.{action} with a token that can reach the VM. The curl example creates the actor with a PUT to /actors, naming it agentOS and setting crash_policy to sleep. Because the surface is plain HTTP, a non-JavaScript backend can drive a VM. The catch is the v1 in every action name, which tells you the API is versioned and that a later version may change call shapes.
Configuration in hosted mode is versioned, and changes need a restart
Hosted VMs store configuration with the VM. It is versioned, and the README tells you to replace it with v1.config.set and then restart the VM so filesystem and software changes take effect:
const vm = client.agentOS.getOrCreate(["my-vm"]);
await vm.v1.config.set({The operational consequence is that editing the configuration alone changes nothing for a running VM. A script that calls config.set and then immediately runs a command may still see the old filesystem layout. Plan for a restart step in any automation, and expect brief downtime for that VM.
The library mode has a different shape for the same job: you pass the options to AgentOs.create() at boot, which means a configuration change is a new VM. In both modes the permissions and resource limit settings are described on separate documentation pages rather than in the README, so the README alone does not tell you what the default lockdown is. The Host Functions page covers binding trusted functions so the agent can call your code without ever seeing your raw secrets.
The speed table compares against an unnamed sandbox baseline
The README opens with 92 times faster cold starts, 47 times less memory and 254 times cheaper to run. The table behind those numbers shows a p50 cold start of 4.8 ms against 440 ms, p95 of 5.6 ms against 950 ms, and p99 of 6.1 ms against 3,150 ms. Memory for a shell workload is about 22 MB against 1,024 MB, and cost per execution second is $0.000000073 against $0.000018.
The other column is labelled Sandbox baseline, and the README does not name which product it is. Methodology is linked to a page on rivet.dev, and a Performance docs page explains how to run the benchmarks yourself. The repository root also has a bench script, bash scripts/benchmarks/run-benchmarks.sh, wired into package.json.
These figures are the project's own, and I have not reproduced them. Read the table as a measurement of a lightweight in-process VM against a heavier per-agent sandbox, with the baseline's configuration unknown to you. The memory row is for a shell workload only, so an agent that runs Python or a large JavaScript job will not necessarily sit near 22 MB. Run the benchmark with your own workload before you take any ratio into a capacity plan.
Browser support is switched off in the workspace while the native sidecar lands
The Rust workspace has sixteen members, including kernel, vfs, vfs-store, v8-runtime, execution, runtime, native-sidecar and sidecar-protocol. Two of them, native-sidecar-browser and the browser runtime, are listed as members but left out of default-members. The Cargo.toml comment says browser support is intentionally retained in-tree but disabled while the unified native sidecar reactor lands, so dormant browser code cannot block native CI.
On the JavaScript side, package.json builds and tests with a filter that excludes @rivet-dev/agentos-runtime-browser, and the shell package is also excluded from the test script. The workspace requires Node 20 or newer and pnpm 10.13.1.
The result is that running agentOS in a browser tab should not be assumed to work today, even though a runtime-browser package exists in the tree. The hosted mode's scoped JWT lets a browser call a VM, but that is a browser talking to a remote VM and not the VM running in the browser.
Versioning is also split: the Rust workspace package is at 0.0.1, while the GitHub releases are v0.4.5, v0.4.6 and v0.4.7, the last on 2026-11-03. The last push was 2026-10-30 and the repository is not archived. The license is Apache-2.0.
Editorial conclusion
agentOS suits teams that already run a Node backend and want agent code execution inside that process, without managing microVMs. It is a poor fit if you need preview URLs from the library mode, browser execution today, or independent proof of the speed claims. Before adopting it, run the repository's own benchmark script against your workload and confirm which mode, library or hosted, supplies the features you need.
Frequently asked questions
What is agentOS?
agentOS is a library from Rivet that gives agents an operating system, with files, processes, shell and networking, running inside your existing backend process. It is powered by WebAssembly and V8 isolates.
How to install agentOS?
For library mode run npm install @rivet-dev/agentos-core. For the hosted client run npm install @rivet-dev/agentos.
How to use agentOS in a Node backend?
Import AgentOs from @rivet-dev/agentos-core and call await AgentOs.create() to boot a VM inside the process. The VM runs until dispose() or process exit.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rivet-dev-agentos)Star history chart for your README
[](https://hysenlabs.com/projects/rivet-dev-agentos)Was this useful?