Rivet places each AI Agent in a lightweight Actor and persists its SQLite state through S3. The approach mainly reduces idle infrastructure costs for waiting-heavy Agents, but state recovery, concurrency consistency, and security isolation still require independent validation.
Rivet is a YC W23 project. The company positions it as a high-density, scalable orchestrator for agentic workloads, built around the actor model. The source code is available in the rivet-dev/rivet repository.
Why Not Give Every Agent Its Own Sandbox?
Conventional Agent execution environments generally follow one of two models. One runs multiple processes on the same machine, separating them with containers or permission boundaries. The other starts a full sandbox for each Agent.
The second model offers stronger isolation and can accommodate heavy dependencies such as browsers and code interpreters. The problem is that long-running tasks may keep dozens of Agents active at once. Until every sandbox is released, compute, network, and storage costs continue to accumulate.
Rivet takes a different approach with “lightweight actors backed by S3.” Its documentation is direct: rather than running a heavyweight sandbox for every Agent, it gives each Agent a lightweight Actor backed by S3.
Two concepts need to be kept separate:
- An Actor is a stateful unit in the runtime, not a replacement for an Agent's reasoning logic.
- S3 is the state backend; it neither schedules models nor makes decisions for the Agent.
Rivet therefore eliminates much of the need for a permanently resident execution environment rather than removing sandbox capabilities altogether. Projects still need an external execution layer when Agents run untrusted code or invoke system tools.
Its advantages emerge with a different workload profile: long Agent turns in which most of the time is spent waiting for tool results, user input, or synchronization with other participants. Keeping a full environment resident for every instance is inefficient in these cases.
What S3-Backed Actors Actually Solve
A Rivet Actor can provide several capabilities at once:
- A long-lived process for extended Agent turns
- In-memory state for retaining context
- A WebSocket service for multi-user collaboration
- Persistent SQLite storage backed by S3
- Hibernation while idle
The key benefit is not that an Actor can chat. It is that task state has a clear owner.
After a long-running task restarts, conventional implementations often need to rebuild containers, reinstall dependencies, restore logs, and replay execution from checkpoints. Rivet stores data that must survive across turns in Actor state, while S3 persists the SQLite data. Recovery does not require keeping an entire execution environment attached to the task.
The WebSocket service addresses a separate need: multiple users or Agents can interact around the same state. It is not simply an HTTP worker that accepts requests and returns text. A connection can remain open between server and client while the Actor maintains session state in memory.
The model closely resembles Cloudflare Durable Objects. Both bind logic and state to addressable actors instead of requiring all business logic to share one giant process. Durable Objects are more like stateful compute units within a managed platform, whereas Rivet emphasizes open source and self-hosting.
The distinction comes down to ownership. Cloudflare provides platform integration, edge locations, and managed operations. Rivet provides self-hostable code and greater freedom in choosing a backend. The trade-off is that teams must manage infrastructure, upgrades, and disaster recovery themselves.
Long-Turn Tasks Depend on More Than the Model
Larger model context windows do not automatically solve task-state problems.
Consider an Agent fixing a cross-repository outage. It reads code, forms hypotheses, runs tests, and waits for CI results. A contributor may add information midway through, requiring the Agent to merge that feedback into its existing assessment. The entire process can last several hours.
Four issues are usually the most difficult:
- Which information belongs only in memory
- Which structured results must be durably written to disk
- How execution recovers after a process interruption
- Who owns the latest state when several people act at the same time
The actor model's answer is not “store more history.” It is to keep state with the execution unit.
Short-lived data can remain in memory. Structured state goes into SQLite. S3 provides persistence when data must survive across processes or machines. Multi-turn tasks no longer need to begin in a blank environment every time.
Hibernation also fits this workflow. When an Agent receives no new events for a while, it releases its runtime resources. A later request restores context from persistent state instead of keeping an idle process tied up with CPU and memory.
This is especially useful for research Agents. An experiment may run dozens of candidate approaches in parallel, with each candidate spanning many turns before a person evaluates the results. Keeping a heavyweight sandbox resident for every candidate makes the resource bill difficult to justify.
Rivet also suits applications that need shared workspaces or real-time collaboration. An Actor exposes a WebSocket endpoint, allowing multiple clients to connect to the same state without repeatedly synchronizing it at the application layer.
Rivet is not an Agent framework that works simply by connecting a model. It handles runtime and state orchestration. Model calls, tool permissions, prompts, and retry policies remain the application's responsibility.
The Practical Boundaries of an Open-Source Orchestrator
The combination of S3, SQLite, and Actors is lightweight, but it is not free.
State latency comes first. An Actor keeps hot state in memory and writes cold state to S3. Whether task recovery is fast enough depends on data volume, request patterns, and whether the read path uses caching. The official repository provides deployment and configuration guidance, but its README cannot replace the team's own load testing.
SQLite has its own limits. It works well for structured state within a single Actor, but it is unsuitable for dozens of Actors writing concurrently to the same database. An S3 persistence backend does not automatically resolve concurrent write conflicts. Applications still need idempotent operations, state versions, and explicit recovery boundaries.
Security boundaries require separate consideration.
A lightweight Actor is not inherently a secure sandbox. If an Actor can execute shell commands, access credentials, or run third-party code, teams still need containers, isolated accounts, network policies, and audit logs. Workloads that genuinely require local GPUs, complex dependencies, or compute-intensive execution should not be forced into Actors merely to make them lighter.
Which teams are likely to benefit first?
- Teams building Agent products with long runtimes and frequent state checkpoints
- Teams operating many short-lived or waiting-heavy tasks concurrently
- Research tools that need real-time WebSocket collaboration
- Open-source users who want self-hosting and can accept some operational responsibility
Which workloads should not migrate yet?
- Agents that require a complete Linux toolchain and browser sandbox each
- Workloads requiring local GPU inference or high-throughput computation
- Existing database systems that depend on a single-writer transaction model
- Teams unable to maintain distributed state, monitoring, and recovery infrastructure
The practical recommendation is to validate three areas with a small project: Actor cold-start recovery time, state consistency under concurrent events, and S3 costs after sustained operation. Test only the normal path at your peril. Forcibly terminating Actors, replaying messages, and simulating SQLite write failures often reveal more than a successful demo.
Project documentation and architecture details are available in the Rivet GitHub repository.
Editorial Perspective
Rivet is worth examining because it decomposes the Agent runtime into persistable, hibernating state units. That choice differs from the older model of assigning a full machine to every Agent: it shifts the emphasis from compute isolation to state continuity.
It is likely to influence research workloads and multi-agent workflows before ordinary chat applications. The former involve extensive waiting, recovery, and human intervention, making state costs more significant. The latter can usually be handled with existing backends. The real obstacles may lie in operational details such as Actor recovery logic, SQLite boundaries, S3 access patterns, and state consistency during failures.
The official descriptions of “high density” and “scalability” should not yet be treated as performance conclusions. As the number of Actors grows, teams need to measure how scheduling and recovery costs change and whether hibernation thresholds remain appropriate under real workloads. If those costs stay within an acceptable range, this architecture may offer more long-term value than another layer of tool-call wrappers.