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.
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 |
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 |
Three options, same API. Pick what works for you.
|
Single Rust binary or Docker container. Works with Postgres, file system, or FoundationDB. docker run -p 6420:6420 rivetkit/engine |
Fully managed. Global edge network. Connects to your existing cloud — Vercel, Railway, AWS, wherever you already deploy. |
Apache 2.0. Audit the code, contribute features, run it however you want. |
|
Give your coding agent the Rivet skills to create examples or integrate into existing projects: npx skills add rivet-dev/skillsWorks with Claude Code, Cursor, Windsurf, and other AI coding tools. |
Frameworks: Hono • Elysia • tRPC
Clients: JavaScript • React • Next.js
| 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 |
- 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