Top
Best
New

Posted by NathanFlurry 2 days ago

Launch HN: Rivet (YC W23) – Scale and Orchestrate Agents on S3(github.com)
Hey HN, this is Nathan and Nicholas from Rivet (https://rivet.dev) – a fast, high-density, and scalable orchestrator for agentic workloads using the actor model. Rather than running a heavyweight sandbox per agent, each agent gets a lightweight actor backed by S3.

Actors provide a long-lived process for long agent turns, in-memory state for context, a WebSocket server for multiplayer, durable SQLite storage backed by S3, and hibernation when idle.

It's a similar model to Cloudflare Durable Objects, but it’s open source and self-hostable.

Here’s a video walkthrough: https://www.youtube.com/watch?v=3Ev6I7DOV9c

When we went through YC in 2023, we were building infrastructure for multiplayer games like Diep and Krunker. This involved heavily optimizing high-throughput matchmaking, real-time player messages, and blitz scaling. Through that process, we spent a lot of time on workloads where Postgres couldn't keep up with our throughput. We started out by hacking together Lua scripts on top of Redis, but this became too cumbersome to maintain and upgrade. This led us to extend our game server orchestrator to support what we call Rivet Actors today: many lightweight workers with in-memory state and durable storage. By using actors, we were able to serve tens of millions of monthly active users.

As agents grew in popularity, it became clear that running agents in sandboxes is inefficient. Sandboxes are expensive, mostly idle, and slow to start. Developers started using actors because they are far more memory efficient (72 KB baseline for actors vs 512 MB for a minimal sandbox) and fast to start (4.9 ms p99 for actors vs 1.7 s p99 for sandboxes).

For example, Amp is using Rivet to orchestrate multiplayer agents. They originally tried to build on Cloudflare Durable Objects, but couldn’t launch because of the platform’s limitations and unresponsive support. They migrated to Rivet Actors in a weekend and deploy on-prem. Rivet’s flexible architecture lets them adapt it to their own use cases without being constrained by a framework or the memory, storage, and runtime limits of Cloudflare Durable Objects.

Under the hood, Rivet is backed by S3 while maintaining SSD speeds.

Why S3? Previously, Rivet ran on FoundationDB. However, we were surprised to find that companies are storing orders of magnitude more data on Rivet Actors than in Postgres, such as large session transcripts, agent artifacts, and full POSIX filesystems. As their data grew, they had to start paying for SSDs that sat mostly idle with old transcripts. This led us to double down on S3 as our primary storage medium without sacrificing performance. This choice means that data stored on Rivet is 10× cheaper than on EBS gp3 while maintaining SSD speeds.

It’s not as simple as writing data straight to S3. Lots of PUTs for tiny blobs of data are slow and expensive. Instead, we use an SSD tier to optimize speed and cost:

When you write data to an actor’s SQLite database, the write is acknowledged once SSDs in 2 of 3 availability zones have it. Then, the data is batched to S3 in the background. This means that S3 is never on the write path, which lowers latency and cost. When reading data or waking an actor, Rivet reads from SSDs if already cached and falls back to S3 if not. SSD caches can be tuned to meet your needs, giving you configurable tiered storage for your actors.

This architecture lets Rivet provide 1.07 ms durable writes (3 AZ, p99), 1.36 ms reads (p99), and 138 ms reads from object storage (p99).

We’ve spent a lot of time making sure that Rivet can run wherever you need it. Self-hosting requires deploying a single Rust binary with S3 as the only dependency, Rivet Cloud lets you deploy dedicated clusters on AWS or GCP in any region, and BYOC lets us deploy Rivet to your VPC without having to operate it yourself. Rivet also runs identically in local dev as in production, since Rivet is a lightweight binary that runs anywhere

Rivet Actors can be written in TypeScript or Rust. Out of the box, they support agents (Pi Durable), workflows, real-time, multiplayer, running AI-generated code, Durable Streams, and integrations with tools like Vercel’s Eve and Turso. See all of our available guides, or point your agent at them: https://rivet.dev/docs/#guides

Try it out now, by reading our quickstart guides (https://rivet.dev/docs/) or ask your agent: “Run npx skills add rivet-dev/skills, then build a multiplayer chat agent and run it locally.”

We’d love to get feedback on your experience with Rivet! We’re deeply invested in making Rivet an easy-to-self-host, flexible, and efficient way to run agentic workloads.

GitHub: https://github.com/rivet-dev/rivet

Architecture: https://rivet.dev/docs/architecture/

Benchmarks: https://rivet.dev/docs/benchmarking/

Self-hosting: https://rivet.dev/docs/deploy/self-host/

120 points | 59 commentspage 2
alexey_anshakov 2 days ago|
Moving state persistence to write-ahead SQLite tiered into S3 is a very clean answer to the latency-cost trap of raw object storage. The big operational win with decoupled actor state like this is avoiding zombie locks when an agent execution times out mid-turn. Curious how you handle split-brain fencing if an actor network partition occurs while a batched write is still draining to S3.
AlexeyBelov 1 day ago|
LLM bot.
alexey_anshakov 1 day ago||
Not a bot, just a systems engineer genuinely interested in tiered storage and state durability. SQLite with S3 persistence is a topic I build around every day.
sarathkavuru 2 days ago||
Curious how hibernation works across a multi-minute agent turn with tool calls in between. When the actor wakes, is conversation state just the SQLite snapshot, or do you keep a warm in-memory buffer for the active turn? Also would love a rough density number—actors per host—for a coding-agent style workload with a WebSocket client attached.
jaekwon 2 days ago||
Not using the actor model, and yet massively parallel: https://gnosh.ai/swarm.html

I wonder when one approach will be used over the other. Actually, I can imagine both approaches working together.

Just filed two provisional patents on this stuff today; build on gno.land and let's talk shop, I see symbiosis.

ATechGuy2 2 days ago||
Congrats on the launch! Rivet seems neat; will definitely give it a spin.

> Sandboxes are expensive, mostly idle, and slow to start.

Many sandboxing startups would disagree. Do you have any numbers to support?

NathanFlurry 2 days ago|
Appreciate it! Would love to hear feedback when you do: https://rivet.dev/discord

> Many sandboxing startups would disagree. Do you have any numbers to support?

There is no one-size-fits-all, but we're finding Rivet's benefits fit well for most agent workloads. I don't believe sandboxes are going away, but I think different workloads will move to specialized architectures.

Regarding cost, there are F500 companies using Rivet's tools for saving cost for use cases like RL.

Regarding coldstarts, it depends heavily on the use case, and there's not a one-size-fits-all. Benchmarks are pulled from Compute SDK sandbox benchmarks, more here: https://rivet.dev/docs/benchmarking/

wsxiaoys 2 days ago||
Same problem here. Internally we simulated it with just-bash plus whatever filesystem was handy. For production we went with DO after surveying their agent ecosystem, but it has since split into two paths (@cloudflare/agents or think vs. @cloudflare/computer) with real trade-offs. Rivet's s3 setup looks like a much closer fit for us — I'd want to try it on the next project.
NathanFlurry 2 days ago|
Let us know how it goes! We're active in our Discord: https://rivet.dev/discord

We're big believers in lightweight sandboxing approachs akin to Durable Objects in addition to existing x86 sandboxes.

apsurd 2 days ago||
Wouldn't an agent in any capacity need a sandbox runtime to do agentic work? When you say "sandboxes are too slow" do you mean needing to boot the sandbox to get back Agent state? Is the idea that state/memory/context and runtime env are separate concepts in rivet?

(I'm a professional developer but don't do any orchestration so trying to understand from basic mental model pov)

k9294 2 days ago||
There is a notion right now of decoupling the agent loop from the sandbox, so the sandbox isn't waiting for request-response from the agent. This would probably be 90+% of all the agent work.

If you combine this with products like Sprites from Fly.io (or OSS version - agent substrate), where you pay only per execution request in a sandbox, you can have huge savings compare to the event loop inside the sanbdox. You will be billed only for request executions (tens of milliseconds per read/write, hundreds of milliseconds per search, etc.) and zero for all the waiting time during the the inference phase.

Also, if you don't require a real Linux sandbox — you might actually emulate the environment, e.g. just-bash idea with linux-like environment to give agents something that looks like their native habitat, but under the hood, it can be just CF Durable Objects SQLite or whatever else.

Probably(?) almost all knowledge work doesn't require a Linux sandbox. You can just build a document reading and editing agent that does tool calls and connects to other products via MCPs, APIs, etc. And lightweight actors make a lot of sense to me in these cases.

NathanFlurry 2 days ago|||
Exactly this.

> Also, if you don't require a real Linux sandbox — you might actually emulate the environment

We built agentOS for this: https://rivet.dev/agentos/

It provides Linux-compatible sandboxing using V8 / WebAssembly. Supports full POSIX filesystems, networking stacks, and process trees.

apsurd 2 days ago|||
This is a very helpful explanation, thank you. The part about basically duck-typing an Agent's environment and tool access is particularly insightful.
NathanFlurry 2 days ago||
Hey!

> Wouldn't an agent in any capacity need a sandbox runtime to do agentic work?

Developers on Rivet use 3 different patterns:

- Just agents: many agents just need tools, such as customer support or personal agents

- Agents with lightweight sandbox: Rivet provides a V8 / WebAssembly sandboxing library for running JS & Python with a filesystem, which covers most workloads like data analysis, file processing, evals, and code mode (https://rivet.dev/agentos/)

- Agent outside of the sandbox: expose the sandbox to the agent as tools, which is better for blast radius, trust boundary, and orchestration (see below)

> Is the idea that state/memory/context and runtime env are separate concepts in rivet?

Exactly, Rivet Actors support running the harness outside of the sandbox. It's often referred to "separation of head from the hands."

I wrote a bit about why a while back: https://rivet.dev/blog/2026-07-27-run-your-harness-outside-t...

> When you say "sandboxes are too slow" do you mean needing to boot the sandbox to get back Agent state?

Specifically coldstarts. As LLMs are getting faster and have more realtime use cases, sandboxes are become the bottleneck on time to interactive for an agent.

coindefdev 2 days ago||
The hard part for me has not been getting agents to write code. It has been keeping a bunch of long-running ones alive without burning through quota every few hours. Suspend/resume and cost tracking that I do not have to build myself would help.
SriniK 2 days ago||
Congrats! How is the security posture? Without really comparing isolation and sandboxing etc.. comparing with E2B is not the same.
NathanFlurry 2 days ago|
Hey! Rivet includes a library for running untrusted user code called agentOS: https://rivet.dev/agentos/

It provides Linux-compatible sandboxing using V8 / WebAssembly. Supports full POSIX filesystems, networking stacks, and process trees. Security-wise, it's the same model as Cloudflare Workers & Chromium.

Rivet is frequently used for running the harness outside of the sandbox. Wrote a bit about why here: https://rivet.dev/blog/2026-07-27-run-your-harness-outside-t...

canadiantim 2 days ago||
This is soooo cool! Awesome!

You mention support for Turso, like we could use Turso instead of sqlite?

Amazing work though, definitely will be following with keen interest and likely adopting it! Love that the genesis came from trials and tribulations for game dev.

Upbiddr 2 days ago|
Congrats on the launch! The explanation of keeping S3 off the write path made the storage model much easier to understand. For someone starting with a small self-hosted deployment, what tends to be the first operational challenge as usage grows?
NathanFlurry 2 days ago|
Hey! We’ve invested heavily in making self-hosting simple compared to the standard. Scaling up is just a matter of adding nodes.

We also provide guides for every major cloud, and no special tuning is required as you add nodes.

If you’re self hosting and have questions, please let us know on Discord or GitHub! https://rivet.dev/discord

More comments...