Unify APIs, Jobs, & AI Agents in One Flow
Motia is the single backend runtime where APIs, background jobs, workflows, and AI agents run together as event-driven Steps, in any language, with full observability and state tracing. Build, automate, and evolve all on one platform.





Code-First Backend Infrastructure Framework
Motia is the only event-driven backend where you architect code, AI agents, and background tasks as modular Steps. All tracked, connected, and observable, in real time. Forget rewriting for every new runtime. Run smarter, automate faster, and outgrow chaos.

Code-first agents, APIs & automations
Instantly connect APIs, jobs, and agents as modular Steps, triggered by events, sharing data, and tracked in real time.


Logs

State and logging
Every state change and event is tracked, searchable, and visualized. See exactly what happened, when, and why.

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, 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