Skip to main content
Check deployment readiness and diagnose issues using praisonai deploy doctor.

CLI

pip install praisonai

# Run local checks
praisonai deploy doctor

# Run all checks (local + all providers)
praisonai deploy doctor --all

# Check specific provider
praisonai deploy doctor --provider aws
praisonai deploy doctor --provider azure
praisonai deploy doctor --provider gcp
Expected Output:
🏥 Running deployment health checks...

╭─────────────────────────────────────────────────────────────────────────────╮
│                          Health Check Results                                │
├─────────────────────────────────┬────────────┬──────────────────────────────┤
│ Check                           │ Status     │ Message                      │
├─────────────────────────────────┼────────────┼──────────────────────────────┤
│ Python Version                  │ ✅ PASS    │ Python 3.11.0                │
│ PraisonAI Installed             │ ✅ PASS    │ Version 2.6.2                │
│ agents.yaml Exists              │ ✅ PASS    │ Found at ./agents.yaml       │
│ agents.yaml Valid               │ ✅ PASS    │ Configuration is valid       │
│ OPENAI_API_KEY                  │ ✅ PASS    │ API key is set               │
│ Docker Available                │ ✅ PASS    │ Docker 24.0.0                │
╰─────────────────────────────────┴────────────┴──────────────────────────────╯

Summary:
  Total checks: 6
  Passed: 6
  Failed: 0

CLI Flags

FlagTypeDefaultDescription
--file, -fstringagents.yamlPath to agents.yaml
--providerchoice-Check specific provider (aws, azure, gcp)
--allflagfalseRun all checks
--verboseflagfalseVerbose output
--jsonflagfalseOutput as JSON

Python

from praisonai.deploy.doctor import (
    run_all_checks,
    run_local_checks,
    run_aws_checks,
    run_azure_checks,
    run_gcp_checks
)

# Run local checks
report = run_local_checks(agents_file="agents.yaml")

print(f"Total: {report.total_checks}")
print(f"Passed: {report.passed_checks}")
print(f"Failed: {report.failed_checks}")

for check in report.checks:
    status = "✅" if check.passed else "❌"
    print(f"{status} {check.name}: {check.message}")
    if not check.passed and check.fix_suggestion:
        print(f"   Fix: {check.fix_suggestion}")

Check Types

Local Checks

Run by default or with --file:
CheckDescription
Python VersionPython 3.8+ required
PraisonAI InstalledPackage installed
agents.yaml ExistsFile exists at path
agents.yaml ValidConfiguration is valid
OPENAI_API_KEYAPI key environment variable
Docker AvailableDocker daemon running

AWS Checks

Run with --provider aws:
CheckDescription
AWS CLI Installedaws command available
AWS CredentialsValid credentials configured
AWS RegionRegion is set
ECR AccessCan access Elastic Container Registry
ECS AccessCan access Elastic Container Service

Azure Checks

Run with --provider azure:
CheckDescription
Azure CLI Installedaz command available
Azure Logged InValid login session
Subscription SetSubscription ID configured
Resource GroupResource group exists
Container RegistryACR access

GCP Checks

Run with --provider gcp:
CheckDescription
GCloud CLI Installedgcloud command available
GCloud AuthenticatedValid authentication
Project SetProject ID configured
Cloud Run APIAPI enabled
Artifact RegistryRegistry access

Failed Check Example

🏥 Running deployment health checks...

╭─────────────────────────────────────────────────────────────────────────────╮
│                          Health Check Results                                │
├─────────────────────────────────┬────────────┬──────────────────────────────┤
│ Check                           │ Status     │ Message                      │
├─────────────────────────────────┼────────────┼──────────────────────────────┤
│ Python Version                  │ ✅ PASS    │ Python 3.11.0                │
│ PraisonAI Installed             │ ✅ PASS    │ Version 2.6.2                │
│ agents.yaml Exists              │ ❌ FAIL    │ File not found               │
│ OPENAI_API_KEY                  │ ❌ FAIL    │ Not set                      │
│ Docker Available                │ ✅ PASS    │ Docker 24.0.0                │
╰─────────────────────────────────┴────────────┴──────────────────────────────╯

Summary:
  Total checks: 5
  Passed: 3
  Failed: 2

💡 Fix Suggestions:

agents.yaml Exists:
  Run: praisonai deploy init --file agents.yaml

OPENAI_API_KEY:
  Run: export OPENAI_API_KEY="your-api-key"

JSON Output

praisonai deploy doctor --json
{
  "total_checks": 6,
  "passed": 5,
  "failed": 1,
  "all_passed": false,
  "checks": [
    {
      "name": "Python Version",
      "passed": true,
      "message": "Python 3.11.0",
      "fix_suggestion": null
    },
    {
      "name": "OPENAI_API_KEY",
      "passed": false,
      "message": "Not set",
      "fix_suggestion": "export OPENAI_API_KEY=\"your-api-key\""
    }
  ]
}

Troubleshooting

IssueFix
agents.yaml not foundpraisonai deploy init
API key not setexport OPENAI_API_KEY="..."
Docker not runningStart Docker daemon
AWS credentialsaws configure
Azure not logged inaz login
GCP not authenticatedgcloud auth login