An open API service indexing awesome lists of open source software.

https://github.com/motiadev/motia

Multi-Language Backend Framework that unifies APIs, background jobs, queues, workflows, streams, and AI agents with a single core primitive with built-in observability and state management.
https://github.com/motiadev/motia

agents ai api backend developer-tools framework genai javascript python typescript

Last synced: about 1 month ago
JSON representation

Multi-Language Backend Framework that unifies APIs, background jobs, queues, workflows, streams, and AI agents with a single core primitive with built-in observability and state management.

Awesome Lists containing this project

README

          

> [!IMPORTANT]
> πŸš€ **A brand new engine is now powering Motia and supercharged its speed & scalability. It's currently in alpha.**
>
> **[πŸ“¬ Signup to be the first to get notified about future releases](https://forms.gle/24iCHL9yAk1i6LDc6) β†’ https://forms.gle/24iCHL9yAk1i6LDc6**


Motia Banner



Motia


Vercel OSS Program


πŸ”₯ The Unified Backend Framework That Eliminates Runtime Fragmentation πŸ”₯



APIs, background jobs, queueing, streaming, states, workflows, AI agents, observability, scaling, and deployment all in one system. JavaScript, TypeScript, Python, and more in a single core primitive



npm version


Apache 2.0 License


GitHub stars


Twitter Follow


Discord


πŸ’‘ Motia Manifesto β€’
πŸš€ Quick Start β€’
πŸ“‹ Defining Steps β€’
πŸ“š Docs

---

## πŸš€ Create your first Motia App

Get started in seconds:

```bash
npx motia@latest create
```

---

## 🎯 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.

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](https://motia.dev/manifesto)**.

---

## 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.

Here's a simple example of two Steps working together: an API Step that enqueues an event, and an Event Step that processes it.

TypeScript

```ts
// steps/send-message.step.ts
export const config = {
name: 'SendMessage',
triggers: [
{
type: 'api',
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 } };
};
```

```ts
// 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);
};
```

JavaScript

```js
// steps/send-message.step.js
const config = {
name: 'SendMessage',
triggers: [
{
type: 'api',
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 };
```

```js
// 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 };
```

πŸ‘‰ With just two files, you've built an **API endpoint**, a **queue**, and a **worker**. No extra frameworks required.

**[Learn more about Steps β†’](https://motia.dev/docs/concepts/steps)**

[![Motia combines APIs, background queues, and AI agents into one system](assets/github-readme-banner.gif)](https://motia.dev)

## πŸ’» Remix your own Motia App in Replit
[![Open in Replit](https://img.shields.io/badge/Open%20in-Replit-blue?logo=replit&style=for-the-badge)](https://replit.com/@motiadev/motia)

## πŸš€ Quickstart

Get Motia project up and running in **under 60 seconds**:

### 1. Bootstrap a New Motia Project

```bash
npx motia@latest create # runs the interactive terminal
```

Follow the prompts to pick a template, project name, and language.
![motia-terminal](assets/motia-terminal.gif)

### 2. Start the Workbench

Inside your new project folder, launch the dev server:

```bash
npm run dev # ➜ http://localhost:3000
```

**That's it!** You have:
- βœ… REST APIs with validation
- βœ… Visual debugger & tracing
- βœ… Multi-language support
- βœ… Event-driven architecture
- βœ… Zero configuration
- βœ… AI development guides included (Cursor, OpenCode, Codex, and more)

![new-workbench](assets/new-workbench.png)

> πŸ“– **[Full tutorial in our docs β†’](https://motia.dev/docs/getting-started/quick-start)**

### πŸ€– AI-Assisted Development

Every Motia project includes detailed AI development guides that work with **any AI coding tool**:

- **[Cursor IDE](https://cursor.sh/)** - Optimized `.mdc` rules with context-aware suggestions
- **[OpenCode](https://opencode.ai/)**, **[Codex (OpenAI)](https://openai.com/index/introducing-codex/)** - Full support via `AGENTS.md` standard
- **Aider, Jules, Factory, Amp, GitHub Copilot** - Compatible with [AGENTS.md format](https://agents.md/) (used by 20k+ projects)

The guides include patterns for API endpoints, background tasks, state management, real-time streaming, and complete architecture blueprints.

> πŸ€– **[Learn more about AI development support β†’](https://motia.dev/docs/ai-development-guide)**

## 🎯 Triggers

| Type | When it runs | Use Case |
|------|--------------|----------|
| **`api`** | HTTP Request | REST endpoints |
| **`queue`** | Queue subscription | Background processing |
| **`cron`** | Schedule | Recurring jobs |
| **`state`** | State change | State management |
| **`stream`** | Stream subscription | Real-time streaming |

> πŸ“– **[Learn more about Steps β†’](https://motia.dev/docs/concepts/steps)**

---

## 🎯 Examples

### πŸ† **[ChessArena.ai](https://chessarena.ai)** - Full-Featured Production App

A complete chess platform benchmarking LLM performance with real-time evaluation.

**[Live Website β†’](https://chessarena.ai)** | **[Source Code β†’](https://github.com/MotiaDev/chessarena-ai)**

> ![ChessArena.ai in action (raw GIF)](https://github.com/MotiaDev/chessarena-ai/blob/main/public/images/chessarena.gif?raw=true)

**Built from scratch to production deployment, featuring:**
- πŸ” **Authentication & user management**
- πŸ€– **Multi-agent LLM evaluation** (OpenAI, Claude, Gemini, Grok)
- 🐍 **Python engine integration** (Stockfish chess evaluation)
- πŸ“Š **Real-time streaming** with live move updates and scoring
- 🎨 **Modern React UI** with interactive chess boards
- πŸ”„ **Event-driven workflows** connecting TypeScript APIs to Python processors
- πŸ“ˆ **Live leaderboards** with move-by-move quality scoring
- πŸš€ **Production deployment** on Motia Cloud

### πŸ“š **More Examples**

**[View all 20+ examples β†’](https://github.com/MotiaDev/motia-examples)**

| Example | Description |
|---------|-------------|
| **[AI Research Agent](https://github.com/MotiaDev/motia-examples/tree/main/examples/ai-deep-research-agent)** | Web research with iterative analysis |
| **[Streaming Chatbot](https://github.com/MotiaDev/motia-examples/tree/main/examples/streaming-ai-chatbot)** | Real-time AI responses |
| **[Gmail Automation](https://github.com/MotiaDev/motia-examples/tree/main/examples/gmail-workflow)** | Smart email processing |
| **[GitHub PR Manager](https://github.com/MotiaDev/motia-examples/tree/main/examples/github-integration-workflow)** | Automated PR workflows |
| **[Finance Agent](https://github.com/MotiaDev/motia-examples/tree/main/examples/finance-agent)** | Real-time market analysis |

**Features demonstrated:** Multi-language workflows β€’ Real-time streaming β€’ AI integration β€’ Production deployment

---

## 🌐 Language Support

| Language | Status |
|----------|--------|
| **JavaScript** | βœ… Stable |
| **TypeScript** | βœ… Stable |
| **Python** | βœ… Stable |
| **Ruby** | 🚧 Beta |
| **Go** | πŸ”„ Soon |

## πŸ“š Resources

- **[πŸ“– Documentation](https://motia.dev/docs)** - Complete guides and API reference
- **[πŸ’¬ Discord](https://discord.gg/motia)** - Community support and discussions
- **[πŸ› GitHub Issues](https://github.com/MotiaDev/motia/issues)** - Bug reports and feature requests
- **[πŸ—ΊοΈ Roadmap](https://github.com/orgs/MotiaDev/projects/2)** - Upcoming features and progress

## 🚧 Roadmap

We have a public roadmap for Motia, you can view it [here](https://github.com/orgs/MotiaDev/projects/2/views/4).

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](https://github.com/MotiaDev/motia/issues/495) | Add support for RBAC |
| Streams: Workbench UI | βœ… Shipped | [#497](https://github.com/MotiaDev/motia/issues/497) | Add support for Workbench UI |
| Queue Strategies | βœ… Shipped | [#476](https://github.com/MotiaDev/motia/issues/476) | Add support for Queue Strategies |
| Reactive Steps | βœ… Shipped | [#477](https://github.com/MotiaDev/motia/issues/477) | Add support for Reactive Steps |
| Point in time triggers | πŸ“… Planned | [#480](https://github.com/MotiaDev/motia/issues/480) | Add support for Point in time triggers |
| Workbench plugins | βœ… Shipped | [#481](https://github.com/MotiaDev/motia/issues/481) | Add support for Workbench plugins |
| Rewrite core in Rust | βœ… Shipped | [#482](https://github.com/MotiaDev/motia/issues/482) | Rewrite our Core in Rust |
| Decrease deployment time | βœ… Shipped | [#483](https://github.com/MotiaDev/motia/issues/483) | Decrease deployment time |
| Built-in database support | πŸ“… Planned | [#484](https://github.com/MotiaDev/motia/issues/484) | Add support for built-in database |

## 🀝 Contributing

We welcome contributions! Check our **[Contributing Guide](https://github.com/MotiaDev/motia/blob/main/CONTRIBUTING.md)** to get started.

---

**[πŸš€ Get Started](https://motia.dev)** β€’ **[πŸ“– Docs](https://motia.dev/docs)** β€’ **[πŸ’¬ Discord](https://discord.gg/motia)**





Star History Chart

⭐ **Star us if you find Motia useful!**