Agent Sandbox Registry

agent-sandbox

Decision: template deploy one-shot deployment command

无中文版

.agents/notes/implemented/feature/2026-09-09-template-deploy-command.md

Decision: template deploy one-shot deployment command

Status: implemented Implemented: 2026-09-09

Problem

The full template release flow involves several steps: (1) build the Docker image; (2) push it to ACR (Alibaba Cloud Container Registry); (3) call the CreateTemplate API to create/update the template. Users had to run abx template build, abx template push, and abx template create in sequence, which is tedious and easy to skip steps in. A one-shot command that merges these three steps is needed.

Decision

Add the abx template deploy command, which encapsulates the full pipeline build → push → create.

Core design

  1. abx template deploy is a superset of abx template build: it runs the full image build, ACR push, and CreateTemplate API call.
  2. Parameter reuse: the deploy command's parameter set is identical to build's (via params=list(build.params) on the click.command), so users don't need to learn new parameters.
  3. Implementation: internally deploy calls ctx.invoke(build, **kwargs) and runs the build command as a subprocess (the build command already contains the push + create logic).

The coexisting abx deploy

  1. abx deploy (top-level shortcut) has a different meaning from template deploy. abx deploy is a project-deployment command (NL mode or traditional mode) that deploys a user project into a sandbox to run. abx template deploy is a template-release command that publishes a template image to the platform.
Command Meaning Source
abx deploy ./project Project deployment (into a sandbox) cli/commands/deploy.py
abx template deploy Template release (to the platform) cli/commands/template.py

API Design

# one-shot template release (build + push + create)
abx template deploy ./examples/templates/python-hello \
  --alias python-hello \
  --timeout 300

# equivalent to running in sequence:
# abx template build → abx template push → abx template create

# project deployment (different command)
abx deploy ./my-project "deploy this FastAPI project"

Alternatives considered

Dependencies

Test Strategy

Acceptance criteria

Implementation