Build production-grade backends with a single primitive
Modern backends shouldn't require juggling frameworks, queues, and services. Motia is a unified framework that combines API endpoints, background jobs, durable workflows, AI agents, streaming, and observability with a single core primitive. All written in any language, with built-in state management.




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
openai.service.test.ts
slack.service.test.ts
trello.service.test.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
check-overdue-cards.test.ts
complete-approved-card.test.ts
mark-card-for-review.test.ts
slack-notifier.test.ts
start-assigned-card.test.ts
trello-webhook.step.test.ts
validate-card-requirements.test.ts
development-completed.step.ts
development-completed.step.tsx
review-completed.step.ts
review-completed.step.tsx
trello-webhook-simulator.step.ts
trello-webhook-simulator.step.tsx
validation-completed.step.ts
validation-completed.step.tsx
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
