Agent Sandbox Registry

模板

openclaw

OpenClaw AI Agent runtime — open-source AI coding agent gateway

能力 shell files code ports · 状态 official

abx template install alibaba-agent-sandbox/awesome-templates//openclaw

在每个 provider 上

alicloud-express可安装构建 · 怎么做
alicloud-container已有模板 id 才能创建 · 怎么做
cubesandbox已有模板 id 才能创建 · 怎么做
e2b已有模板 id 才能创建 · 怎么做
opensandbox需要先推送镜像 · 怎么做

说明

openclaw

中文版 | English


English

Sandbox runtime for the OpenClaw open-source AI coding agent, providing agent gateway and runtime support.

Environment

This template comes preinstalled with the following tools and dependencies:

Category Details
Base image python:3.12-slim
Node.js Node.js 22.x + npm (core runtime)
Node packages openclaw
System tools git, curl
Ports 18789 (Gateway)
Resources 2 CPU / 4096 MB memory

Installation

Install from a local path:

abx template install ./openclaw --registry-type local

Install from GitHub:

abx template install alibaba-agent-sandbox/awesome-templates//openclaw

Usage

Create a sandbox instance and pass in the API key:

abx create --template openclaw --env ANTHROPIC_API_KEY=sk-ant-xxx

OpenAI can also be used as the backend:

abx create --template openclaw --env OPENAI_API_KEY=sk-xxx

Launch OpenClaw inside the sandbox:

abx exec <sandbox-id> -- openclaw --help

Using the Python SDK:

from agent_sandbox import Sandbox

sandbox = Sandbox.create_sync(
    template="openclaw",
    env={"ANTHROPIC_API_KEY": "sk-ant-xxx"}
)

result = sandbox.commands.run("openclaw --version")
print(result.stdout)

Configuration

Environment Variables

Variable Description Required
ANTHROPIC_API_KEY Anthropic API key One of the two
OPENAI_API_KEY OpenAI API key One of the two
WORKSPACE Working directory path, defaults to /workspace No

Ports

Port Description
18789 OpenClaw Gateway service port

Custom Configuration

To install extra dependencies on top of this template, run the following after the sandbox is created:

abx exec <sandbox-id> -- npm install -g <package-name>

Notes


中文

OpenClaw 开源 AI 编程 Agent 的沙箱运行环境,提供 Agent 网关与运行时支持。

环境说明

本模板预装以下工具和依赖:

类别 内容
基础镜像 python:3.12-slim
Node.js Node.js 22.x + npm(核心运行时)
Node 包 openclaw
系统工具 git、curl
端口 18789(Gateway)
资源配置 2 CPU / 4096 MB 内存

安装方式

从本地安装:

abx template install ./openclaw --registry-type local

从 GitHub 安装:

abx template install alibaba-agent-sandbox/awesome-templates//openclaw

使用示例

创建沙箱实例并传入 API Key:

abx create --template openclaw --env ANTHROPIC_API_KEY=sk-ant-xxx

也可以使用 OpenAI 作为后端:

abx create --template openclaw --env OPENAI_API_KEY=sk-xxx

在沙箱中启动 OpenClaw:

abx exec <sandbox-id> -- openclaw --help

使用 Python SDK:

from agent_sandbox import Sandbox

sandbox = Sandbox.create_sync(
    template="openclaw",
    env={"ANTHROPIC_API_KEY": "sk-ant-xxx"}
)

result = sandbox.commands.run("openclaw --version")
print(result.stdout)

配置说明

环境变量

变量名 说明 必填
ANTHROPIC_API_KEY Anthropic API 密钥 二选一
OPENAI_API_KEY OpenAI API 密钥 二选一
WORKSPACE 工作目录路径,默认 /workspace 否

端口说明

端口 说明
18789 OpenClaw Gateway 服务端口

自定义配置

如需在模板基础上安装额外依赖,可在创建沙箱后执行:

abx exec <sandbox-id> -- npm install -g <package-name>

注意事项

Deploy and local e2e

Install and register this template:

abx template install alibaba-agent-sandbox/awesome-templates//openclaw

From this directory (build, push, and register):

abx deploy

From the repository root, with agent-sandbox-server and httpx installed:

python3 scripts/run_local_e2e.py

That starts python3 commands.py in this directory and runs e2e_test.py.

文件