Aiki

Aiki Documentation

Build durable, reliable workflows in TypeScript.

Welcome to the Aiki documentation! This guide will help you build durable, reliable workflows in TypeScript.

🚀 Getting Started

New to Aiki? Start here:

📚 Core Concepts

Understand the building blocks:

  • Workflows - Define long-running business processes
  • Tasks - Individual units of work
  • Events - Let external systems signal running workflows
  • Sleeps - Durable timers that survive restarts
  • Schedules - Trigger workflows on a recurring basis
  • Workers - Execute workflows in your infrastructure
  • Client - Connect to the Aiki server, embedded or remote

🎯 Guides

Best practices and patterns:

  • Dependency Injection - Inject services and dependencies into tasks and workflows
  • Context - Per-execution context for workflow runs
  • Reference IDs - Custom identifiers for workflows and events
  • Retry Strategies - Configure automatic retries for tasks and workflows
  • Determinism - Workflow determinism and task idempotency
  • Refactoring Workflows - Safely modify running workflows
  • Reliable Hooks - Trigger durable follow-up actions on workflow completion/failure/cancellation
  • Runtime Configuration - Tune the server, workers, and endpoints — statically or live
  • Logging - Plug in your own logger and log from workflow code
  • IAM - Multi-tenancy, API keys, and dashboard auth — optional, off by default

🏗 Architecture

Deep dive into system design:

  • Overview - High-level architecture and design principles
  • Server - Workflow orchestration and state management
  • Subscribers - Work discovery and fault tolerance
  • Crash recovery - Underlying replay-based crash recovery mechanism

On this page