Server
Start the HTTP server:| Option | Default | Description |
|---|---|---|
-t, --token <TOKEN> | - | Authentication token for all requests |
-n, --no-token | - | Disable authentication (local dev only) |
-H, --host <HOST> | 127.0.0.1 | Host to bind to |
-p, --port <PORT> | 2468 | Port to bind to |
-O, --cors-allow-origin <ORIGIN> | - | Additional CORS origin (repeatable, cumulative with Inspector) |
-M, --cors-allow-method <METHOD> | all | CORS allowed method (repeatable) |
-A, --cors-allow-header <HEADER> | all | CORS allowed header (repeatable) |
-C, --cors-allow-credentials | - | Enable CORS credentials |
--no-inspector-cors | - | Disable default Inspector CORS |
--no-telemetry | - | Disable anonymous telemetry |
Install Agent (Local)
Install an agent without running the server:| Option | Description |
|---|---|
-r, --reinstall | Force reinstall even if already installed |
Credentials
Extract
Extract locally discovered credentials:| Option | Description |
|---|---|
-a, --agent <AGENT> | Filter by agent (claude, codex, opencode, amp) |
-p, --provider <PROVIDER> | Filter by provider (anthropic, openai) |
-d, --home-dir <DIR> | Custom home directory for credential search |
-r, --reveal | Show full credential values (default: redacted) |
--no-oauth | Exclude OAuth credentials |
Extract as Environment Variables
Output credentials as shell environment variables:| Option | Description |
|---|---|
-e, --export | Prefix each line with export |
-d, --home-dir <DIR> | Custom home directory for credential search |
--no-oauth | Exclude OAuth credentials |
API Commands
Thesandbox-agent api subcommand mirrors the HTTP API for scripting without client code.
All API commands support:
| Option | Default | Description |
|---|---|---|
-e, --endpoint <URL> | http://127.0.0.1:2468 | API endpoint |
-t, --token <TOKEN> | - | Authentication token |
Agents
List Agents
Install Agent
| Option | Description |
|---|---|
-r, --reinstall | Force reinstall |
Get Agent Modes
Sessions
List Sessions
Create Session
| Option | Description |
|---|---|
-a, --agent <AGENT> | Agent identifier (required) |
-g, --agent-mode <MODE> | Agent mode |
-p, --permission-mode <MODE> | Permission mode (default, plan, bypass) |
-m, --model <MODEL> | Model override |
-v, --variant <VARIANT> | Model variant |
-A, --agent-version <VERSION> | Agent version |
Send Message
| Option | Description |
|---|---|
-m, --message <TEXT> | Message text (required) |
Send Message (Streaming)
Send a message and stream the response:| Option | Description |
|---|---|
-m, --message <TEXT> | Message text (required) |
--include-raw | Include raw agent data |
Terminate Session
Get Events
Fetch session events:| Option | Description |
|---|---|
-o, --offset <N> | Event offset |
-l, --limit <N> | Max events to return |
--include-raw | Include raw agent data |
get-messages is an alias for events.
Stream Events (SSE)
Stream session events via Server-Sent Events:| Option | Description |
|---|---|
-o, --offset <N> | Event offset to start from |
--include-raw | Include raw agent data |
Reply to Question
| Option | Description |
|---|---|
-a, --answers <JSON> | JSON array of answers (required) |
Reject Question
Reply to Permission
| Option | Description |
|---|---|
-r, --reply <REPLY> | once, always, or reject (required) |
CLI to HTTP Mapping
| CLI Command | HTTP Endpoint |
|---|---|
api agents list | GET /v1/agents |
api agents install | POST /v1/agents/{agent}/install |
api agents modes | GET /v1/agents/{agent}/modes |
api sessions list | GET /v1/sessions |
api sessions create | POST /v1/sessions/{sessionId} |
api sessions send-message | POST /v1/sessions/{sessionId}/messages |
api sessions send-message-stream | POST /v1/sessions/{sessionId}/messages/stream |
api sessions terminate | POST /v1/sessions/{sessionId}/terminate |
api sessions events | GET /v1/sessions/{sessionId}/events |
api sessions events-sse | GET /v1/sessions/{sessionId}/events/sse |
api sessions reply-question | POST /v1/sessions/{sessionId}/questions/{questionId}/reply |
api sessions reject-question | POST /v1/sessions/{sessionId}/questions/{questionId}/reject |
api sessions reply-permission | POST /v1/sessions/{sessionId}/permissions/{permissionId}/reply |