Deploy the last successful build, or build a new image with --build.
Synopsis
Deploy the last successful build in the workspace, or build a new image from the current directory with --build and deploy that.
Pass --build-id or --version to deploy a specific build; both skip the setup check.
Without either, deploy checks login, workspace binding, a declared network egress policy, local .env entries, the last successful build, and Atlas setup. Every populated .env key must exist as a project or workspace secret (platform-reserved names are skipped). Blank entries are ignored. The check compares key names only, and infers nothing from env.example or a missing .env. An unreadable .env or a failed secret listing must be resolved first.
deploy never starts a build on its own. A workspace with no successful image fails with the command to run: agentengine deploy --build.
On an interactive terminal, deploy offers to store each missing .env value with agentengine secret set after confirmation, and leaves existing secrets unchanged. It runs agentengine init when no workspace is bound and runs agentengine atlas setup for an unlinked Atlas setup after syncing local entries. A MONGODB_URI that does not match a live cluster in the linked Atlas project is reported with instructions to provide a URI or create one.
Non-interactive deploy, redirected stdout, --json, and --all never prompt, run init, or provision Atlas. They print the missing setup and the commands to fix it. --workspace and --all print agentengine build when no image exists. --yes accepts billed Flex defaults and Atlas IP access-list changes during atlas setup, and is not implied by a TTY.
--build archives the current directory, builds a new image, and tails the deployment the server starts when the build succeeds. It is the one-step build-and-deploy path and is single-agent only. It rejects --build-id, --version, --no-wait, --workspace, and --all.
The workspace ID comes from .agentengine/state.json, written by agentengine init. Run from an agent directory, or pass --workspace-id to deploy to an existing workspace with no agent directory. With no local agent directory, --workspace-id cannot start a source build: the hint is agentengine deploy --build from an agent directory.
agentengine deploy [flags]Options
--all Monorepo: deploy all workspaces sequentially --base-url string Platform base URL --build Build a new image from this directory, then deploy it --build-id string Build ID to deploy (default: last successful build) --context string Named context to target (see 'agentengine context list')-h, --help help for deploy --json Output deployment result as JSON --no-wait Return immediately after triggering without polling for status --org-id string Organization ID --project-id string Project ID --timeout duration Maximum time to wait per deployment (total time = timeout x number of agents for --all) (default 30m0s) --version string Deploy the release build for this declared agent.yaml version (mutually exclusive with --build-id) --workspace string Monorepo: deploy a specific workspace by name (from root agent.yaml) --workspace-id string Workspace ID-y, --yes Accept billed Flex defaults and Atlas IP access-list changes when deploy runs atlas setupOptions inherited from parent commands
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)See Also
agentengine - Agent Engine local development CLI.
agentengine deploy cancel - Cancel an in-flight deployment.
agentengine deploy get - Get details of a deployment.
agentengine deploy list - List deployments for a workspace.
agentengine deploy logs - Show the event log for a deployment.