Skip to main content
General

Quickstart (Hosted)

Create durable agentOS VMs by ID and control them from the RivetKit client or plain HTTP.

Hosted agentOS VMs run as the prebuilt agentOS Rivet Actor, on Rivet Cloud or on your own Rivet control plane. Create a VM by key, then control it from the @rivet-dev/agentos client or plain HTTP. To run VMs inside your own Node.js process instead, see the library quickstart.

Which one should I use?

LibraryHosted
RunsInside your processDurable instance on Rivet Cloud or self-hosted
LifecycleRuns until dispose() or process exitSleeps when idle unless a process is running
ClientsYour backendYour backend, or browsers with a scoped JWT
Preview URLsNoneExpiring preview URLs

Create a VM

Create a project

Create a project in the Rivet dashboard and choose agentOS as the product. Set RIVET_NAMESPACE and RIVET_TOKEN from the project. To run on your own infrastructure, see Self-Hosting.

Install the client

npm install @rivet-dev/agentos

The client is optional. Every action is also a plain HTTP call.

Create a VM and use it

Open the preview at /gateway/$VM_ID@$VM_TOKEN/request followed by the returned path. A running server keeps the VM awake.

Configure the VM

Configuration is stored with the VM and versioned. Replace it with v1.config.set, then restart the VM so filesystem and software changes take effect.

See Persistence, Permissions, and the Hosted HTTP API for every config field.

Give Clients Direct Access With JWTs

Keep your admin token on the backend and issue a JWT scoped to one VM. Browsers and other untrusted clients can then call that VM directly, and nothing else.

Next steps