Rivet is a free, open source build & deployment project written in Rust and released under Apache-2.0. It has 6,144 GitHub stars, 249 forks and 269 open issues, and was last pushed 4 hours ago. On this registry it ranks #24 of 59 tracked projects in Build & Deployment, with 5 head-to-head comparisons available. It gained 20 stars over the last 6 tracked days.

What is Rivet?

What it is

Rivet is an open-source runtime for building stateful backends around in-memory actors. It is written in Rust and released under the Apache-2.0 license, and it lives in the developer tools ecosystem for build and deployment, with topics that place it alongside Cloudflare Durable Objects, FoundationDB, serverless platforms, and realtime multiplayer infrastructure. An actor in Rivet is a long-running, lightweight process that holds its state in memory while persisting that state automatically, so a developer creates one actor per agent, per session, or per user rather than managing a separate service for each.

The concrete problem it solves is the gap between stateless serverless functions and the stateful workloads that AI agents, collaborative documents, chat rooms, and multi-step workflows actually require. Instead of wiring together a database, a queue, a scheduler, and a WebSocket layer by hand, a developer defines state and a run loop inside a single actor, and Rivet supplies the storage, networking, queues, workflows, and scheduling around it. State sits co-located with compute for instant reads and writes, and it can be persisted with SQLite or a bring-your-own database. Actors run indefinitely while active and hibernate when idle, which the project presents as a way to scale to zero for bursty workloads while still scaling horizontally.

Key capabilities

  • In-memory state co-located with compute, persisted automatically with SQLite or a bring-your-own database.
  • Actors that run indefinitely when active and hibernate when idle, with idle cost stated as $0.
  • Built-in WebSockets for realtime bidirectional streaming to connected clients.
  • Durable message queues that support reliable asynchronous processing through a queue iterator.
  • Workflows for multi-step operations with automatic retries.
  • Scheduling of timers and cron jobs inside an actor.
  • A global edge network for deploying close to users or within specific legal jurisdictions.

Who uses it and how

  • AI agents, where each agent runs as its own actor holding persistent context and memory and scheduling tool calls.
  • Collaborative documents, where each document is an actor broadcasting changes to every connected user in realtime.
  • Chat, where one actor per room or conversation keeps in-memory state, persistent history, and realtime delivery.
  • Sandbox orchestration, where a long-lived actor per workspace coordinates sessions, queues work, and schedules cleanup.
  • Per-tenant databases, where one actor per tenant provides low-latency in-memory reads with durable tenant persistence.

Getting started

The README points to a Quickstart and a Documentation section, and the

project readme (upstream, from github) — read inline


Rivet Actors are the primitive for stateful workloads.

Built for AI agents, collaborative apps, and durable execution.

QuickstartDocumentationChangelogDiscordX

What is Rivet?

Rivet Actors are long-running, lightweight processes designed for stateful workloads. State lives in-memory with automatic persistence. Create one per agent, per session, or per user — with built-in workflows, queues, and scheduling.

Backend

const agent = actor({
  // In-memory, persisted state for the actor
  state: { messages: [] as Message[] },

  // Long-running actor process
  run: async (c) => {
    // Process incoming messages from the queue
    for await (const msg of c.queue.iter()) {
      c.state.messages.push({ role: "user", content: msg.body.text });
      const response = streamText({ model: openai("gpt-5"), messages: c.state.messages });

      // Stream realtime events to all connected clients
      for await (const delta of response.textStream) {
        c.broadcast("token", delta);
      }

      c.state.messages.push({ role: "assistant", content: await response.text });
    }
  },
});

Client (frontend or backend)

// Connect to an actor
const agent = client.agent.getOrCreate("agent-123").connect();

// Listen for realtime events
agent.on("token", delta => process.stdout.write(delta));

// Send message to actor
await agent.queue.send("how many r's in strawberry?");

Features

One Actor per agent, per session, per user — state, storage, and networking included.

Rivet provides:

  • In-memory state — Co-located with compute for instant reads and writes. Persist with SQLite or BYO database.
  • Runs indefinitely, sleeps when idle — Long-lived when active, hibernates when idle.
  • Scales infinitely, scales to zero — Supports bursty workloads and is cost-efficient.
  • Global edge network — Deploy close to your users or in specific legal jurisdictions without complexity.

Actors support:

  • WebSockets — Real-time bidirectional streaming built in.
  • Workflows — Multi-step operations with automatic retries.
  • Queues — Durable message queues for reliable async processing.
  • Scheduling — Timers and cron jobs within your actor.

Use Cases

One primitive that adapts to agents, workflows, collaboration, and more.

  • AI Agent — Each agent runs as its own actor with persistent context, memory, and the ability to schedule tool calls.
  • Sandbox Orchestration — Coordinate sandbox sessions, queue work, and schedule cleanup in one long-lived actor per workspace.
  • Workflows — Multi-step operations with automatic retries, scheduling, and durable state across steps.
  • Collaborative Documents — Real-time collaborative editing where each document is an actor broadcasting changes to all connected users.
  • Per-Tenant Database — One actor per tenant with low-latency in-memory reads and durable tenant data persistence.
  • Chat — One actor per room or conversation with in-memory state, persistent history, and realtime delivery.

How Actors Compare

Rivet Actors vs. Traditional Infrastructure

Metric Rivet Actor Kubernetes Pod Virtual Machine
Cold start ~20ms ~6s ~30s
Memory per instance ~0.6KB ~50MB ~512MB
Idle cost $0 ~$85/mo (cluster) ~$5/mo
Horizontal scale Infinite ~5k nodes Manual
Multi-region Global edge 1 region 1 region

State

Metric Rivet Actor Redis Postgres
Read latency 0ms ~1ms ~5ms
Benchmark details & methodology

Cold Start

  • Rivet Actor (~20ms): Includes durable state init, not just a process spawn. No actor key, so no cross-region locking. Measured with Node.js and FoundationDB.
  • Kubernetes Pod (~6s): Node.js 24 Alpine image (56MB compressed) on AWS EKS with a pre-provisioned m5.large node. Breakdown: ~1s image pull and extraction, ~3-4s scheduling and container runtime setup, ~1s container start.
  • Virtual Machine (~30s): AWS EC2 t3.nano from launch to SSH-ready, using an Amazon Linux 2 AMI. t3.nano is the smallest available EC2 instance (512MB RAM).

Memory Per Instance

  • Rivet Actor (~0.6KB): RSS delta divided by actor count, measured by spawning 10,000 actors in Node.js v24 on Linux x86.
  • Kubernetes Pod (~50MB): Minimum idle Node.js container on Linux x86: Node.js v24 runtime (~43MB RSS), containerd-shim (~3MB), pause container (~1MB), and kubelet per-pod tracking (~2MB).
  • Virtual Machine (~512MB): AWS EC2 t3.nano, the smallest available EC2 instance with 512MB allocated memory.

Read Latency

  • Rivet Actor (0ms): State is read from co-located SQLite/KV storage on the same machine as the actor, with no network round-trip.
  • Redis (~1ms): AWS ElastiCache Redis (cache.t3.micro) in the same availability zone as the application.
  • Postgres (~5ms): AWS RDS PostgreSQL (db.t3.micro) in the same availability zone as the application.

Idle Cost

  • Rivet Actor ($0): Assumes Rivet Actors running on a serverless platform. Actors scale to zero with no idle infrastructure costs. Traditional container deployments may incur idle costs.
  • Virtual Machine (~$5/mo): AWS EC2 t3.nano ($0.0052/hr compute + $1.60/mo for 20GB gp3 storage) running 24/7. t3.nano is the smallest available EC2 instance (512MB RAM).
  • Kubernetes Cluster (~$85/mo): AWS EKS control plane ($73/mo) plus a single t3.nano worker node with 20GB gp3 storage, running 24/7.

Horizontal Scale

  • Rivet Actors (Infinite): Scale linearly by adding nodes with no single cluster size limit.
  • Kubernetes (~5k nodes): Officially supports clusters of up to 5,000 nodes per the Kubernetes scalability documentation.

Multi-Region

  • Rivet (Global edge network): Automatically spawns actors near your users and handles routing across regions.

Built-In Observability

Powerful debugging and monitoring tools from local development to production at scale.

Rivet Inspector

  • SQLite Viewer — Browse and query your actor's SQLite database in real-time
  • Workflow State — Inspect workflow progress, steps, and retries as they execute
  • Event Monitoring — Track every state change and action as it happens
  • REPL — Call actions, subscribe to events, and interact directly with your code

Deployment Options

RivetKit is a library. Connect it to Rivet Cloud or self-host when you need scaling, fault tolerance, and observability.

Just a Library

Install a package and run locally. No servers, no infrastructure. Actors run in your process during development.

npm install rivetkit

Get started →

Self-Host

Single Rust binary or Docker container. Works with Postgres, file system, or FoundationDB.

docker run -p 6420:6420 rivetdev/engine

Self-hosting documentation →

Rivet Cloud

Fully managed. Global edge network. Connects to your existing cloud — Vercel, Railway, AWS, wherever you already deploy.

Sign up →

Open source, permissively licensed — Self-hosting matters for enterprise deployments, cloud portability, and avoiding vendor lock-in. Apache 2.0 means you own your infrastructure. View on GitHub →

Getting Started

Use with Your Coding Agent

Give your coding agent the Rivet skills to create examples or integrate into existing projects:

npx skills add rivet-dev/skills

Works with Claude Code, Cursor, Windsurf, and other AI coding tools.

Start From Scratch

[View documentation →](https://www.rivet.d

readme truncated — read the full docs on github

Frequently asked questions

Is Rivet free to use?

Rivet is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Rivet do?

Build stateful backends with in-memory actors

What is Rivet written in?

Rivet is primarily written in Rust. Its source is publicly available at https://github.com/rivet-dev/rivet, and it has 6,144 GitHub stars.