Skip to main content
DeployConfig and its nested models define exactly what a deployment does.

Quick Start

1

API config

2

Cloud config


DeployConfig

Validation rules:
  • type="cloud" requires a cloud: section, otherwise raises ValueError("cloud config required for cloud deployment type").
  • type="api" fills in APIConfig() defaults when omitted.
  • type="docker" fills in DockerConfig() defaults when omitted.

Enums

DeployType

CloudProvider

"aws" · "azure" · "gcp" · "fly" · "railway" · "render"
This enum names the built-ins only — it is not the list of deployable providers. An enum can’t be extended at runtime, so the authority is praisonai_deploy.providers.list_cloud_providers(). Validate a name with coerce_cloud_provider(), and add your own targets via Custom cloud providers.

CloudProviderLike

CloudProviderLike = Union[CloudProvider, str] The accepted type for provider. Built-ins keep their enum identity on the way out (config.provider is CloudProvider.AWS); plugin providers come back as normalised lowercase strings.

ServiceState

running · stopped · pending · failed · not_found · unknown

APIConfig


DockerConfig

Sibling api: block (Docker only)

type: docker accepts an optional sibling api: block that configures the API server the container will run. Fields are the same as APIConfig above. Omitting the block runs the container with the same defaults as type: api — auth on, CORS on, port 8005.

Generated Gunicorn CMD

type: docker generates a Dockerfile whose CMD starts Gunicorn with fixed worker-timeout values tuned for agent LLM workloads.
These values are hard-coded in praisonai_deploy/docker.py (constant DEFAULT_GUNICORN_TIMEOUT). There is no YAML knob for them yet — if you need a different worker timeout, generate the Dockerfile with praisonai deploy plan and edit the CMD line before building.
The sibling api: block is type: docker-only. On type: cloud it is dropped — cloud providers shell out to external CLIs and never generate the API server.

CloudConfig

The provider value is normalised (.strip().lower()) before validation, so AWS, aws, and " aws " all resolve to CloudProvider.AWS. Unknown names raise ValueError: Invalid cloud provider: X. Must be one of: …, where the list comes from the registry (built-ins plus any installed plugins).
Compatibility. Built-in serialisation is unchanged: CloudConfig(provider="aws").model_dump()["provider"] is CloudProvider.AWS, and model_dump_json() still emits "provider":"aws". Because provider is now CloudProvider | str, a plugin provider is a str.value would raise on it. Guard access the way the built-in providers do: config.provider.value if hasattr(config.provider, "value") else str(config.provider).

AgentConfig


Best Practices

For type="api" and type="docker", omit the nested block to accept sensible defaults. Only add fields you need to change.
provider, region, and service_name are required for cloud deployments and have no defaults.
cpu and memory are strings ("256", "512"), not integers — quote them in YAML.

Python API

Deploy class and result models

Quick Start

Minimal agents.yaml per type

Custom Providers

Register your own cloud target