frameworks/motia/README.md
<a href="https://motia.dev"> </a> <p align="center"> <a href="https://trendshift.io/repositories/14032" style="margin-right:8px;"> </a> <a href="https://vercel.com/blog/summer-2025-oss-program#motia" target="_blank" style="margin-left:8px;"> </a> </p> <p align="center"> <strong>Build production-grade backends with a single primitive</strong> </p> <p align="center"> <em>APIs, background jobs, workflows, AI agents, streaming, state management, and observability β unified in one framework. TypeScript, JavaScript, and Python.</em> </p> <p align="center"> <a href="https://www.npmjs.com/package/motia"> </a> <a href="https://github.com/MotiaDev/motia/blob/main/LICENSE"> </a> <a href="https://github.com/MotiaDev/motia"> </a> <a href="https://twitter.com/motiadev" target="_blank"> </a> <a href="https://discord.gg/motia" target="_blank"> </a> </p> <p align="center"> <a href="https://www.motia.dev/manifesto">π‘ Motia Manifesto</a> β’ <a href="https://www.motia.dev/docs/getting-started/quick-start">π Quick Start</a> β’ <a href="https://www.motia.dev/docs/concepts/steps">π Defining Steps</a> β’ <a href="https://www.motia.dev/docs">π Docs</a> </p>[!IMPORTANT] π Motia 1.0-RC is here β now powered by the iii engine, a Rust-based runtime that manages queues, state, streams, cron, and observability through a single
iii-config.yaml.
Install the CLI:
brew tap MotiaDev/tap
brew install motia-cli
Or via shell script:
curl -fsSL https://raw.githubusercontent.com/MotiaDev/motia-cli/main/install.sh | sh
Then create a project:
motia-cli create my-app
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.
Every backend pattern, API endpoints, background jobs, queues, workflows, AI agents, streaming, observability, and state, is expressed with the same primitive.
To read more about this, check out our manifesto.
A Step is just a file with a config and a handler. Motia auto-discovers these files and connects them automatically.
Here's a simple example of two Steps working together: an HTTP Step that enqueues a message, and a Queue Step that processes it.
<details open> <summary><b>TypeScript</b></summary>// 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 } };
};
// 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);
};
// steps/send-message.step.js
const config = {
name: 'SendMessage',
triggers: [
{
type: 'http',
method: 'POST',
path: '/messages',
}
],
enqueues: ['message.sent']
};
const handler = async (req, { enqueue }) => {
await enqueue({
topic: 'message.sent',
data: { text: req.body.text }
});
return { status: 200, body: { ok: true } };
};
module.exports = { config, handler };
// steps/process-message.step.js
const config = {
name: 'ProcessMessage',
triggers: [
{
type: 'queue',
topic: 'message.sent',
}
],
};
const handler = async (input, { logger }) => {
logger.info('Processing message', input);
};
module.exports = { config, handler };
# steps/send_message_step.py
config = {
"name": "SendMessage",
"triggers": [
{
"type": "http",
"method": "POST",
"path": "/messages",
}
],
"enqueues": ["message.sent"],
}
async def handler(req, ctx):
await ctx.enqueue({
"topic": "message.sent",
"data": {"text": req.body.get("text")},
})
return {"status": 200, "body": {"ok": True}}
# steps/process_message_step.py
config = {
"name": "ProcessMessage",
"triggers": [
{
"type": "queue",
"topic": "message.sent",
}
],
}
async def handler(input, ctx):
ctx.logger.info("Processing message", input)
π With just two files, you've built an API endpoint, a queue, and a worker. No extra frameworks required.
Get Motia project up and running in under 60 seconds:
brew tap MotiaDev/tap
brew install motia-cli
Or via shell script:
curl -fsSL https://raw.githubusercontent.com/MotiaDev/motia-cli/main/install.sh | sh
motia-cli create my-app
The CLI auto-detects and installs the iii engine if it's not already on your system.
Follow the prompts to pick a language and template.
Inside your new project folder (the iii-config.yaml was generated by the create command above), start the iii engine:
iii -c iii-config.yaml
That's it! You have:
Every Motia project includes detailed AI development guides that work with any AI coding tool:
.mdc rules with context-aware suggestionsAGENTS.md standardThe guides include patterns for API endpoints, background tasks, state management, real-time streaming, and complete architecture blueprints.
| Type | When it runs | Use Case |
|---|---|---|
http | HTTP Request | REST endpoints |
queue | Queue subscription | Background processing |
cron | Schedule | Recurring jobs |
state | State change | State management |
stream | Stream subscription | Real-time streaming |
A complete chess platform benchmarking LLM performance with real-time evaluation.
Live Website β | Source Code β
Built from scratch to production deployment, featuring:
| Example | Description |
|---|---|
| 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 |
Features demonstrated: Multi-language workflows β’ Real-time streaming β’ AI integration β’ Production deployment
| Language | Status |
|---|---|
| JavaScript | β Stable |
| TypeScript | β Stable |
| Python | β Stable |
| Ruby | π§ Beta |
| Go | π Soon |
We have a public roadmap for Motia, you can view it here.
Feel free to add comments to the issues, or create a new issue if you have a feature request.
| Feature | Status | Link | Description |
|---|---|---|---|
| Streams: RBAC | β Shipped | #495 | Add support for RBAC |
| Streams: iii Console UI | β Shipped | #497 | Stream visualization in iii Console |
| Queue Strategies | β Shipped | #476 | Add support for Queue Strategies |
| Reactive Steps | β Shipped | #477 | Add support for Reactive Steps |
| Point in time triggers | π Planned | #480 | Add support for Point in time triggers |
| Workbench plugins | βΉοΈ Sunset | #481 | Replaced by iii Console |
| Rewrite core in Rust | β Shipped | #482 | Rewrite our Core in Rust |
| Decrease deployment time | β Shipped | #483 | Decrease deployment time |
| Built-in database support | π Planned | #484 | Add support for built-in database |
We welcome contributions! Check our Contributing Guide to get started.
π Get Started β’ π Docs β’ π¬ Discord
<a href="https://git-history.com"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://git-history.com/api/embed/stars?repos=MotiaDev/motia&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://git-history.com/api/embed/stars?repos=MotiaDev/motia&theme=light" /> </picture> </a><sub>β Star us if you find Motia useful!</sub>
</div>