Contributing to Awesome Templates for Agent Sandbox
View on GitHub ↗Contributing to Awesome Templates for Agent Sandbox
The rules for a template are docs/template-spec.md
(中文). _skeleton/ is a directory that
already passes scripts/check_template.py. It is not a catalog entry.
Checklist
- Copy
_skeleton/to a kebab-case directory. The directory name,template.yamlname, and the indexpathare the same string. - Keep the Alibaba base image,
generation: 2,start_cmd,ready_cmd, pinned installs, andUSER user. Do not addCMDorENTRYPOINT. - Register named commands in
commands.pywith@command. Callstart()only underif __name__ == "__main__". - Fill
docs/design/<name>.mdfrom docs/design/_TEMPLATE.md. - Write
README.mdandREADME.zh-CN.mdwith the headings in the spec. The Verified section lists only providers that have a passing evidence file. - Add one
awesome-templates.yamlentry. Useexperimentaluntil L0, L1, and L2 have passed.officialalso needs L3 before the README says the upstream agent works. - From this repository, with
agent-sandbox-server,httpx, andpyyamlinstalled:
bash
python3 scripts/check_template.py <name>
python3 scripts/run_local_e2e.py
With Express credentials, python3 scripts/express_e2e.py <name> is L2.
Concurrent runs share /tmp/abx-acr-push.lock so only one ACR push is
active. A deploy dies when CLI output is idle for --idle-timeout seconds
(default 180), then retries. Commit evidence/express-<date>.json only
when that command exits 0. python3 scripts/image_size_report.py IMAGE
prints per-layer sizes.
Do not commit __pycache__/, .env, or secret values. Declare secret
names with empty values in template.yaml env.
Named commands
from agent_sandbox.server import command, start
@command("hello", description="Say hello.")
def hello(name: str = "World") -> str:
return f"Hello, {name}!"
if __name__ == "__main__":
import os
start(int(os.environ.get("ABX_SERVER_PORT", "9000")))
Callers use abx run <sandbox-id> hello --arg name=Ada or
await sb.run("hello", name="Ada") after from agent_sandbox import Sandbox
and await Sandbox.create(...).
A shell string is sb.commands.run("echo hi") or abx exec.
Where to file issues
| Topic | Repository |
|---|---|
| Templates, this catalog, the spec | awesome-templates |
| Python SDK or the in-sandbox server | python-sdk, title prefix [templates] |
abx CLI |
agent-sandbox, title prefix [templates] |
Naming
Agent Sandbox. CLI abx. Client package agent-sandbox-client
(agent_sandbox). pip install agent-sandbox is an unrelated project.
In-image package agent-sandbox-server
(agent_sandbox.server). GitHub alibaba-agent-sandbox/awesome-templates,
alibaba-agent-sandbox/python-sdk, and alibaba-agent-sandbox/agent-sandbox.
npm @agent-sandbox/cli.