
π₯ The Unified Backend Framework That Eliminates Runtime Fragmentation π₯
APIs, background jobs, workflows, and AI agents in one system. JavaScript, TypeScript, Python, and more in one codebase.
π‘ Motia Manifesto β’ π Quick Start β’ π Defining Steps β’ π Docs
Motia solves backend fragmentation.
Modern software engineering is splintered β APIs live in one framework, background jobs in another, queues have their own tooling, and AI agents are springing up in yet more isolated runtimes. This fragmentation demands a unified system.
Motia unifies APIs, background jobs, workflows, and AI agents into a single coherent system with shared observability and developer experience. Similar to how React simplified frontend development where everything is a component, Motia simplifies backend development where everything is a Step.
Write JavaScript, TypeScript, Python, and more in the same workflow. What used to take 5 frameworks to build now comes out of the box with Motia.
Get Motia project up and running in under 60 seconds:
npx motia@latest create -i # runs the interactive terminal
Follow the prompts to pick a template, project name, and language.
Inside your new project folder, launch the dev server:
npx motia dev # β http://localhost:3000
This spins up the Motia Workbench β a local UI for building, testing & observing your backend in real-time.
Open a new terminal tab and run:
curl http://localhost:3000/default
You should see the JSON response:
{ "message": "Hello World from Motia!" }
The Workbench is your command centre:
- π Flows β Visualise how your Steps connect.
- π Endpoints β Test APIs with one click and stream results live.
- ποΈ Traces β Inspect end-to-end traces of every execution.
- π Logs β View structured logs grouped by trace.
- πͺ State β Inspect the key-value store across Steps.
π That's it! You now have a production-ready backend with everything you need:
- β REST API endpoints with automatic validation and error handling
- β Visual debugger with real-time flow inspection and tracing
- β Built-in observability - logs, traces, and state visualization
- β Hot-reload for instant feedback during development
- β Event-driven architecture ready for complex workflows
- β Multi-language support - add Python, Javascript, or other languages anytime
- β Zero configuration - no infrastructure setup required
π‘ Want a more detailed walkthrough?
Check out the Quick Start guide in our docs for step-by-step instructions and more examples.
Everything is a Step β similar to how React made everything a component, Motia makes every backend pattern a Step:
- π― Steps Represent Distinct Entry Points: APIs, background jobs, scheduled tasks, and AI agents β all unified under a single primitive
- π Any Language, One Workflow: Write JavaScript, TypeScript, Python, and more in the same project. Use Python for AI agents, TypeScript for APIs, JavaScript for workflows β all sharing state effortlessly
- β‘ Enterprise-Grade, Out of the Box: Get event-driven architecture, fault tolerance, observability, and real-time streaming without complex infrastructure setup
- ποΈ Automatic Observability: Complete end-to-end tracing, structured logging, and state visualization. No setup required β works in both local development and production
- π Composable Workflows: Connect Steps by emitting and subscribing to events. Build complex, multi-stage processes with simple, declarative code
- πͺ Unified State Management: All Steps share a traced key-value store. Every
get
,set
, anddelete
is automatically tracked across your entire workflow - π Built-in Fault Tolerance: Retry mechanisms, error handling, and queue infrastructure abstracted away β focus on business logic, not infrastructure
Today, backend engineers face several recurring challenges:
- π§© Fragmented Systems: APIs in Express, background jobs in Celery/BullMQ, AI agents in LangChain β each with different deployment, debugging, and scaling patterns
- π Multi-Language Barriers: AI tools in Python, business logic in TypeScript β forcing teams to choose between cutting-edge tech and their existing skillset
- π Observability Gaps: Tracing requests across multiple frameworks and runtimes is complex and often incomplete
- βοΈ Scalability vs. Velocity: Choose between fast development (monolith) or proper scaling (microservices complexity)
- π Deployment Complexity: Multiple runtimes mean multiple deploy targets, configs, and failure points
The rapid advancement of AI has made this worse β many cutting-edge AI tools are only available in specific languages, forcing companies to abandon their existing tech stack or miss out on breakthrough technologies.
Motia removes this limitation by unifying your entire backend into a single runtime where everything is a Step:
- Before: APIs in Express, jobs in BullMQ, AI agents in LangChain
- After: All backend patterns as composable Steps with shared state and observability
- Before: Choose between Python AI tools OR your existing TypeScript stack
- After: Each Step can be written in any language while sharing common state β use Python for AI, TypeScript for APIs, JavaScript for workflows
- Before: Complex tracing setups across multiple frameworks
- After: Complete observability toolkit available in both cloud and local environments out of the box
- Before: Choose between monolith simplicity or microservice complexity
- After: Each Step scales independently, avoiding bottlenecks while maintaining development velocity
- Before: Multiple deployment pipelines, configs, and failure points
- After: Single deployable with atomic blue/green deployments and instant rollbacks
Traditional Stack | Motia |
---|---|
Multiple deployment targets | Single unified deployment |
Fragmented observability | End-to-end tracing |
Language silos | JavaScript, TypeScript, Python, etc |
Context-switching overhead | Single intuitive model |
Manual error handling | Automatic retries & fault tolerance |
Complex infrastructure | Zero-config queue & streaming |
Type | Trigger | Use Case |
---|---|---|
api |
HTTP Request | Expose REST endpoints |
event |
Emitted Topics | React to internal or external events |
cron |
Scheduled Time (cron) | Automate recurring jobs |
noop |
None | Placeholder for manual/external tasks |
One framework. All backend patterns. Motia replaces your entire backend stack with a single, event-driven system:
π Replace Multiple Frameworks:
- Instead of: Express/Nest.js + BullMQ + Temporal + LangChain + custom observability
- Use: Motia Steps with automatic observability, queuing, and multi-language support
β‘ Simple but Powerful:
- Need a REST API? Create an
api
step β instant HTTP endpoint with validation, tracing, and error handling - Need background processing? Emit an event β
event
steps pick it up asynchronously with built-in retries and fault tolerance - Need scheduled jobs? Use a
cron
step β automatic scheduling with full observability - Need AI agents? Write Python steps with access to the entire ecosystem (PyTorch, transformers, etc.) while sharing state with TypeScript APIs
π Event-Driven by Design: Each Step can emit events that trigger other Steps, creating powerful workflows that automatically handle:
- Parallel processing across multiple languages
- Fault tolerance with automatic retries
- Real-time updates streamed to clients
- Complete traceability of every operation
The result? What used to require 5+ frameworks, complex deployment pipelines, and weeks of infrastructure setup now works out of the box with Motia.
The Step is Motia's core primitive. The following concepts are deeply integrated with Steps to help you build powerful, complex, and scalable backends:
Understand the three ways Steps are triggered:
- HTTP (
api
) β Build REST/GraphQL endpoints with zero boilerplate. - Events (
event
) β React to internal or external events emitted by other steps. - Cron (
cron
) β Schedule recurring jobs with a familiar cron syntax.
Steps talk to each other by emitting and subscribing to topics. This decouples producers from consumers and lets you compose complex workflows with simple, declarative code.
All steps share a unified key-value state store. Every get
, set
, and delete
is automatically traced so you always know when and where your data changed.
Motia provides structured, JSON logs correlated with trace IDs and step names. Search and filter your logs without regex hassle.
Push live updates from long-running or asynchronous workflows to clients without polling. Perfect for dashboards, progress indicators, and interactive AI agents.
Every execution generates a full trace, capturing step timelines, state operations, emits, stream calls, and logs. Visualise everything in the Workbench's Traces UI and debug faster.
β Explore 20+ sophisticated examples demonstrating real-world use cases from AI agents to enterprise workflows: View All Examples β
AI Deep Research Agent | Finance Analysis Agent | PDF RAG System |
---|---|---|
Comprehensive web research with iterative analysis and synthesis | Real-time financial data + AI insights for investment analysis | Document processing with Docling, Weaviate, and OpenAI RAG |
View Example β | View Example β | View Example β |
GitHub PR Manager | Gmail Intelligence | Vision Analysis |
---|---|---|
AI-powered PR classification, labeling, and reviewer assignment | Smart email analysis, auto-responses, and Discord summaries | Multi-modal conversation analysis with visual understanding |
View Example β | View Example β | View Example β |
Streaming AI Chatbot | Real-Time Chat App | Live Health Monitor |
---|---|---|
Token-by-token AI responses with WebSocket streaming | Multi-user chat with real-time message processing and moderation | Production uptime monitoring with intelligent Discord alerts |
View Example β | View Example β | View Example β |
Parallel Execution Demo | Content Automation | Task Management |
---|---|---|
Concurrent task processing with workload distribution | Blog-to-Tweet automation with AI content optimization | Trello workflow automation with AI task validation |
View Example β | View Example β | View Example β |
- β Multi-Language Workflows - JavaScript, TypeScript, Python working together
- β Real-Time Streaming - WebSocket integration with live updates
- β AI Integration - OpenAI, Claude, vision models, and custom AI workflows
- β Event-Driven Architecture - Complex workflows with automatic retry and fault tolerance
- β Production Monitoring - Health checks, uptime monitoring, and intelligent alerting
- β Parallel Processing - Concurrent execution and workload distribution
- β Enterprise Integration - GitHub, Gmail, Trello, Discord, and social media APIs
π Each example includes: Complete source code β’ Step-by-step tutorials β’ Production deployment guides β’ Docker configurations
Write steps in your preferred language:
Language | Status | Example |
---|---|---|
JavaScript | β Stable | handler.step.js |
TypeScript | β Stable | handler.step.ts |
Python | β Stable | handler.step.py |
Ruby | π§ Beta | handler.step.rb |
Go | π Coming Soon | handler.step.go |
Rust | π Coming Soon | handler.step.rs |
- π Questions: Use our Discord community
- π Bug Reports: GitHub Issues
- π Documentation: Official Docs
- π° Blog: Motia Blog
- π₯ Youtube: Motia Youtube
We welcome contributions! Whether it's:
- π Bug fixes and improvements
- β¨ New features and step types
- π Documentation and examples
- π Language support additions
- π¨ Workbench UI enhancements
Check out our Contributing Guide to get started.
π Ready to unify your backend?
π Get Started Now β’ π Read the Docs β’ π¬ Join Discord
Built with β€οΈ by the Motia team β’ Star us if you find Motia useful! β
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 |
---|---|---|---|
Python Types | Planned | #485 | Add support for Python types |
Streams: RBAC | Planned | #495 | Add support for RBAC |
Streams: Workbench UI | Planned | #497 | Add support for Workbench UI |
Queue Strategies | Planned | #476 | Add support for Queue Strategies |
Reactive Steps | Planned | #477 | Add support for Reactive Steps |
Allow cloud configuration | Planned | #478 | Add support for cloud configuration |
BYOC: Bring your own Cloud: AWS | Planned | #479 | Add support for AWS |
Point in time triggers | Planned | #480 | Add support for Point in time triggers |
Workbench plugins | Planned | #481 | Add support for Workbench plugins |
Rewrite our Core in either Go or Rust | Planned | #482 | Rewrite our Core in either Go or Rust |
Decrease deployment time | Planned | #483 | Decrease deployment time |
Built-in database support | Planned | #484 | Add support for built-in database |
BYOC: Google Cloud Platform | Planned | #486 | Add support for Google Cloud Platform |
BYOC: Microsoft Azure | Planned | #487 | Add support for Microsoft Azure |
BYOC: Vercel | Planned | #488 | Add support for Vercel |
BYOC: Cloudflare | Planned | #489 | Add support for Cloudflare |
New languages: Go | Planned | #490 | Add support for Go |
New languages: Rust | Planned | #491 | Add support for Rust |
New languages: Java | Planned | #492 | Add support for Java |
New languages: Ruby | Planned | #493 | Add support for Ruby |
New languages: C# | Planned | #494 | Add support for C# |
BYOC: Kubernetes | Planned | #496 | Add support for Kubernetes |