Skip to main content

Build production-grade backends with a single primitive

Backend development today is fragmented. APIs live in one framework, background jobs in another, queues and schedulers elsewhere, and now AI agents and streaming systems have their own runtimes. Add observability and state management on top, and you’re stitching together half a dozen tools before writing your first feature. Motia unifies all of these concerns around one core primitive: the Step. Just as React made frontend development simple by introducing components, Motia redefines backend development with Steps - a single primitive that handles everything.

What is a Step?

A Step is just a file with a config and a handler. Motia auto-discovers these files and connects them automatically.
steps/send-message.step.ts
export const config = {
  name: 'SendMessage',
  triggers: [
    {
      type: 'http',
      method: 'POST',
      path: '/messages',
    }
  ],
  enqueues: ['message.sent']
};

export const handler = async (req, { enqueue }) => {
  await enqueue({
    topic: 'message.sent',
    data: { text: req.body.text }
  });
  return { status: 200, body: { ok: true } };
};
With just two files, you’ve built an API endpoint, a queue, and a worker. No extra frameworks required.

Key features

Unified primitive

One primitive for APIs, queues, cron, state, and streams

Multi-language

TypeScript, JavaScript, and Python support

Type-safe

Full TypeScript support with automatic type inference

Real-time streaming

Built-in WebSocket streaming with state management

AI-ready

Perfect for building AI agents and workflows

Built-in observability

OpenTelemetry tracing and structured logging

Trigger types

Motia supports five trigger types, all using the same Step primitive:
TriggerWhen it runsUse case
HTTPHTTP requestREST APIs, webhooks
QueueMessage receivedBackground jobs, event processing
CronScheduled timeRecurring tasks, cleanup jobs
StateState changeReactive workflows, audit trails
StreamStream eventReal-time updates, notifications

Powered by the iii engine

Motia is powered by the iii engine, a Rust-based runtime that manages queues, state, streams, cron, and observability through a single configuration file.
The iii engine handles all infrastructure concerns, allowing you to focus on writing Steps.

Language support

LanguageStatus
JavaScript✅ Stable
TypeScript✅ Stable
Python✅ Stable
Ruby🚧 Beta
Go🔄 Soon

Next steps

Quickstart

Build your first Motia app in under 60 seconds

Core concepts

Learn about Steps, triggers, and handlers

Examples

Explore real-world examples and patterns

API reference

Dive into the complete API documentation

Build docs developers (and LLMs) love