Skip to content

Installation

Maelstrom is distributed as scoped packages so you can install only the layers your app needs. Most React apps start with @maelstrom-co/react in the browser and @maelstrom-co/engine on the server.

Package Purpose
@maelstrom-co/react React bindings — createMaelstrom(), vessel(), hooks, Provider, Chart
@maelstrom-co/client Framework-agnostic client — Orchestrator, connectors, managers
@maelstrom-co/protocol Shared types, Zod schemas, message definitions
@maelstrom-co/engine Server-side LLM decision engine
@maelstrom-co/react-devtools Optional React extension for development diagnostics
@maelstrom-co/devtools Optional framework-independent collector, capture store, and browser panel

DevTools is optional. React applications install @maelstrom-co/react-devtools; other integrations use @maelstrom-co/devtools. Use the same release or PR preview as your other Maelstrom packages. Follow Debug applications with DevTools for installation, recording, and the explicit browser opt-in for production builds.

Use case Install in the browser app Install on the server
React chart only @maelstrom-co/react An engine implementation, commonly @maelstrom-co/engine
Framework-agnostic client @maelstrom-co/client @maelstrom-co/protocol An engine implementation

@maelstrom-co/react depends on the client and protocol packages and re-exports the vessel definition helper plus connector classes (WebSocketConnector, HttpConnector) you need to connect to the engine, so React apps only need to install @maelstrom-co/react. Install @maelstrom-co/client separately only if you are building a framework-agnostic client.

Terminal window
# Client-side React app
npm install @maelstrom-co/react
# Server-side reference engine
npm install @maelstrom-co/engine

@maelstrom-co/react requires:

  • react >= 18.0.0
  • react-dom >= 18.0.0

The demo engine uses OpenAI. Set the following environment variables:

.env
ENGINE_MODEL= # Optional — defaults to gpt-6-luna
OPENAI_API_KEY=your-key # Server-held demo engine + optional voice key
VITE_VOICE_PROVIDER=realtime # Explicit Realtime setup; fresh visits otherwise default to GPT-Live
OPENAI_REALTIME_MODEL= # Optional Realtime override — defaults to gpt-realtime-2.1
WS_PORT=3001 # Optional — WebSocket port (defaults to 3001)

This environment selects OpenAI Realtime for voice. GPT-Live uses a different exchange and requires authenticated local opt-in for a server-held key; follow the demo setup. Browser-key mode is also available; it sends voice requests directly to OpenAI and supplies the key separately to the Engine for planning.