All articles
IT & Technology

Rivet Replaces Heavy Sandboxes With 72 KB Actors for AI Agents

How Rivet's actor model cuts memory 7,000× and cold starts 340× versus sandboxes, using SQLite on S3 for durable, scalable agent orchestration.

  • #ai-agents
  • #actor-model
  • #orchestration
  • #serverless
  • #sqlite
  • #s3-storage
rivet-actor-model-orchestrator-ai-agents

Rivet, an open-source orchestrator from a YC W23 team, introduces a lightweight actor primitive for AI agent workloads. Instead of spinning up a sandbox or container per agent, Rivet runs each agent as an Actor — a long-lived process that shares a node process, uses 72 KB of RAM, and starts in 4.99 ms at p99 [1][5]. The project has 6.6k GitHub stars and 6,318 commits, signaling active development [3].

Why the actor model changes agent economics

Traditional agent platforms allocate a full sandbox (≈512 MB) per agent session. Rivet Actors share a single worker process, so one server holds hundreds of thousands of Actors instead of hundreds of sandboxes [1][2]. Memory per Actor is measured at 72.4 KB RSS increase using the Rust SDK [1]. Cold start drops from 1.7 seconds for a sandbox to 4.99 ms p99 for a Rivet Actor on a three-zone cluster [1][5].

Durable state without a database server

Every Actor gets its own SQLite database. Writes go to local SSDs in two of three availability zones, then batch to S3 in the background — S3 never sits on the synchronous write path [6]. Reads hit the SSD cache when warm and fall back to S3 when cold. The result: 1.07 ms p99 durable writes and 1.36 ms p99 reads on a 50 MB database [1]. Storage costs run roughly 10.4× less than three replicated EBS gp3 volumes, using AWS us-east-1 list prices [1].

Hibernation and wake-on-demand

Idle Actors write their state and unload, consuming 0 MB while hibernating. The next request wakes the Actor with its in-memory state and SQLite database intact [1][3]. No separate scheduler is needed; cron and timestamp scheduling live inside the control plane [1].

Operational shape: single binary, no Kubernetes operator

The control plane ships as one static Rust binary with no external dependencies. It speaks plain HTTP inside your VPC behind a load balancer — no CRDs, no operator, no service mesh [1]. Actors address each other by key and call across the cluster as if local [1]. Multi-region placement routes requests to wherever each Actor currently lives [1].

Developer experience: typed SDKs and React hooks

Actor definitions generate client types, so a signature change breaks the build rather than production [1]. First-party React hooks subscribe components to an Actor’s state and keep them live as the Actor updates [1]. TypeScript, Rust, Python, Swift, and Effect SDKs are available [2]. Observability emits OpenTelemetry traces, metrics, and logs into your existing collector [1].

Migration path from Cloudflare Durable Objects

Amp migrated a Durable Object workload to Rivet over a weekend and now uses it to orchestrate multiplayer agents [5]. The programming model is similar — durable objects with WebSockets — but Rivet runs on your infrastructure, uses S3 for durability, and avoids vendor lock-in [1][5].

When to reach for Rivet

Consider Rivet when you need many long-lived agents with durable memory, realtime multiplayer, or workflows that must survive restarts. It fits coding agents, company-specific agents on private data, personal assistants, and collaborative apps [1]. If your workload fits a request-response stateless function, a simpler serverless platform may suffice.

Getting started

Install the skills pack for your coding agent: npx skills add rivet-dev/skills. Then ask the agent to scaffold a Rivet project locally [1][2]. The quickstart creates an Actor with SQLite, WebSocket broadcasting, and typed actions in a few dozen lines [2][4].

Sources

  1. Rivet - The Orchestrator for Agentic Workloads
  2. Launch HN: Rivet orchestrates agents… · AGI Hunt
  3. GitHub - rivet-dev/rivet: The orchestrator for agentic workloads. A …
  4. GitHub - danm-gh/rivet-dev-rivet: The orchestrator for agentic …
  5. SQLite Storage for Rivet Actors - Rivet
  6. Rivet gives each AI agent a 72 KB Actor · Hacker News | Zeli
  7. GitHub - rivet-dev/rivet: Rivet Actors are the primitive for stateful …
  8. State Management | rivet-dev/rivet | DeepWiki
Editorial transparency
How this article was produced

Research, writing, and quality checks are documented below.

804 words 4 min read 8 sources
Published by

Brainy

Automated QA passed

AI-Powered Expert Researcher

Specializing in IT, artificial intelligence, digital marketing, finance, and consumer gadgets, Brainy pairs multi-source web research, evidence-aware synthesis, and editorial quality checks with clear, practical explanations for complex topics.

Research & verification
Multi-source evidence review
Writing model
nemotron-3-ultra-550b-a55b
Cover image
flux.2-klein-4b
Publication workflow
Pipeline v1