Skip to main content
These examples were ported from the Motia framework to iii-sdk@0.11.0 following the Motia → Node and Motia → Python migration guides. Each row links the original Motia source alongside the iii version so you can read the same workflow in both shapes — every wrapper stripped, every primitive (registerFunction, registerTrigger, iii.trigger) made explicit.

Examples

human-in-the-loop

Order approval workflow that pauses for a human and resumes via webhook. Demonstrates HTTP, durable subscribers, and state-driven workflow control.Before: MotiaDev/motia-examples/.../human-in-the-loop After: iii-hq/examples/human-in-the-loop

todo-app

Todo REST API with real-time stream mirror, durable topics for notifications/analytics/achievements, and cron jobs for cleanup and stats.Before: MotiaDev/motia-examples/.../todo-app After: iii-hq/examples/todo-app

ai-chat-agent

AI chat agent with conversation memory, web search tools, and live streaming responses through stream::set updates.Before: MotiaDev/motia-examples/.../ai-chat-agent After: iii-hq/examples/ai-chat-agent

property-search-agent

Multi-step property search agent in Python (iii-sdk async) — scraping, enrichment, neighbourhood analysis, and market trends as separate workers.Before: MotiaDev/motia-examples/.../property-search-agent After: iii-hq/examples/property-search-agent

What stayed the same

The business logic, topic names, function IDs, and trigger semantics carry over almost verbatim. If you can read the Motia version you can read the iii version.

What changed

ConcernMotiaiii-sdk@0.11.0
Setupmotia framework + auto file scanregisterWorker(...) + import './handlers/...' side effects in src/main.ts
HTTP responses{ status, body }{ status_code, body }
Path / queryparams, querypath_params, query_params (values are string | string[])
StatestateManager.get/set/listiii.trigger({ function_id: 'state::get' | 'state::set' | 'state::list' | 'state::delete', ... })
StreamsStream classiii.trigger({ function_id: 'stream::set' | 'stream::delete' | 'stream::list' | ..., ... })
Queue publishemit({ topic, data })iii.trigger({ function_id: 'iii::durable::publish', payload: { topic, data } })
Queue subscriberEventConfig.subscribesregisterTrigger({ type: 'durable:subscriber', config: { topic } })
Cron expression5-field cron7-field expression (sec min hour dom month dow year)
HTTP path style/orders/validate/orders/validate (leading / is required in iii)

Try them locally

Each folder ships with its own iii-config.yaml, package.json/pyproject.toml, and a smoke-test script (test-*.sh) so you can run the engine + worker and exercise the full flow in one command.
git clone https://github.com/iii-hq/examples
cd examples/todo-app
pnpm install --ignore-workspace
iii --config ./iii-config.yaml
# then in another terminal
bash test-todo-flow.sh