Repolode
rivet-dev

rivet-dev/agentos

A library and hosted service that gives AI agents isolated Linux-like sandboxes with files, processes, shell, and networking, built on WebAssembly and V8.

Stars
4,856
Forks
275
Open issues
134
Last commit
2 days ago

What is it?

agentOS is a sandbox for AI agents that gives each agent its own small operating system with POSIX-style files, processes, a shell, and networking. It is distributed as the npm package @rivet-dev/agentos-core, which runs inside your existing Node.js backend, or as a hosted HTTP API on Rivet Cloud or self-hosted infrastructure.

Guest code runs in V8 isolates for JavaScript and TypeScript, and the shell, coreutils, and Python run as WebAssembly. A Rust sidecar process owns the kernel, so untrusted code stays out of your process. Host access is off by default and is granted through mounts, host functions, and network permissions, with options for in-memory or SQLite-backed root filesystems and S3 mounts.

The README reports benchmarks against a sandbox baseline: cold starts of about 4.8 ms at p50, roughly 22 MB of memory for a shell workload, and no nested virtualization or per-agent microVM required.

Key features

  • 01Installs from npm and runs in-process inside a Node.js backend.
  • 02Runs JavaScript and TypeScript in V8 isolates, and shell and Python as WebAssembly.
  • 03Provides a virtual filesystem with in-memory, SQLite, S3, and host directory mounts.
  • 04Denies network access by default, with allow rules per host and port.
  • 05Offers persistent terminals, background processes, scheduled cron commands, and expiring preview URLs.
  • 06Exposes a hosted HTTP API with scoped JWTs for browser clients.

Use cases

  • Running code or shell commands that an LLM agent generates, isolated from your server.
  • Giving an agent a working filesystem and package installs without a VM per agent.
  • Letting an agent call your application's functions without exposing raw API keys.
  • Serving a dev server started by an agent through a temporary public preview URL.

Quick start

  1. 1

    Install the library from npm

    npm install @rivet-dev/agentos-core
  2. 2

    Create a VM in your backend and run commands, files, JavaScript, or Python in it

Things to know

  • The hosted option requires a Rivet account and RIVET_TOKEN, and self-hosting needs extra setup.
  • Guest code runs as WebAssembly and V8 isolates, so it is not a full Linux kernel or microVM.

In collections

Topics

FAQ

What is agentos?
A library and hosted service that gives AI agents isolated Linux-like sandboxes with files, processes, shell, and networking, built on WebAssembly and V8. agentOS is a sandbox for AI agents that gives each agent its own small operating system with POSIX-style files, processes, a shell, and networking. It is distributed as the npm package @rivet-dev/agentos-core, which runs inside your existing Node.js backend, or as a hosted HTTP API on Rivet Cloud or self-hosted infrastructure.
Is agentos free to use? What license does it have?
agentos is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is agentos still maintained?
Actively maintained. The last commit to agentos was on Nov 5, 2026.
What can I use agentos for?
Running code or shell commands that an LLM agent generates, isolated from your server. Giving an agent a working filesystem and package installs without a VM per agent. Letting an agent call your application's functions without exposing raw API keys. Serving a dev server started by an agent through a temporary public preview URL.
How do I install agentos?
Install the library from npm: npm install @rivet-dev/agentos-core Create a VM in your backend and run commands, files, JavaScript, or Python in it
Where can I get agentos?
The source code and installation instructions are on GitHub: https://github.com/rivet-dev/agentos

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects