Skip to main content
Run your agents behind a production-like API with a pgvector Postgres database using a single command.
The compose stack ships in the git checkout, not in the PyPI wheel (MANIFEST.in excludes infra/). Run from a full monorepo checkout, or point the CLI at the stack with PRAISONAI_INFRA_ROOT / PRAISONAI_COMPOSE_STACK.

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 POSTGRES_PASSWORD and launches both services in the background.
The API is served at 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.
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_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.
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

The default image tag is latest, which drifts. Pin a released tag in .env for reproducible deployments.
Leave PRAISONAI_API_AUTH=enabled and set PRAISONAI_API_TOKEN. Clients then send Authorization: Bearer <token>.
compose down -v drops the postgres_data volume and all stored data. Omit -v to keep the database between runs.

Deploy Templates

Scaffold this stack and cloud projects.

Helm Chart β€” Agents API

The Kubernetes equivalent of this stack.