Quick Start
1
Scaffold an agents.yaml
Start from the compose starter (or bring your own
agents.yaml).2
Start the stack
The first run auto-generates a strong The API is served at
POSTGRES_PASSWORD and launches both services in the background.http://127.0.0.1:8005.3
Call your agent
Hit the health endpoint, then chat.
4
Stop the stack
Stop the containers; add
-v to also drop the Postgres volume.How It Works
compose up copies your agents.yaml into .praisonai-compose/, generates api_server.py, writes a locked-down .env, then runs docker compose up.
The named volume
postgres_data persists the database between restarts.
Commands
Two subcommands manage the stack.
Both commands wrap
docker compose with a 600 s timeout so first-run image pulls complete without hanging on an unresponsive Docker daemon.
Environment Variables
The generated.env drives both services. Defaults come from the stackβs docker-compose.yml.
Security
The stack ships secure-by-default; three safeguards matter most.POSTGRES_PASSWORD is required β no repo default
POSTGRES_PASSWORD is required β no repo default
The shipped stack has no default password, so Postgres never starts with a repo-known credential. Compose uses the
:? operator and fails fast if it is unset. On the first compose up, the CLI writes a strong secrets.token_urlsafe(24) value into .praisonai-compose/.env.Postgres binds to loopback by default
Postgres binds to loopback by default
POSTGRES_BIND defaults to 127.0.0.1, so the database is not reachable on all host interfaces. Set it explicitly (e.g. POSTGRES_BIND=0.0.0.0) only when you intend to expose it.The generated .env is chmod 0600
The generated .env is chmod 0600
Because
.env holds the database password and API token, the CLI restricts it to owner read/write on POSIX systems.Path Resolution & Overrides
The CLI finds the stack automatically in a checkout, with explicit overrides.A legacy monorepo-root
deploy/ layout still resolves as a one-release compatibility fallback. Prefer the new praisonai deploy compose commands.Best Practices
Pin PRAISONAI_IMAGE in production
Pin PRAISONAI_IMAGE in production
The default image tag is
latest, which drifts. Pin a released tag in .env for reproducible deployments.Keep auth enabled when exposing the API
Keep auth enabled when exposing the API
Leave
PRAISONAI_API_AUTH=enabled and set PRAISONAI_API_TOKEN. Clients then send Authorization: Bearer <token>.Use --volumes only when you mean it
Use --volumes only when you mean it
compose down -v drops the postgres_data volume and all stored data. Omit -v to keep the database between runs.Related
Deploy Templates
Scaffold this stack and cloud projects.
Helm Chart β Agents API
The Kubernetes equivalent of this stack.

