Configuration (config.yaml)
Configure your Motia project within the iii config.yaml file.
Motia projects run on iii, which uses a config.yaml file for its modular runtime configuration. When you scaffold a project with npx motia@latest create, this file is generated for you with sensible defaults.
The config.yaml is an iii configuration file. Most modules (API, queue, state, streams, cron, observability) are iii infrastructure concerns. Visit iii.dev/docs for the full module reference.
Project Setup
Your package.json must have "type": "module" and use iii as the dev command:
Running npm run dev starts the iii runtime, which reads config.yaml and boots all configured modules -- including the Motia application via the Shell Exec module.
Motia-Specific Configuration
The portion of config.yaml specific to Motia is the Shell Exec module, which tells iii how to build and run your Motia application:
watch-- glob patterns for files to watch. When these change, the exec commands are re-run.exec-- commands to execute in order.npx motia devbuilds your Steps, andnode dist/index-dev.jsruns the bundled output.
Full Development Config
A complete config.yaml for local development. The iii infrastructure modules use file-based storage by default:
All config values support environment variable interpolation: ${VARIABLE_NAME:default_value}. If the variable is not set, the default after : is used.
For production configuration with Redis adapters and OTLP exporters, see the Deployment Guide and iii.dev/docs.
Raw Body Access
The raw request body is available as req.rawBody in API Steps. Useful for webhook signature verification: