explaingit

rivet-dev/rivet

5,532RustAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

A framework for building stateful real-time server processes called actors, where each user session keeps its own data in memory for fast responses without external database calls for common operations.

Mindmap

mindmap
  root((rivet))
    What it does
      Actor framework
      Stateful servers
      Real time
    Tech Stack
      Rust engine
      TypeScript SDK
      WebSocket
    Features
      In-memory state
      Scheduling
      Auto hibernation
    Deploy Options
      Local dev
      Self hosted
      Rivet Cloud
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build an AI chatbot where each conversation keeps its full history in memory for instant context without database queries.

USE CASE 2

Create a real-time collaborative document editor where each document is one actor broadcasting changes to all connected users.

USE CASE 3

Run background tasks with automatic retries and scheduling without setting up a separate job queue system.

Tech stack

RustTypeScriptJavaScriptWebSocketDocker

Getting it running

Difficulty · moderate Time to first run · 30min

Self-hosted production deployment requires Docker, Rivet Cloud option skips infrastructure setup entirely.

Open source and free to use including in commercial applications.

In plain English

Rivet is a framework for building stateful server processes called actors. An actor is a lightweight, long-running program that holds its own data in memory and can communicate with clients in real time. The idea is that instead of a traditional server where every request is handled independently and state is stored in a separate database, each actor keeps its own state right next to where the code runs, making reads and writes much faster and simpler to reason about. The model is well-suited to use cases where each user, session, or conversation naturally has its own isolated context. For example, in an AI chatbot, each conversation would get its own actor that keeps the full message history in memory. When the user sends a new message, the actor processes it, streams the response back in real time, and saves the result. No external database call is needed for the most common operations. For a collaborative document editor, each document would be one actor broadcasting changes to everyone connected to it. Actors support WebSocket connections for real-time two-way communication, a built-in message queue for reliable background processing, scheduling for timed and recurring tasks, and multi-step workflows with automatic retries if a step fails. When an actor is idle, it hibernates and costs nothing to run. When needed again, it starts back up in roughly 20 milliseconds. The framework provides a JavaScript and TypeScript library for writing actors, and a Rust-based engine that runs them. There are three ways to deploy: running everything locally inside your own application process during development, self-hosting the engine on your own servers using Docker or a single binary, or using Rivet Cloud, the managed hosting option that handles scaling and distributes actors across a global network so they run close to your users. A built-in browser-based inspector lets developers watch actor state, browse the actor's local database, monitor events, and send commands directly to a running actor during development and in production.

Copy-paste prompts

Prompt 1
Using Rivet actors, help me build a TypeScript actor for an AI chat session that stores message history and streams responses back to the client.
Prompt 2
How do I deploy Rivet actors using Docker on my own server and set up WebSocket connections from a React frontend?
Prompt 3
Help me add a scheduled task to a Rivet actor that sends a reminder message every 24 hours.
Prompt 4
How does Rivet actor hibernation work and how do I make sure my actor state is saved before it goes to sleep?
Prompt 5
Walk me through creating a multi-step workflow in Rivet with automatic retries if a step fails.
Open on GitHub → Explain another repo

← rivet-dev on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.