Design Principles
Built on the foundations of immutability, type-safety, and composition.
Workflows as Graphs
Build logic with explicit steps and edges. Each transition is deterministic and type-checked, making complex flows understandable and testable.
Type-Safety End-to-End
Strong TypeScript APIs ensure inputs, states, and transitions are safe. Zod integration adds runtime validation without compromising ergonomics.
Immutability
State updates are immutable by default. This ensures predictable state changes and enables powerful features like time-travel debugging.
Co-location
Achieve clear separation of concerns by decoupling UI from business logic. The architecture forces you to co-locate logic with its relevant components, ensuring that business rules remain pure, testable, and independent of the view layer.
Framework Agnostic
The core is UI-agnostic and works in any framework or runtime. Optional adapters integrate with different UIs without coupling.
Agent Native
Designed to pair with autonomous agents. The dedicated agent library gives an LLM a precise, typed surface to introspect and act on.
The Step Model
Encapsulated logic with strict IO boundaries and reactive state.
Interactive Step Architecture
Hover to reveal the seamless link between visual concepts and TypeScript code. See how every Input, State, and Output is strictly typed and interconnected.
Shape the Workflow
Three composition patterns that grow workflows without changing how a single step behaves.
Workflow Shape · 01
RepeatGroup
Make a fresh lane for each iteration.
Expands a declared template into a single linear sequence of new step instances. Each pass owns its own state, history, and back-navigation.
Workflow in Motion
Compose steps into a graph and inspect state transitions in real-time.
Workflow
Editing6 steps, 5 edges
Core Capabilities
Essential primitives for building robust, scalable workflows.
Workflow Orchestrator
Compose steps with typed transitions, back navigation, lifecycle control, and middleware hooks.
@motif-ts/coreDevTools & Persistence
Time-travel with Redux DevTools, export/import full snapshots or just the workflow config, and safely restore any state.
@motif-ts/middlewareFramework Adapters
Use adapters to integrate with UI of choice. React, Vue, and Svelte adapters are included.
@motif-ts/react@motif-ts/vue@motif-ts/svelteExpression Engine
Serialize expressions for portable workflows. Supports modern JavaScript syntax like optional chaining, template literals, and object spread.
@motif-ts/expressionVisualizer
Render and edit live workflow graphs in the browser. Inspect every step, transition, and state in real time, and visually wire up new steps and connections with a built-in canvas editor.
@motif-ts/visualizer (private preview)Agentic Layer
Hand workflows to an LLM. Strict invocation schemas, OpenAI or Anthropic tool catalogs, full-state snapshots, and a draft-to-runtime builder let agents safely author and operate workflows.
@motif-ts/agentic (private preview)Quick Start
From installation to your first executable workflow.