Agent Sandbox CLI — Documentation
abx is the command-line client for the Agent Sandbox cloud sandbox service (Alibaba Cloud Function Compute): create and manage sandboxes, run code and commands, author and deploy templates, and expose sandboxes to IDE agents through an MCP server. This page indexes the documentation of the CLI (@agent-sandbox/cli). The Python SDK is documented in the python-sdk repository; see Related SDK documentation.
Design Documents
| # | Document | Description |
|---|---|---|
| 1 | CLI Architecture | Layers, src/ structure, command groups, output and exit codes, build / SEA binary / release, parity contract |
| 2 | CLI Command System | Command tree, global options, natural language creation, OutputManager, AI-friendly design |
| 3 | MCP Server | 7 P0 tools, session binding, STDIO and Streamable HTTP transports, IDE configuration, FC deployment |
| 4 | Templates Catalog | Official template catalog contract, publishing flow, offline validation, template command surface |
The consolidated index is DESIGN.md. English-only maintainer documents (port rules, repository layout, provider drafts) are listed there and live in docs/design/ and docs/PORTING.md.
User Guides
guide/ — Tutorials & How-to Guides
| Guide | Description |
|---|---|
| Getting Started | Install, configure, first sandbox |
| Best Practices | When to use --provider, --model, llm_model, credentials, and the standalone binary |
| Operations | Every command group and the one command for that job |
| Binary Installation | Single-file abx binary (Node SEA), no Node.js required |
| Providers | Install, select, and configure sandbox providers |
| Authoring Providers | Write an EPP/1 provider plugin, including [template] and install-from-git |
| Authentication | API Key / AK-SK authentication and abx config |
| CLI Tutorial | CLI quick start |
| Using Templates | Official and community templates |
| Authoring Templates | Custom templates, including abx template init --adopt for an existing project |
| Deploy & Build | Template lifecycle (template init / --adopt → deploy → create) |
| E2E Template Workflow | Complete guide from building a template to using sandboxes |
| MCP Integration | Cursor / Claude Desktop / VS Code integration |
| Environment Variables | Sandbox env var scopes, injection, and direct-exec semantics |
| Troubleshooting | Common issues and solutions |
| Agent Skill Installation | Install the static SKILL.md agent guide into Qoder / Claude Code / Cursor / Qwen Code / Codex |
| Agents API | Run Codex, Qwen Code, and later agent CLIs inside the sandbox. The server parses sessions, turns, and items |
| Testing & Definition of Done | Three verification layers (unit, differential, real-cloud E2E) and the Definition of Done |
| Command and SDK map | abx and the Python SDK next to the E2B and OpenSandbox commands and methods |
reference/ — CLI / Configuration Reference
| Document | Description |
|---|---|
| CLI Command Reference | Canonical command tree, the fixed top-level shortcuts, removed spellings |
| CLI Reference | All CLI commands quick reference |
| Configuration | CLI environment variables, config file, priority |
| Error Codes | E1xxx–E6xxx error codes and CLI exit codes |
Project Planning
| Document | Description |
|---|---|
| Design Index | Design topic index and implementation status |
| Python to Node port | Parity contract and test ledger |
Quick Navigation
By role
- CLI user: Getting Started → Operations → Best Practices → CLI Tutorial
- Template author: Authoring Templates → Deploy & Build → E2E Template Workflow
- AI Agent developer: Agents API → MCP Integration → MCP Server
- CLI contributor: CLI Architecture → Python to Node port
By feature
- Natural language sandbox creation: CLI
- Deploy a project: CLI deploy command (
abx deployis a fixed build + push + create-template pipeline; templates are authored withabx template init— scaffold, one-sentence description, or--adopt) - MCP integration (Cursor/Claude): MCP Server
Other resources
- Template source of truth (awesome-templates): alibaba-agent-sandbox/awesome-templates — the single source of truth for official & community template content, the index (
awesome-templates.yaml), and publishing; consumed viaabx template search/abx template install - 中文文档: Chinese docs
Related SDK documentation
The Python SDK, the in-sandbox server SDK and the shared platform contracts are documented in the python-sdk repository:
- Documentation index
- SDK Usage Guide and SDK API Design
- Architecture — the SDK's six-layer architecture
- Template System and template.yaml Spec
- Declarative Usage, Session Persistence, Migrate from E2B