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 3
looplilt 2 days ago|
Keeping S3 off the write path is the design choice that makes the whole pitch click for me: acknowledging a write once two of three availability zones have it on SSD, then batching to object storage in the background, gets durability without paying object-storage latency on every turn. That also explains why separating the agent loop from the sandbox matters, since a long-running turn shouldn't have to keep a heavyweight environment warm just to hold its state. My main question is how that tiering behaves when an actor wakes after a long idle period and its data has fully cooled to S3: is that 138 ms read the typical cost, or does it get worse with larger session transcripts and filesystems?
esafak 2 days ago||
My first reaction: this is weird; agentic workloads have many problems but orchestration speed ain't one of them. You spend most of the time waiting for the model! Is this for small models?

I would have lead with the durability aspect.

feifan 2 days ago|
this is for people/products that run dozens/hundreds of agents concurrently.
stiiv 2 days ago||
What if I just want self-hostable TypeScript actors _without agents_? I'm a long-time fan of Akka et. al., but to my knowledge Node never got a proper framework.
NathanFlurry 2 days ago|
Hey! Rivet is pure actors at its core, there's nothing inherently specific to agents.

Instead, we provide an optional agent library that runs Pi Durable on top of actors (https://rivet.dev/agents/docs/quickstart/) or you can write your agent from scratch if you choose.

timsuchanek 2 days ago||
Congratz on the launch! I love how efficient this is - I'm pretty sure more agents will be built this way than having the heavy sandbox. Quick note, in the README on GH there's a link to https://github.com/rivet-dev/rivet/blob/main/engine/packages... which doesn't lead anywhere.
NathanFlurry 2 days ago|
Thanks Tim! Will get that fixed.
dragonkhoi 2 days ago||
Been running Rivet v3 self-hosted on AWS and it's dope!
NathanFlurry 2 days ago|
Love to hear it! Don't hesitate to share feedback in our Discord: https://rivet.dev/discord
minraws 2 days ago||
Interesting idea, horrible ux atm though, my codex/claude whatever is just as confused as me what and how are we supposed to use it exactly and all the edge cases. Hope you folks can figure out some interesting ideas to improve it though.
NathanFlurry 2 days ago|
Hey! Can you share a bit more about what your agent is saying so we can fix this? Would love to chat with you in Discord too: https://rivet.dev/discord
chicagobuss 2 days ago||
looks cool - I'm curious how this is similar / different from celld

..and how you're doing anything with s3-backing durably and safely with latency numbers less than several hundred ms

Tanjreeve 2 days ago|
In OP

> 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.

chicagobuss 2 days ago||
Got it. This is the og confluent cloud architecture, then. That much data crossing availability zones might surprise people people on AWS since that will add at least $0.04 for every gb sent in
Tanjreeve 2 days ago||
I'm curious if it actually needs to be across AZs versus if it just needs a few instances but yes as written there is a trade off happening.

The other route for fast S3 writes others have used (Turso springs to mind) is express S3 zones but those have a lot of region specific fine print still.

drewdestar 2 days ago||
[dead]
davmuldoon_ai 2 days ago||
[dead]
bigbuppo 2 days ago|
Ooh, so mod_rivet is getting funding? That's great. Tcl does not get enough love these days.
More comments...