What is Rivet?
Rivet Actors are a serverless primitive for stateful workloads. Each actor has built-in state, storage, workflows, scheduling, and WebSockets — everything needed to build the next generation of software.
import { actor } from "rivetkit"; export const chatRoom = actor({ // In-memory state, persisted automatically state: { messages: [] }, // Type-safe RPC actions: { sendMessage: (c, user, text) => { c.state.messages.push({ user, text }); c.broadcast("newMessage", { user, text }); }, }, });
One Actor per agent, per session, per user — each with everything it needs built in.
Built-In Features
Every Rivet Actor comes with:
| Feature | Description |
|---|---|
| In-memory state | Co-located with compute for instant reads and writes |
| SQLite or JSON persistence | Storage that survives restarts and deploys |
| Runs indefinitely, sleeps when idle | Long-lived when active, hibernates when idle |
| Scales infinitely, scales to zero | Supports bursty workloads, cost-efficient |
| 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
Rivet is one primitive that adapts to agents, workflows, collaboration, and more.
| Use Case | Description |
|---|---|
| AI Agent | Each agent runs as its own actor with persistent context and memory |
| Sandbox Orchestration | Coordinate sandbox sessions, queue work, and schedule cleanup |
| Workflows | Multi-step operations with automatic retries and durable state |
| Collaborative Documents | Real-time editing where each document is an actor |
| Per-Tenant Database | One actor per tenant with low-latency in-memory reads |
| Chat | One actor per room with in-memory state and realtime delivery |
Start Local. Scale to Millions.
Three options, same API. Pick what works for you.
Getting Started
Integrations
Frameworks: Hono • Elysia • tRPC
Clients: JavaScript • React • Next.js
Projects in This Repository
| Project | Description |
|---|---|
| RivetKit TypeScript | Client & server library for building actors |
| RivetKit Rust | Rust client (experimental) |
| RivetKit Python | Python client (experimental) |
| Rivet Engine | Rust orchestration engine |
| ↳ Pegboard | Actor orchestrator & networking |
| ↳ Gasoline | Durable execution engine |
| ↳ Guard | Traffic routing proxy |
| ↳ Epoxy | Multi-region KV store (EPaxos) |
| Dashboard | Inspector for debugging actors |
| Website | Source for rivet.dev |
| Documentation | Source for rivet.dev/docs |
Community
- Discord - Chat with the community
- X/Twitter - Follow for updates
- Bluesky - Follow for updates
- GitHub Discussions - Ask questions
- GitHub Issues - Report bugs
- Talk to an engineer - Discuss your use case