At a Glance:
Rivet Actors are lightweight, long-running serverless primitives for stateful workloads, designed for AI agents, collaborative apps, and durable multi-step workflows with in-memory state, built-in scheduling, and ~20ms cold starts.
Overview:
Rivet Actors is a serverless compute primitive for building stateful applications. It runs long-lived, lightweight processes where state is kept in-memory with automatic persistence via SQLite or a bring-your-own database. Each actor is designed to represent a single entity—like an AI agent, a user session, or a collaborative document—and includes built-in primitives for WebSockets, multi-step workflows with retries, durable queues, and scheduled cron jobs. RivetKit, the accompanying library, can run actors locally in-process for development, or connect to the managed Rivet Cloud service or a self-hosted cluster for production, with scaling that can go to zero when idle.
Key Decision Points:
Execution and state model: Each actor maintains co-located in-memory state for zero-latency reads, making it suited for workloads that require frequent, instant access to local state.
Deployment flexibility: Actors can run entirely in-process during development, be connected to a fully managed cloud with a global edge network, or deployed as a self-hosted Rust binary or Docker container using Postgres, FoundationDB, or the filesystem.
Target audience: Primarily aimed at developers building AI agents, real-time collaborative tools, and multi-step durable workflows who need per-entity isolation and built-in networking.
Supported runtimes and frameworks: Provides client libraries for TypeScript (stable), Rust, and Python (experimental), and lists integration support for frameworks like Next.js, Hono, Express, and runtimes like Node.js, Bun, and Deno.
Operational tooling: Ships with a built-in observability dashboard featuring a SQLite viewer, workflow state inspector, event monitor, and a REPL for direct interaction with running actors.
Core Features:
In-memory state with persistence: Reads and writes to co-located memory for zero network latency, with durable persistence backed by SQLite or a custom database.
Idle hibernation: Long-running actors can sleep when inactive and scale to zero to avoid idle infrastructure costs.
Built-in WebSockets: Provides native bidirectional real-time streaming between actors and clients.
Durable workflows: Supports multi-step operations with automatic retries across steps.
Scheduling: Allows setting timers and cron jobs directly inside an actor.
Global edge deployment: The managed cloud spawns actors close to end-users and handles cross-region routing automatically.
Use Cases:
AI agents: Developers can run each AI agent as its own actor to maintain persistent context, in-memory state, and schedule tool calls.
Real-time collaboration: A single actor can represent a collaborative document, broadcasting changes over WebSockets to all connected users.
Durable workflows: Applications requiring multi-step server-side operations with automatic retries and state persistence between steps can use actors as the execution unit.
Per-tenant state management: An architecture where each tenant gets its own actor for low-latency in-memory reads and isolated, durable data storage.
Open-Source Alternative Value:
Rivet Actor’s core orchestration engine and client libraries are released under the Apache 2.0 license. The project provides a self-hosting option as a single Rust binary or Docker container, allowing developers to run the full system on their own infrastructure. This offers an alternative to proprietary serverless workflow and real-time platforms, with the option to use the managed cloud for global edge deployment without being forced into a single deployment model.




