Skip to main content
Use a Gravix sandbox as a worker: your app or CI creates a runtime, runs claude -p …, then reads stdout or files under /workspace. Complete Get started first so Anthropic egress works.

Prerequisites

All examples use the platform template claude. For unattended runs, pass --dangerously-skip-permissions. That is safe only because the agent is inside the sandbox — still keep your network allowlist tight and set a timeout on every command.

Generate a small project

Creates a sandbox, asks Claude to write a tiny Go HTTP server, then lists the files it produced.
Prefer command= + args= (or CLI --) so prompts with spaces or quotes do not break the shell.

Plan, then implement (session resume)

--output-format json includes a session_id. Keep the same sandbox and pass --resume for the next turn (CLI reference).

Stream progress (stream-json)

When to use which format

Next