Open-source infrastructure for long-lived, in-memory processes called Actors. Combines state and compute with sub-millisecond latency, realtime capabilities, and horizontal scaling.

Overview:

Rivet is a lightweight runtime designed around the concept of "Actors" — long-running, stateful processes intended for workloads like AI agents, collaborative applications, and durable execution. State is kept in-memory with automatic persistence to a database. It targets developers building applications that require per-user, per-session, or per-agent state, real-time communication, and workflow orchestration. Rivet is structured as a library (RivetKit) that can run locally, be self-hosted, or be deployed on a fully managed cloud platform.

Core Features:

  • In-memory state with persistence: State is co-located with compute for fast reads and writes, and is automatically persisted using SQLite or a user's own database.

  • WebSockets: Built-in real-time bidirectional streaming for communication with actors.

  • Workflows: Multi-step operations with automatic retries, scheduling, and durable state across steps.

  • Queues: Durable message queues for reliable asynchronous processing within an actor.

  • Scheduling: Timers and cron jobs can be set up within an actor.

  • Idle hibernation: Actors run indefinitely while active and hibernate when idle to reduce costs.

Use Cases:

  • AI Agent: Each agent runs as its own actor with persistent context, memory, and the ability to schedule tool calls.

  • Workflows: Multi-step operations that require automatic retries, scheduling, and durable state across different steps.

  • Real-time collaboration: Each document can be an actor broadcasting changes to all connected users for collaborative editing.

  • Chat rooms: One actor per room or conversation handles in-memory state, persistent history, and real-time message delivery.

Why It Matters:

Rivet provides a primitive specifically designed for stateful workloads, filling a gap for developers who find traditional infrastructure like Kubernetes Pods or VMs too heavy for per-session or per-agent processes. The README positions it as an alternative to Redis or Postgres for state storage, with sub-millisecond read latency by co-locating state with compute. Its architecture, based on per-process actors with built-in workflows, queues, and WebSockets, can be deployed as a library, self-hosted, or used with a managed cloud service. The project is licensed under Apache 2.0.

ShareXLinkedInReddit

Related tools

Project stats

Stars

5,488

Forks

180

License

Apache-2.0

Metadata

Alternative to
Cloudflare Workers