Skip to main content
Copy and adapt these examples for your projects. These patterns work for both humans and agents - when Ona Agent sees these tasks available, it can use them as part of its run loop.

Database provisioning

Start PostgreSQL and seed it with development data:

Containerized services

Run services in Docker containers using docker run directly. This gives you full control over ports, volumes, environment variables, and container entrypoints.
Do not use docker run -d (detached mode) in a service start command. The -d flag makes docker run exit immediately, which causes the service to transition to Stopped. Run containers in the foreground so the process stays alive.
The if docker inspect pattern handles environment restarts — it reuses the existing container instead of failing on a name conflict.

Prebuild optimization

Speed up environment starts by running tasks during prebuild:
Tasks with the prebuild trigger run during prebuild execution. Organization and project secrets are available, but user secrets are not.

Build and test pipeline

Chain tasks with dependencies:
Agents can run test knowing it will build first.

Cloud authentication

Authenticate with AWS using Ona’s identity provider:

Preview server

Serve your application for testing:
Agents can share this preview URL when demonstrating changes.

Jupyter notebook

Start Jupyter for data science work:

Storybook

Component development with hot reload:

Parallel database testing

Test against multiple database versions:

Troubleshooting environment

Manual task for debugging production issues: