Polyglot backend framework that unifies API, Background Jobs & AI Agents
Motia is the single backend runtime where API endpoints, background jobs, scheduled tasks, and AI agents written in any language, are all unified in workflows, with full observability, scalability and resiliency. Build, automate, and evolve all on one platform with one command line to quickly deploy to production.





Create workflows with the simplicity of Motia Steps
API Endpoints, Events, Cron Jobs are all represented by a step each written in the language you need. Connect steps to create powerful workflows.

Visualize workflows of your code
Easily visualize dependencies between steps, and how they are triggered by events.


Logs

Observability baked-in
Motia workbench comes with a built-in observability tool to help you track and visualize all your steps, events, and state changes. See exactly what happened after an endpoint is triggered, all the subsequent steps that were emitted, track the time it took to execute each step, and more.

Multi-Language Workflows
Mix TypeScript, Python, JavaScript, and more in the same workflow. Build polyglot backends, all as unified Motia Steps.

Test & deploy with confidence
Test any workflow, any step: automate code, APIs, and agents with guaranteed quality at every layer.


AI-Ready Workflows
Bring AI to your backend: write agentic workflows, leverage Python/Node AI libraries, and connect them directly with APIs and jobs.
Write AI Workflows like
You Write APIs

Logs
Flow Legend
openai.service.ts
slack.service.ts
trello.service.ts
check-overdue-cards.step.ts
complete-approved-card.step.ts
mark-card-for-review.step.ts
slack-notifier.step.ts
start-assigned-card.step.ts
trello-webhook-validation.step.ts
trello-webhook.step.ts
validate-card-requirements.step.ts
1import { CronConfig, FlowContext } from 'motia'
2import { TrelloService } from '../services/trello.service'
3import { appConfig } from '../config/default'
4
5export const config: CronConfig = {
6 type: 'cron',
7 name: 'Check Overdue Cards',
8 description: 'Identifies and flags cards that have passed their due date',
9 cron: '0 * * * *',
10 emits: [],
11 flows: ['trello'],
12}
13
14export const handler = async ({ logger }: FlowContext) => {
15 const trello = new TrelloService(appConfig.trello, logger)
16 logger.info('Starting overdue task check')
17
18 try {
19 const listsToCheck = [
20 appConfig.trello.lists.newTasks,
21 appConfig.trello.lists.inProgress,
22 appConfig.trello.lists.needsReview,
23 ]
24
25 for (const listId of listsToCheck) {
26 const cards = await trello.getCardsInList(listId)
27
28 for (const card of cards) {
29 if (card.due && new Date(card.due) < new Date()) {
30 logger.info('Found overdue card', { cardId: card.id, name: card.name })
31 await trello.addComment(card.id, '⚠️ OVERDUE: This card has passed its due date!')
32 }
33 }
34 }
35
36 logger.info('Completed overdue task check')
37 } catch (error) {
38 logger.error('Error checking overdue tasks', error)
39 }
40}
41


Build with the tools you know and love
Integrate with the libraries you already use to build practical, scalable, and reliable solutions.















































Automation/Gmail Manager
Logs

Development
Version 1.0.13
Status
Ready
Created On
06:30 pm | Sept 12 2025
Analytics
Today
Steps
Invocations
State Usage
API
04
Event
16
Cron
24
Production-ready reliability.
Developer-first design.



Unify APIs, Background Jobs, and Agents in Any Language, One Flow
Write in Python, TypeScript, JavaScript, and more. Deploy with confidence using industry standard test suites, evals, and monitoring.
Join our community