Skip to main content

What is Motia?

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.
Motia 1.0-RC is now powered by the iii engine, a Rust-based runtime that manages queues, state, streams, cron, and observability through a single iii-config.yaml.

The Core Primitive: the Step

A Step is just a file with a config and a handler. Motia auto-discovers these files and connects them automatically. Every backend pattern - API endpoints, background jobs, queues, workflows, AI agents, streaming, observability, and state - is expressed with the same primitive.

Simple Example

Here’s a simple example of two Steps working together: an HTTP Step that enqueues a message, and a Queue Step that processes it.
// 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 } };
};
Now the Queue Step that processes the message:
// steps/process-message.step.ts
export const config = {
  name: 'ProcessMessage',
  triggers: [
    {
      type: 'queue',
      topic: 'message.sent',
    }
  ],
};

export const handler = async (input, { logger }) => {
  logger.info('Processing message', input);
};

That's it!

With just two files, you’ve built an API endpoint, a queue, and a worker. No extra frameworks required.

Triggers: How Steps Run

Steps are triggered by various events. Here are the main trigger types:
TypeWhen it runsUse Case
httpHTTP RequestREST endpoints
queueQueue subscriptionBackground processing
cronScheduleRecurring jobs
stateState changeState management
streamStream subscriptionReal-time streaming

Language Support

Motia supports multiple languages, all working together seamlessly:
LanguageStatus
JavaScript✅ Stable
TypeScript✅ Stable
Python✅ Stable
Ruby🚧 Beta
Go🔄 Soon

Architecture

Motia consists of two main components:
  1. Motia Framework - Auto-discovers Steps and connects them to the iii engine
  2. iii Engine - A Rust-based runtime that handles HTTP, queues, cron, state, streams, and observability
The iii engine is automatically installed when you create a Motia project using the CLI.

Key Features

Zero Configuration

Auto-discovery of Steps means no manual wiring or configuration files

Multi-Language

Write Steps in TypeScript, JavaScript, or Python - all in the same project

Built-in Observability

Structured logging and OpenTelemetry traces out of the box

Type Safe

Full TypeScript support with Zod schemas and type inference

Real-time Streaming

WebSocket-based streaming with automatic state synchronization

Production Ready

Powers real production applications like ChessArena.ai

Real-World Examples

Motia powers production applications:

ChessArena.ai

A complete chess platform benchmarking LLM performance with real-time evaluation. Features authentication, multi-agent LLM evaluation, Python engine integration, real-time streaming, and live leaderboards.
More examples:
  • AI Research Agent - Web research with iterative analysis
  • Streaming Chatbot - Real-time AI responses
  • Gmail Automation - Smart email processing
  • GitHub PR Manager - Automated PR workflows
  • Finance Agent - Real-time market analysis

Next Steps

Quickstart

Get a Motia app running in under 5 minutes

Installation

Install the Motia CLI and iii engine

Your First Step

Learn how to create and understand Steps

Concepts

Deep dive into Motia concepts

Community & Support

Discord

Join our community

GitHub

View source code

Documentation

Full documentation

Build docs developers (and LLMs) love