Motia
- 263 followers
- United States of America
- https://www.motia.dev/
- @motiadev
- company/motiadev
- https://discord.gg/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.
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 ourmanifesto.
A Step is just a file with aconfig and ahandler. Motia auto-discovers these files and connects them automatically.
Here's a simple example of two Steps working together: an API Step that emits an event, and an Event Step that processes it.
TypeScript
// steps/send-message.step.tsexportconstconfig={name:'SendMessage',type:'api',path:'/messages',method:'POST',emits:['message.sent']};exportconsthandler=async(req,{ emit})=>{awaitemit({topic:'message.sent',data:{text:req.body.text}});return{status:200,body:{ok:true}};};
// steps/process-message.step.tsexportconstconfig={name:'ProcessMessage',type:'event',subscribes:['message.sent']};exportconsthandler=async(input,{ logger})=>{logger.info('Processing message',input);};
Python
# send_message_step.pyconfig= {"name":"SendMessage","type":"api","path":"/messages","method":"POST","emits": ["message.sent"]}asyncdefhandler(req,context):awaitcontext.emit({"topic":"message.sent","data": {"text":req.body["text"]} })return {"status":200,"body": {"ok":True}}
# process_message_step.pyconfig= {"name":"ProcessMessage","type":"event","subscribes": ["message.sent"]}asyncdefhandler(input,context):context.logger.info("Processing message",input)
JavaScript
// steps/send-message.step.jsconstconfig={name:'SendMessage',type:'api',path:'/messages',method:'POST',emits:['message.sent']};consthandler=async(req,{ emit})=>{awaitemit({topic:'message.sent',data:{text:req.body.text}});return{status:200,body:{ok:true}};};module.exports={ config, handler};
// steps/process-message.step.jsconstconfig={name:'ProcessMessage',type:'event',subscribes:['message.sent']};consthandler=async(input,{ logger})=>{logger.info('Processing message',input);};module.exports={ config, handler};
👉 With just two files, you've built anAPI endpoint, aqueue, and aworker. No extra frameworks required.
Readour documentation and get started today:npx motia@latest create
Join thousands of developers building the future of backend development
We love contributions! Check out ourContributing Guide to get started.
Motia isMIT licensed and open source. Build amazing things! 🚀
Website •Documentation •Discord •Twitter
Made with ❤️ by the Motia team and community
PinnedLoading
- motia-examples
motia-examples PublicA community maintained list of flow examples built with Motia
- chessarena-ai
chessarena-ai Public
Repositories
Uh oh!
There was an error while loading.Please reload this page.
MotiaDev/motia-examples’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
MotiaDev/tutorial-driver’s past year of commit activity - github-stars-counter Public
MotiaDev/github-stars-counter’s past year of commit activity - chessarena-ai Public
Uh oh!
There was an error while loading.Please reload this page.
MotiaDev/chessarena-ai’s past year of commit activity - build-your-first-app-ts Public
Uh oh!
There was an error while loading.Please reload this page.
MotiaDev/build-your-first-app-ts’s past year of commit activity - build-your-first-app-py Public
Uh oh!
There was an error while loading.Please reload this page.
MotiaDev/build-your-first-app-py’s past year of commit activity
People
This organization has no public members. You must be a member to see who’s a part of this organization.
Most used topics
Loading…
Uh oh!
There was an error while loading.Please reload this page.

