Deploy: Plan and Apply
Preview deployment changes, apply them, check status, and tear down resources.
Prerequisites
Section titled “Prerequisites”- Deploy section configured in arena.yaml (see Configure Deploy)
- A compiled
.pack.jsonfile - An installed adapter
Plan a Deployment
Section titled “Plan a Deployment”Preview what changes will be made without modifying anything:
promptarena deploy planTarget a specific environment:
promptarena deploy plan --env productionExample output:
Planning deployment (env: production)...Provider: agentcore v0.2.0
Changes: + agent_runtime.greeting Create agent runtime + a2a_endpoint.greeting Create A2A endpoint
Summary: 2 resources to create, 0 to update, 0 to deleteReading the Plan
Section titled “Reading the Plan”| Symbol | Action | Description |
|---|---|---|
+ | CREATE | New resource will be created |
~ | UPDATE | Existing resource will be modified |
- | DELETE | Resource will be removed |
! | DRIFT | Resource has drifted from expected state |
| NO_CHANGE | Resource exists and needs no changes |
Apply a Deployment
Section titled “Apply a Deployment”Run both plan and apply in one step:
promptarena deployOr target an environment:
promptarena deploy --env stagingWhat happens:
- The CLI loads arena.yaml and merges environment config
- Auto-detects or uses the specified pack file
- Sends a plan request to the adapter
- Sends an apply request with streaming progress
- Saves state to
.promptarena/deploy.state
Specifying a Pack File
Section titled “Specifying a Pack File”promptarena deploy --pack dist/app.pack.jsonUsing a Different Config File
Section titled “Using a Different Config File”promptarena deploy --config deploy.yamlCheck Deployment Status
Section titled “Check Deployment Status”Query the current state of deployed resources:
promptarena deploy statusOr for a specific environment:
promptarena deploy status --env productionExample output:
Status: deployedLast deployed: 2026-02-16T10:30:00ZPack checksum: sha256:abc123def456...
Resources: agent_runtime.greeting: healthy a2a_endpoint.greeting: healthyStatus Values
Section titled “Status Values”| Status | Meaning |
|---|---|
deployed | All resources are running |
not_deployed | No resources found |
degraded | Some resources are unhealthy |
unknown | Unable to determine status |
Resource Health
Section titled “Resource Health”| Health | Meaning |
|---|---|
healthy | Resource is running normally |
unhealthy | Resource exists but has issues |
missing | Resource was expected but not found |
Destroy a Deployment
Section titled “Destroy a Deployment”Remove all managed resources:
promptarena deploy destroy --env stagingWhat happens:
- Loads prior state (exits if no state exists)
- Sends a destroy request to the adapter
- The adapter removes all managed resources
- Deletes the local state file
Redeployment Workflow
Section titled “Redeployment Workflow”When you update a pack and redeploy, the adapter receives the prior state and can determine what changed:
# Update your promptvim prompts/greeting.yaml
# Recompilepackc compile --config arena.yaml --output app.pack.json --id my-app
# Plan shows updatespromptarena deploy plan --env production
# Apply updatespromptarena deploy --env productionThe plan will show ~ (UPDATE) for resources that need modification and empty space for resources with no changes.
Common Patterns
Section titled “Common Patterns”Deploy to All Environments
Section titled “Deploy to All Environments”# Deploy in order: dev → staging → productionpromptarena deploy --env devpromptarena deploy --env stagingpromptarena deploy --env productionQuick Status Check
Section titled “Quick Status Check”for env in dev staging production; do echo "=== $env ===" promptarena deploy status --env $envdoneSafe Production Deploy
Section titled “Safe Production Deploy”Always plan before applying to production:
# Review the planpromptarena deploy plan --env production
# Apply after reviewpromptarena deploy apply --env productionRefresh State
Section titled “Refresh State”Refresh local state to match the live environment. This detects drift — resources that have been modified outside of PromptKit.
# Refresh state for default environmentpromptarena deploy refresh
# Refresh state for productionpromptarena deploy refresh --env productionExample output:
Refreshing state (env: production)...Provider: agentcore v0.2.0
Resources: agent_runtime.greeting: healthy ! a2a_endpoint.greeting: unhealthy — endpoint configuration changed
State refreshed at 2026-02-16T11:00:00ZState is also automatically refreshed before each deploy plan and deploy command, so manual refresh is mainly useful for checking drift without planning changes.
Import Resources
Section titled “Import Resources”Import pre-existing cloud resources into deployment state. This is useful when you’ve created resources manually or with another tool and want PromptKit to manage them going forward.
promptarena deploy import <type> <name> <id>Examples:
# Import an agent runtime by its container IDpromptarena deploy import agent_runtime my-agent container-abc123
# Import an A2A endpointpromptarena deploy import a2a_endpoint my-ep endpoint-xyz789
# Import into a specific environmentpromptarena deploy import agent_runtime my-agent container-abc123 --env productionExample output:
Importing agent_runtime "my-agent" (container-abc123)...Imported: agent_runtime.my-agent — healthyAfter importing, the resource appears in deploy plan and deploy status output, and will be managed by subsequent deploy and deploy destroy operations.
Troubleshooting
Section titled “Troubleshooting”Error: no prior state found
Section titled “Error: no prior state found”The status and destroy commands require a prior deployment. Deploy first:
promptarena deploy --env productionError: no pack file found
Section titled “Error: no pack file found”Compile your pack first, or specify the path:
promptarena deploy --pack path/to/app.pack.jsonDeployment shows no changes
Section titled “Deployment shows no changes”If plan shows all resources as NO_CHANGE, the pack and config haven’t changed since the last deploy. Update your pack or config and try again.
See Also
Section titled “See Also”- Configure Deploy — Set up arena.yaml
- CI/CD Integration — Automate plan and apply
- CLI Commands — Complete flag reference
- State Management — How state tracking works