Skip to main content
General

Quickstart

Create an agentOS actor, launch an isolated VM session, run a coding agent, send a prompt, and inspect the durable result.

Use this pre-built prompt to get started faster.
Prefer to read code? Clone the example repository.View on GitHub
OSClientJS · Browser · BackendServerOS= agentOS VM

Quick Start

Install

  • @rivet-dev/agentos — Actor framework with built-in persistence and orchestration
  • @agentos-software/piPi coding agent. Claude Code, Codex, and OpenCode install the same way.
npm install @rivet-dev/agentos @agentos-software/pi

Create the server

import { agentOS, setup } from "@rivet-dev/agentos";
import pi from "@agentos-software/pi";

const vm = agentOS({
  software: [pi],
});

export const registry = setup({ use: { vm } });
registry.start();

Create the client

The client can be any public frontend or another backend. The same vm actor is reachable from a plain Node script, a browser/React app, or a separate server.

Run it

Start the server, then run the client in a second terminal:

# Terminal 1: start the server
npx tsx server.ts

# Terminal 2: run the client
npx tsx client.ts

With the server running, open http://localhost:6420/ui to watch the VM in the actor inspector: the live transcript, the filesystem, and its processes.

Customize

Now that you have a working agent, customize it to fit your needs:

Deploy

By default, agentOS runs locally with npx rivetkit dev — no infrastructure needed. To run in production, deploy to any of these targets:

By default, Rivet stores actor state on the local file system.

To scale Rivet in production, pick how much of it you want to run yourself:

If you are running your own workers, follow the guide for your hosting provider:

agentOS is in preview and the API is subject to change. If you run into issues, please report them on GitHub or join our Discord.

Embedded API

The @rivet-dev/agentos-core package exports AgentOs.create() for embedded VM control without the actor lifecycle, multiplayer, or orchestration layer.

Read more in the embedded API quickstart.

Edit this page Last updated September 15, 2026