Templates

Explore Rivet templates and examples to quickly start building with Rivet Actors

AI Agent Chat

Example project demonstrating AI agent integration.

AI Agent Chat

Hello World

A minimal example demonstrating RivetKit with a real-time counter shared across multiple clients.

Hello World

Chat Room

Example project demonstrating real-time messaging and actor state management.

Chat Room

Real-time Collaborative Cursors

Example project demonstrating real-time cursor tracking and collaborative canvas.

Real-time Collaborative Cursors

User and AI Generated Actors Freestyle Deployer

Shows how to deploy user or AI-generated Rivet Actor code using a sandboxed namespace and Freestyle

User and AI Generated Actors Freestyle Deployer

Actor Actions

Demonstrates how to define and call actions on Rivet Actors for RPC-style communication between actors and clients.

Actor Actions

Cross-Actor Actions

Demonstrates how actors can call actions on other actors for inter-actor communication and coordination.

Cross-Actor Actions

Multi-Region

Demonstrates deploying Rivet Actors across multiple geographic regions for low-latency global access.

Multi-Region

Raw Fetch Handler Example

Example project demonstrating raw HTTP fetch handling with Hono integration.

Raw Fetch Handler Example

Raw WebSocket Handler

Demonstrates raw WebSocket handling with direct actor connections and real-time chat functionality.

Raw WebSocket Handler

Scheduling

Demonstrates how to schedule tasks and execute code at specific times or intervals using Rivet Actors.

Scheduling

State Management

Demonstrates persistent state management in Rivet Actors with automatic state saving and restoration.

State Management

Cloudflare Workers

Example project demonstrating Cloudflare Workers deployment.

Cloudflare Workers with Hono

Example project demonstrating Cloudflare Workers deployment with Hono router.

Cloudflare Workers Inline Client Example

Simple example demonstrating accessing Rivet Actors via Cloudflare Workers without exposing a public API. This uses the `createInlineClient` function to connect directly to your Durable Object.

Real-time Collaborative Cursors (Raw WebSocket)

Demonstrates real-time cursor tracking and collaborative canvas using raw WebSocket handlers instead of RivetKit's higher-level WebSocket abstraction.

Real-time Collaborative Cursors (Raw WebSocket)

Custom Serverless

Example demonstrating custom serverless actor deployment with automatic engine configuration.

Drizzle Integration

Demonstrates Drizzle ORM integration with Rivet Actors for type-safe database operations.

Elysia Integration

Example project demonstrating Elysia web framework integration.

AI Agent with Durable Streams (Experimental)

Example project demonstrating how to build an AI agent that communicates through durable streams for reliable message delivery and persistence.

AI Agent with Durable Streams (Experimental)

Hono Integration

Example project demonstrating Hono web framework integration.

Hono + React

Example demonstrating full-stack Hono backend with React frontend integration.

Hono + React

Kitchen Sink Example

Example project demonstrating all RivetKit features.

Kitchen Sink Example

Native WebSockets

Demonstrates native WebSocket integration with Rivet Actors for real-time bidirectional communication.

Native WebSockets

Next.js

Minimal Next.js example demonstrating basic actor state management and real-time updates.

Next.js

Raw WebSocket Handler Proxy

Demonstrates raw WebSocket handling using a proxy endpoint pattern for routing connections to actors.

Raw WebSocket Handler Proxy

React Integration

Demonstrates React frontend integration with Rivet Actors.

React Integration

Stream Processor

Example project demonstrating real-time top-K stream processing.

Stream Processor

tRPC Integration

Example project demonstrating tRPC integration.