Agent Sandbox Registry

agent-sandbox

Decision: Built-in Agent as CLI Syntax Sugar

无中文版

.agents/notes/implemented/architecture/2026-09-02-agent-as-cli-wrapper.md

Decision: Built-in Agent as CLI Syntax Sugar

Status: implemented

Problem

Users want AI agent capabilities (code generation, debugging, browsing) inside sandboxes. The question is whether to embed LLM clients in the SDK or use a lighter approach.

Decision

Built-in Agent is a thin CLI wrapper — sandbox templates pre-install Codex/Qwen CLI tools, and AgentModule methods map to commands.run() calls: - sb.agent.code(task) → commands.run("codex --task {shlex.quote(task)}") - sb.agent.shell(task) → commands.run("qwen-cli shell {shlex.quote(task)}")

Zero LLM dependencies in the SDK. Users who need advanced agent orchestration use standard Python with the commands API.

API Design

class AgentModule:
    async def code(self, task: str) -> ExecutionResult: ...   # -> commands.run("codex --task <task>")
    async def shell(self, task: str) -> ExecutionResult: ...  # -> commands.run("qwen-cli shell <task>")
# No LLM SDK dependencies; task strings escaped via shlex.quote().

Alternatives considered

Dependencies

Test Strategy

Acceptance criteria

Consequences