npm test or docker compose up reliably, it can iterate autonomously without human intervention.

Tasks vs Services
Services are long-running processes that stay active throughout your session:- Databases (PostgreSQL, MySQL)
- Backend and frontend servers
- Caching systems (Redis)
- Installing dependencies
- Running tests
- Seeding databases
- Authenticating with cloud providers
Quick example
- Starts PostgreSQL when the environment starts
- Waits until the database is ready
- Seeds the database with test data
- Makes “Run tests” available as a manual action
Triggers
Control when tasks and services run:| Trigger | Services | Tasks | When it runs |
|---|---|---|---|
manual | ✓ | ✓ | On-demand via the CLI or UI |
postDevcontainerStart | ✓ | ✓ | After the Dev Container starts in a user environment (first start or rebuild). Does not fire during prebuilds. |
postEnvironmentStart | ✓ | ✓ | Every time the environment starts or resumes |
prebuild | ✓ | ✓ | During prebuild execution only (no user secrets available). Does not fire in user environments. |
beforeSnapshot | ✗ | ✓ | Before an environment snapshot is created |
Run automations across repositories
Tasks and services run within individual environments. For cross-repository automation at scale (migrations, security scanning, bulk updates), see Automations.Next steps
- automations.yaml schema - field reference for all fields, commands, triggers, and execution environments
- Examples - common patterns for databases, servers, and CI
- Dynamic configuration - create tasks and services programmatically