Skip to content
/ rivet Public

πŸ”© The open-source serverless platform. Easily deploy & scale AI agents, complex workloads, and backends β€” all on a frictionless platform that runs anywhere.

License

Notifications You must be signed in to change notification settings

rivet-gg/rivet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rivet

The open-source serverless platform.

Easily deploy and scale AI agents, real-time applications, game servers, and complex backends on a frictionless platform that runs anywhere.

GitHub Discussions Discord Rivet Twitter Rivet Bluesky License Apache-2.0

Code snippets

Overview

Rivet is a developer-focused serverless infrastructure platform that unifies stateless functions, stateful actors, and containerized workloads. It provides simple primitives to build your backend without managing servers. Leverage Rivet Actors to create resilient, long-lived services that maintain in-memory state between requests.

Whether you’re building AI-driven services, collaborative apps, multiplayer games, or any cloud backend, Rivet’s technology provides the performance and scalability you need in a portable, open-source package.

Key Characteristics

  • Open Source & Portable
    Run the Rivet platform on any infrastructure – use the fully-managed Rivet Cloud or deploy it on your own servers and cloud.

  • Unified Primitives
    Develop using stateless Functions (for request/response APIs), stateful Actors (for persistent, real-time services), or sandboxed Containers (for heavy or untrusted workloads). All are managed together or alone with a consistent CLI and tooling.


Features

  • Stateful Persistence
    Rivet Actors preserve data in memory with automatic durability to disk. This provides persistent memory-like state – you get the speed of in-memory access with the safety of persistent storage. Ideal for dynamic, fast-moving app state (caches, game lobbies, collaborative document data, etc.).

  • Remote Procedure Calls (RPC)
    Lightweight built-in messaging for clients and services. Rivet offers type-safe RPC calls and broadcast events between clients and actors, simplifying real-time communication without external message brokers.

  • No Cold Starts
    Services hibernate on idle and wake instantly on demand. Long-running actors β€œsleep” when inactive and recover state immediately on the next request. Instant cold-start recovery and consistently low latency for end-users.

  • Edge Distribution
    Deploy backend code closer to your users. Rivet distributes actors and functions across global edge regions for ultra-low latency. Supports HTTP, WebSocket, TCP, and UDP protocols without requiring external proxies.

  • Unlimited Execution & Container Support
    No arbitrary execution time limits – run long-lived processes or background jobs as needed. Rivet supports anything that runs in a Docker container. If it works in Docker, it works on Rivet.

  • Fault Tolerance
    Actor state is persisted so that if an instance crashes or is rescheduled, it can recover its exact state with zero downtime. Combined with intelligent routing, Rivet ensures high availability.

  • Local Development
    Develop and test locally with ease. Spin up a full Rivet cluster with rivet dev or Docker Compose. Iterate locally before deploying to production.

    Use cases

  • AI agents

  • Multi-tenant applications

  • Local-first apps

  • Collaborative applications

  • Sandboxed Code Execution

  • Game Servers

  • Yjs Sync & Storage

  • Chat Apps


Getting Started

Quickstart (TypeScript)

See the full quickstart guide for a comprehensive walkthrough.

Step 1: Create Actor

npx create-actor@latest -p rivet -t counter

Step 2: Deploy Actor

cd your-project
npm run deploy

Step 3: Monitor

Visit the Rivet Hub to create & test your actors.

Documentation

Running Rivet

  • Self-Hosting
  • Rivet Cloud: Fastest, most affordable, and most reliable way to deploy Rivet Actors with zero infrastructure maintenance
  • Rivet Enterprise: Get a demo or have your questions answered about Rivet

Community & Support

Technologies

  • Rust
  • V8 & Deno: Actor isolate runtime
  • FoundationDB: Actor state
  • CockroachDB: OLTP
  • ClickHouse: Developer-facing monitoring
  • Valkey: Caching
  • NATS: Pub/sub
  • Traefik: Load balancers & tunnels

Project layout

docker/                      Docker-related files
    dev-full/                Full development environment setup
    monolith/                Monolithic Docker setup
    universal/               Universal multi-stage builder image
docs/                        Documentation
docs-internal/               Internal documentation
examples/                    Example projects
frontend/                    Rivet Hub & other frontend components
packages/                    Project packages
    api/                     API package
    common/                  Common utilities
    infra/                   Infrastructure-related code
    services/                Service implementations
    toolchain/               Toolchain-related code
resources/                   Misc resources supporting Rivet
scripts/                     Scripts for various tasks
sdks/                        SDKs
    actor/                   Actor SDK
    api/                     Low-level SDK for calling API
site/                        Website & documentation

License

Apache 2.0