Skip to main content
Deploy your agents to Fly.io with a starter fly.toml and a single deploy command.
Starter templates ship in the git checkout, not in the PyPI wheel (MANIFEST.in excludes infra/). Run create from a monorepo checkout, or set PRAISONAI_STARTERS_ROOT / PRAISONAI_INFRA_ROOT.

Quick Start

1

Scaffold the project

The starter drops fly.toml and agents.yaml into the current directory.
2

Authenticate with Fly

Set a token or log in with flyctl.
3

Deploy

Deploy the app; pass a region if you want to override the default.

How It Works

The command shells out to flyctl deploy, so authentication follows a clear precedence. Auth precedence: FLY_API_TOKENFLY_ACCESS_TOKENflyctl auth whoami fallback (a fly auth login session stores its token in the flyctl config, not the environment).

CloudConfig support

The Fly provider forwards most CloudConfig fields to flyctl; a few belong elsewhere and are reported instead of dropped. Added in PraisonAI PR #4876.
cpu="256" and memory="512" are ECS CPU-unit conventions consumed by the AWS provider, not Fly VM core counts — passing --vm-cpus 256 would request an unavailable machine size and fail a previously valid deploy. Leaving the defaults uses Fly’s own default VM. To override VM sizing, set a Fly-appropriate value (for example cpu="1", memory="1024").
Programmatic consumers reading the JSON result of deploy should inspect metadata["unapplied"] to see which fields the provider could not apply (and the suggested remedy).

Command Options


Starter fly.toml

The fly starter ships production-ready defaults.

Doctor

Check Fly readiness before deploying.
deploy doctor --provider fly now runs the Fly provider’s checks (flyctl on PATH + authentication) — previously this reported “Unknown provider”.

Best Practices

The starter uses latest. Swap in a released tag in [build] image before shipping.
Keep OPENAI_API_KEY and other secrets out of Git: fly secrets set OPENAI_API_KEY=.... Any env_vars in CloudConfig are handled for you — the provider runs fly secrets set --stage before deploying, so values never reach the command line or logs.
The starter sets PRAISONAI_API_AUTH=enabled. Leave it on and supply a token so the public app requires Authorization: Bearer.

Add a New Provider

Provider entry points are pluggable via pyproject.toml. To add your own, register it in the provider registry (providers/_registry.py) and implement the BaseProvider interface (doctor, plan, deploy, status, destroy).

Deploy Templates

Scaffold the fly starter.

Deploy to Railway

Another one-command PaaS target.