rivetkit-client-javascript

Connect JavaScript clients to Rivet Actors via rivetkit/client for actor actions.

18|7|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/rivet-dev/skills --skill rivetkit-client-javascript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rivetkit-client-javascript
Source: https://github.com/rivet-dev/skills/tree/main/rivetkit-client-javascript
Command: npx skills add https://github.com/rivet-dev/skills --skill rivetkit-client-javascript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a ready-to-use blueprint for building JavaScript clients that connect to Rivet Actors via rivetkit/client, enabling seamless actor interaction and lifecycle management without boilerplate.

Core Features & Use Cases

  • Client creation and configuration with createClient() for browser, Node.js, or Bun environments.
  • Actor interaction: call actions, read state, and manage compound keys to reference specific actor instances.
  • Connection handling: open, maintain, and close WebSocket or HTTP connections; handle events and errors in real time.
  • Use Case: Build a browser app that communicates with a Rivet Actor to trigger an action and display results.

Quick Start

Install the rivetkit package and initialize a client with createClient(), then call an actor action such as increment on a counter actor.

Frequently Asked Questions about rivetkit-client-javascript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a JavaScript client to Rivet Actors?

To connect a JavaScript client to Rivet Actors, use the createClient() function from the rivetkit/client package to initialize a connection and generate actor handles for calling actions.

Can I use the rivetkit client in both browser and Node.js environments?

Yes, the rivetkit client supports browser, Node.js, and Bun environments, allowing you to create clients that communicate with Rivet Actors via either HTTP or WebSocket protocols.

How do I call actor actions and manage lifecycle from a JavaScript client?

You call actor actions and manage lifecycles by obtaining an actor handle through createClient(), then using that handle to invoke specific actions, read state, and manage compound keys for actor instances.

How do I handle real-time events and WebSocket connections with Rivet Actors?

Real-time event handling with Rivet Actors involves opening, maintaining, and closing WebSocket connections through the rivetkit/client, which manages event streaming and error handling during actor communication.

What is the best way to reference a specific Rivet Actor instance from a client?

The best way to reference a specific Rivet Actor instance is by managing compound keys within your JavaScript client, which allows you to target and interact with precise actor instances during actions.

Do I need to install any specific packages to start building Rivet JS clients?

Yes, you need to install the rivetkit package, which provides the necessary rivetkit/client module and createClient() function required to initialize connections and perform actor actions.