Skip to main content
Check deployment status and manage lifecycle using praisonai deploy status and praisonai deploy destroy.

Status

Check the current status of a deployment.
praisonai deploy status --file agents.yaml
Expected Output:
📊 Checking deployment status...

╭─────────────────────────────────────────────────────────────────────────────╮
│                            Deployment Status                                 │
├─────────────────┬───────────────────────────────────────────────────────────┤
│ Property        │ Value                                                     │
├─────────────────┼───────────────────────────────────────────────────────────┤
│ State           │ RUNNING                                                   │
│ Service Name    │ praisonai-service                                         │
│ Provider        │ api                                                       │
│ Region          │ N/A                                                       │
│ URL             │ http://127.0.0.1:8005                                     │
│ Healthy         │ ✅ Yes                                                    │
│ Instances       │ 1/1                                                       │
│ Created         │ 2024-01-15T10:30:00Z                                      │
│ Updated         │ 2024-01-15T10:30:00Z                                      │
╰─────────────────┴───────────────────────────────────────────────────────────╯

Status CLI Flags

FlagTypeDefaultDescription
--file, -fstringagents.yamlPath to agents.yaml
--verbose, -vflagfalseShow detailed metadata
--jsonflagfalseOutput as JSON

Status States

StateDescription
RUNNINGService is running and healthy
STOPPEDService is stopped
PENDINGService is starting or updating
FAILEDService failed to start
NOT_FOUNDNo deployment found
UNKNOWNStatus cannot be determined

Verbose Output

praisonai deploy status --file agents.yaml --verbose
Shows additional metadata like container IDs, task ARNs, etc.

JSON Output

praisonai deploy status --file agents.yaml --json
{
  "state": "running",
  "url": "http://127.0.0.1:8005",
  "message": "Service is running",
  "service_name": "praisonai-service",
  "provider": "api",
  "region": null,
  "healthy": true,
  "instances_running": 1,
  "instances_desired": 1,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "metadata": {}
}

Destroy

Delete/destroy a deployment.
praisonai deploy destroy --file agents.yaml
Expected Output:
⚠️  Warning: This will destroy the deployment!
File: agents.yaml
Service: praisonai-service
Provider: api

Type 'yes' to confirm destruction: yes

🗑️ Destroying deployment...

✅ Deployment destroyed successfully

Deleted resources:
  • process: praisonai-api-8005

Destroy CLI Flags

FlagTypeDefaultDescription
--file, -fstringagents.yamlPath to agents.yaml
--yes, -yflagfalseSkip confirmation prompt
--forceflagfalseForce deletion
--jsonflagfalseOutput as JSON

Skip Confirmation

praisonai deploy destroy --file agents.yaml --yes

Force Destroy

Force deletion even if some resources fail to delete:
praisonai deploy destroy --file agents.yaml --yes --force

Cloud Destroy Example

praisonai deploy destroy --file agents.yaml --yes
Expected Output (AWS):
🗑️ Destroying deployment...

✅ Deployment destroyed successfully

Deleted resources:
  • ecs_service: praisonai-service
  • ecs_task_definition: praisonai-task:1
  • ecr_image: praisonai-app:latest
  • cloudwatch_log_group: /ecs/praisonai-service

Python

from praisonai.deploy import Deploy

# Load deployment
deploy = Deploy.from_yaml("agents.yaml")

# Check status
status = deploy.status()
print(f"State: {status.state.value}")
print(f"URL: {status.url}")
print(f"Healthy: {status.healthy}")

# Destroy
result = deploy.destroy(force=False)
if result.success:
    print(f"Destroyed: {result.resources_deleted}")
else:
    print(f"Error: {result.error}")

Troubleshooting

IssueFix
NOT_FOUND statusDeployment doesn’t exist, run praisonai deploy run
FAILED statusCheck logs, run praisonai deploy doctor
Destroy failedTry with --force flag
Permission deniedCheck cloud provider credentials