Skip to main content
Tasks and services automate the repetitive work of setting up and operating development environments: seeding databases, starting servers, running tests, authenticating with cloud providers. Define it once and it runs automatically or on-demand. For agents, tasks and services are essential. When Ona can run npm test or docker compose up reliably, it can iterate autonomously without human intervention. Tasks and services in the session sidebar

Tasks vs Services

In the session sidebar, long-running processes live under Ports & Services and one-off actions live under Tasks. Services are long-running processes that stay active throughout your session. They appear in the Ports & Services tab alongside the ports they expose. Services in the Ports & Services tab
  • Databases (PostgreSQL, MySQL)
  • Backend and frontend servers
  • Caching systems (Redis)
A service’s start command must stay running (block) for the service to remain active. If the command exits, the service transitions to Stopped (exit code 0) or Failed (non-zero). For example, npm start or docker run postgres block and keep the service alive, while docker run -d postgres returns immediately and the service stops.
Tasks are one-off actions that run and complete. They appear in the Tasks tab and can run automatically during startup or manually on demand. Tasks in the Tasks tab
  • Installing dependencies
  • Running tests
  • Seeding databases
  • Authenticating with cloud providers

Quick example

This configuration:
  1. Starts PostgreSQL when the environment starts
  2. Waits until the database is ready
  3. Seeds the database with test data
  4. Makes “Run tests” available as a manual action

Triggers

Control when tasks and services run: See automations.yaml schema for complete trigger documentation, including how triggers interact with prebuilds.

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