Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings
MotiaDev

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
@MotiaDev

Motia

A Modern Unified Backend Framework

Motia logoMotia logo (dark)

🔥 A Modern Unified Backend Framework for APIs, Events, and Agents 🔥

WebsiteDocumentationnpmLicense

GitHub StarsDiscordTwitter Follow


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

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.


The Core Primitive: the Step

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.

Learn more about Steps →

Readour documentation and get started today:npx motia@latest create

GitHub commit activityGitHub issuesGitHub pull requests

Join thousands of developers building the future of backend development

🤝 Contributing

We love contributions! Check out ourContributing Guide to get started.

Contributors

📄 License

Motia isMIT licensed and open source. Build amazing things! 🚀


WebsiteDocumentationDiscordTwitter

Made with ❤️ by the Motia team and community

PinnedLoading

  1. motiamotiaPublic

    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.

    TypeScript 11.1k 841

  2. motia-examplesmotia-examplesPublic

    A community maintained list of flow examples built with Motia

    311 89

  3. chessarena-aichessarena-aiPublic

    TypeScript 50 11

Repositories

Loading
Type
Select type
Language
Select language
Sort
Select order
Showing 10 of 18 repositories

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…


[8]ページ先頭

©2009-2025 Movatter.jp