Create a sandbox with CLI
agentbox sandbox create starts a sandbox from the base template and opens an interactive terminal. Pass another template name as the final argument when needed.
For scripts and CI, use detached mode. The command prints the sandbox ID:
sh
sandbox_id=$(agentbox sandbox create --detach base)
echo "$sandbox_id"Without --detach, the CLI keeps the sandbox alive while the terminal is open. You can also set its timeout and lifecycle policy or pass the initial working directory, user, and environment variables. See the sandbox command reference.