Deploy Doctor
Preflight readiness checks for deployments with run_all_checks
Doctor confirms that Python, ports, agents.yaml, and the host CLIs (docker, aws, az, gcloud) are ready before you deploy.
from praisonai_deploy import run_all_checks
report = run_all_checks("agents.yaml")
print(report.all_passed)Quick Start
- Run every check
bash praisonai deploy doctor --all - From Python
python from praisonai_deploy import run_all_checks report = run_all_checks("agents.yaml") for check in report.checks: print(check.name, check.passed)
What It Checks
run_all_checks runs local, Docker, and cloud-provider checks.
| Check | Passes when |
|---|---|
| Python Version | Python 3.9 or higher |
| Port | The configured port is free |
| agents.yaml | A valid deploy: section is present |
| Docker | docker --version succeeds |
| AWS CLI | aws sts get-caller-identity succeeds |
| Azure CLI | az account show succeeds and, when a subscription_id is configured, the ambient subscription matches it. A mismatch fails the check with fix_suggestion: "az account set --subscription <configured id>". |
| GCP CLI | gcloud config get-value project returns a project |
Each failing check includes a fix_suggestion telling you how to resolve it.
DoctorReport
run_all_checks returns a DoctorReport.
| Property | Type | Description |
|---|---|---|
checks | List[DoctorCheckResult] | Individual check results |
total_checks | int | Number of checks run |
passed_checks | int | Number that passed |
failed_checks | int | Number that failed |
all_passed | bool | Whether every check passed |
Each DoctorCheckResult has name, passed, message, and an optional fix_suggestion.
Common Patterns
Gate a deploy on readiness.
from praisonai_deploy import Deploy, run_all_checks
report = run_all_checks("agents.yaml")
if report.all_passed:
Deploy.from_yaml("agents.yaml").deploy()
else:
for check in report.checks:
if not check.passed:
print(check.name, "->", check.fix_suggestion)Best Practices
Run doctor in CI before deploy
A failing doctor check stops a broken deploy before it starts, saving a slow round-trip to a cloud provider.
Read the fix_suggestion
Every failed check tells you exactly what to run — aws configure, az login, gcloud init, or install a missing CLI.