Rivet 推出:在 S3 上擴充套件與編排代理
Launch HN: Rivet (YC W23) – Scale and Orchestrate Agents on S3
Rivet 是一套基於 actor 模式的代理編排器,主打低延遲與高密度。
- 冷啟動:p99 4.99 ms,單個 Actor 只佔 72 KB。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
Fast, high-density, scalable orchestration for agentic workloads.
Instead of a heavyweight sandbox per agent, each agent gets a lightweight Rivet Actor backed by S3.
4.99 ms p99 cold starts and 72 KB per Actor. Open source and self-hostable.
Quickstart • Documentation • Changelog • Discord • X
Getting Started
Use with Your Coding AgentGive your coding agent the Rivet skills to create examples or integrate into existing projects: npx skills add rivet-dev/skills Works with Claude Code, Cursor, Windsurf, and other AI coding tools. |
Start From Scratch |
What is Rivet?
Rivet is an orchestrator for agentic workloads built on the actor model. Each Rivet Actor is a long-lived process with in-memory state, a SQLite database, WebSockets for realtime, and scheduling, addressed by key. Create one per agent, session, user, or tenant, and run it on plain Node.js, Bun, or Rust.
- 72 KB per Actor: Actors share a node process instead of each booting a sandbox, so one server holds hundreds of thousands.
- 4.99 ms p99 cold starts: No image pull and no VM boot.
- SQLite backed by S3, at SSD speeds: 1.07 ms durable writes and 1.36 ms reads at p99, for about 10.4× less than replicated SSD storage.
- Hibernates when idle: Idle Actors cost nothing and wake on the next request with nothing lost.
Backend
import { actor } from "rivetkit"; import { db } from "rivetkit/db"; const agent = actor({ // Per-Actor SQLite database, persisted across restarts and hibernation db: db({ onMigrate: async (db) => { // Apply the SQLite schema await db.execute(`CREATE TABLE IF NOT EXISTS messages (role TEXT, content TEXT)`); }, }), actions: { chat: async (c, text: string) => { // Durably save the message await c.db.execute("INSERT INTO messages VALUES (?, ?)", "user", text); const messages = await c.db.execute("SELECT role, content FROM messages"); const response = streamText({ model: openai("gpt-5"), messages }); // Stream tokens to every connected client for multiplayer for await (const delta of response.textStream) { c.broadcast("token", delta); } // Durably save the response await c.db.execute("INSERT INTO messages VALUES (?, ?)", "assistant", await response.text); }, }, });
Client (frontend or backend)
// Connect to an Actor const agent = client.agent.getOrCreate("agent-123").connect(); // Listen for realtime events agent.on("token", delta => process.stdout.write(delta)); // Call an action on the Actor await agent.chat("how many r's in strawberry?");
Actor types
Every product Rivet ships is an Actor, scheduled by the same control plane.
- Actors: Long-lived processes with state, realtime, and scheduling built in.
- Agents: A durable process per agent, with memory that survives restarts.
- Workflows: Multi-step operations that replay instead of starting over.
- agentOS: Run the code your agent writes, securely, with granular control over network access, filesystem access, and resource limits.
- Dynamic Apps (preview): A backend per user, deployed the moment it is generated.
Built for everything agents need
- Coding agents: One Actor per agent, with a durable process and state that survives restarts.
- Agent app builders: Each generated backend deploys as its own Actor that scales to zero.
- Agents in your VPC: Run agents next to your databases and APIs, so no data leaves your cloud.
- Realtime apps: One Actor per document, room, or channel, broadcasting changes to every client.
How Actors compare to sandboxes
| Rivet Actor | Sandbox | |
|---|---|---|
| Cold start (p99) | 4.99 ms | 1.70 s |
| Memory per instance | 72.4 KB | 512 MiB |
| Storage | SQLite backed by S3, about 10.4× cheaper than replicated SSDs | Disk per sandbox |
Benchmark details & methodology
- Rivet numbers come from the published Rivet Actors vs Cloudflare Durable Objects benchmark, run on Rivet 3.0.3. Its repository has the raw samples and the scripts to reproduce them.
- Sandbox numbers are a documented default memory allocation and a third-party cold start benchmark.
- Storage cost compares S3 Standard with three Amazon EBS gp3 copies at AWS list prices.
- Sources, dates, and the full method are at rivet.dev/docs/benchmarking.
Features
- Fault tolerance: If a node goes down, its Actors move elsewhere with their state intact.
- HTTP & WebSocket networking: Call an Actor over HTTP or hold a live WebSocket to it.
- End-to-end type safety: Typed clients for your backend and React hooks for your frontend.
- Cron & scheduling: Wake an Actor on a schedule or at a time it sets for itself.
- Actor-to-Actor calls: Actors call each other by key across the cluster.
- OpenTelemetry: Traces, metrics, and logs in OTel format.
Deployment Options
Local & Self-HostRun Rivet locally while you build. In production, run the control plane on Docker, Kubernetes, or a VM on AWS, GCP, Azure, or Hetzner. S3 is the only dependency. npm install rivetkit |
Rivet CloudFully managed, dedicated clusters on AWS or GCP in any region. Run your nodes on Rivet Cloud or bring your own. |
BYOCRun the control plane inside your own VPC on AWS, GCP, or Azure, fully managed by Rivet. Your data never leaves your cloud. |
Every option runs the same control plane, from local dev to production. Talk to an engineer →
Works with the tools you already use
Typed SDKs for your backend and React hooks for your frontend. Rivet runs on native Node.js and Bun with no custom runtime, so your existing packages, tooling, and tests work unchanged.
Deploy nodes on: Docker Compose • Kubernetes • VM & bare metal • Hetzner • AWS ECS • Railway • Render
Runtimes: Node.js • Bun • Rust
Tools: Vitest • OpenTelemetry • Pino • AI SDK • OpenAPI • AsyncAPI
FAQ
Does Rivet have BYOC?
Yes. Rivet deploys into your own cloud account, including air-gapped environments: the control plane and storage run inside your VPC while Rivet operates them. See the BYOC docs.
Does Rivet have a cloud?
Yes. Rivet Cloud runs fully managed, dedicated clusters on AWS or GCP in any region. It can run your app's Docker image as nodes on Rivet Cloud, or you can bring your own nodes.
Can I self-host Rivet?
Yes. Rivet is fully self-hostable; see the self-hosting docs. The control plane runs anywhere a container runs, with guides for Docker Compose, Kubernetes, VMs and bare metal, Hetzner, Railway, Render, and AWS ECS. For enterprise support with a self-hosted deployment, contact us.
Do I still need Postgres, FoundationDB, or NATS?
No. An object storage bucket is the only dependency: there is no database to run and no message bus, and control plane instances find each other through the bucket. Rivet works with Amazon S3, Google Cloud Storage, Azure Blob Storage, and any S3-compatible store such as MinIO, Cloudflare R2, or Hetzner Object Storage. A local filesystem backend is available for trying Rivet on one machine.
Is Rivet open-source?
Yes. Rivet is open source under the permissive Apache 2.0 license. You're looking at it.
How does Rivet compare to sandboxes?
A sandbox boots a VM or container per agent, which is slow to start and sits mostly idle. A Rivet Actor runs inside a shared node process: 72 KB and 4.99 ms p99 to start, versus 512 MiB and 1.70 s for a sandbox, and it hibernates when idle. To run untrusted code your agent writes, use agentOS.
How does Rivet compare to Cloudflare Durable Objects?
Rivet is often used as an open-source alternative to Cloudflare Durable Objects that is easy to self-host and scales. It also fixes many of the constraints of Durable Objects: no 128 MB memory cap, bottomless storage instead of a 10 GB SQLite limit, Actors are not randomly evicted, and you control the runtime because Actors run on vanilla Node.js or Bun instead of a custom runtime. Rivet also adds built-in connection handling, event broadcasting, durable scheduling and cron, full Vitest support, lifecycle hooks for draining, and control over Actor upgrades. See the Cloudflare Durable Objects comparison.
Does Rivet use a custom V8 runtime?
No. Rivet runs on native Node.js and Bun, so your existing packages, tooling, and tests work unchanged.
Is Rivet like Erlang, Akka, or Orleans?
Rivet implements the virtual actor pattern, which is closest to Orleans, but focuses on what modern workloads need: SQLite persistence instead of simple JSON stores and support for modern runtimes. Erlang and Akka do not provide virtual actors out of the box, though ecosystem packages exist that offer functionality comparable to Rivet Actors.
Does Rivet require microVMs, gVisor, or nested virtualization?
No. Rivet only needs a standard process that connects to the control plane over WebSocket. That process can be Node.js, Bun, Rust, or anything else.
Projects in This Repository
| Project | Description |
|---|---|
| RivetKit TypeScript | Client & server library for building Actors |
| RivetKit Rust | Rust SDK |
| RivetKit Python | Python client (experimental) |
| RivetKit Swift | Swift client (experimental) |
| Control Plane | Rust control plane that schedules, routes, and persists Actors |
| ↳ Pegboard | Actor scheduling & networking |
| ↳ Gasoline | Durable execution engine |
| ↳ Guard | Traffic routing proxy |
| ↳ Epoxy | Multi-region KV store (EPaxos) |
| Dashboard | Inspector for debugging Actors |
| Documentation | Source for rivet.dev/actors/docs |
| Examples | Runnable examples |
Community
- Discord - Chat with the community
- X/Twitter - Follow for updates
- Bluesky - Follow for updates
- GitHub Discussions - Ask questions
- GitHub Issues - Report bugs
- Talk to an engineer - Discuss your use case