StepflowStepflow

Client SDKs

Overview of Stepflow client SDKs for TypeScript, React, and React Native

Client SDKs

Stepflow provides a set of client SDKs to interact with your workflows from the frontend or other services. All SDKs are built with TypeScript and provide full type safety.

Available Packages

PackageDescriptionPlatform
@stepflowjs/clientCore TypeScript clientNode.js, Browser, Edge
@stepflowjs/reactReact hooks and providersReact, Next.js, Remix
@stepflowjs/react-nativeReact Native hooksiOS, Android (Expo)

Key Features

  • Type Safety: Full TypeScript support with inference for event payloads and results.
  • Real-time Updates: Built-in support for SSE (Server-Sent Events) and WebSockets with automatic fallback.
  • Token Management: Securely handle public access tokens with automatic storage and refresh.
  • Framework Integration: First-class hooks for React and React Native.

Installation

Choose the package that fits your project:

# TypeScript client
pnpm add @stepflowjs/client

# React hooks
pnpm add @stepflowjs/react @stepflowjs/client

# React Native hooks
pnpm add @stepflowjs/react-native @stepflowjs/client

Authentication

Stepflow clients support three types of authentication:

  1. API Key (apiKey): Used for server-to-server communication. Grants full access.
  2. Public API Key (publicApiKey): Used in frontend applications to trigger workflows.
  3. Public Access Token (accessToken): Short-lived tokens granted to specific workflow runs, allowing clients to track progress without exposing a global key.

On this page