Skip to content

Platform

XMachines provides a platform-agnostic core runtime built on Web Streams. To use XMachines in specific environments, you’ll use platform-specific packages.

XMachines platforms provide tooling and adapters for different JavaScript runtimes and use cases. Each platform defines how to integrate XMachines with specific environments or protocols while maintaining the core deterministic execution model.

Play enables you to build universal frontend applications that run identically across any JavaScript runtime—browser, Node, Deno, edge functions—with zero code changes.

  • Learn about Play →
  • Package: @xmachines/play-* (signals, router, react, etc.)
  • Use Case: Frontend apps, universal rendering, AI-driven navigation
  • RFC: play-v1

Key Features:

  • Strict separation between business logic (Actor), runtime (Adapter), and view (UI)
  • TC39 Signals-based reactivity
  • Works with React, TanStack Router, and XState v5
  • Business logic has zero knowledge of runtime environment

Browser-specific adapters for non-isomorphic Web APIs using Web Streams.

  • Learn about Browser →
  • Package: @xmachines/browser (alias), browser-dom, browser-ws, browser-worker
  • Use Case: Direct browser API access, WebSocket connections, Web Workers
  • RFC: browser-v1

Key Features:

  • Optional dependency - only when you need browser-specific APIs
  • Stream-based adapters for DOM, WebSocket, Workers
  • No persistence or protocol semantics

Node-specific adapters for non-isomorphic Node APIs.

Key Features:

  • Focused adapters for Node-specific functionality
  • Web Streams remain canonical
  • No generic @xmachines/node package - use specific adapters

The following platforms are in RFC/design phase:

  • REST - HTTP projection of machines and runs (RFC)
  • MCP - Model Context Protocol for AI agents (RFC)
  • CLI - Command-line interface tools (RFC)

If you’re building…Use this platform
Backend API or serviceCore runtime + Node adapters (optional)
Frontend web applicationPlay
Universal app (SSR + CSR)Play
Browser extensionBrowser
REST API endpointREST (coming soon)
AI agent toolMCP (coming soon)

All XMachines platforms follow these principles:

  1. Web Streams are canonical - All I/O uses Web Streams API
  2. Platform adapters are optional - Use them only when you need platform-specific features
  3. Core runtime is universal - The same state machine logic works everywhere
  4. Projection over execution - Platforms define representation, never execution behavior