Skip to main content
General

Quickstart

Set up an agentOS actor, create a session, and run your first coding agent.

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
  1. Install

    • @rivet-dev/agentos — Actor framework with built-in persistence and orchestration
    • @agentos-software/piPi coding agent (Claude Code, Codex, and OpenCode coming soon)
    npm install @rivet-dev/agentos @agentos-software/pi
    
  2. 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();
    
  3. 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.

  4. 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
    
  5. Customize

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

  6. Deploy

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

    See Deployment for managed, self-hosted, and agentOS Core options.

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.

agentOS Core

The quickstart above uses @rivet-dev/agentos, which includes statefulness, multiplayer, and orchestration out of the box. If you only need direct VM control without those features, you can use the core package (@rivet-dev/agentos-core) standalone.

See agentOS core documentation for reference.