What you need
- A sandbox with Python and Node: the
basetemplate (the default) has both, and git. A sandbox withoutpython3answers409 agent_runtime_missing. - Outbound access to npm from the sandbox. The first prompt of a harness installs it into
~/.agent/npm(@anthropic-ai/claude-codeor@openai/codex, the current release) and says so in the stream (harness.installing,harness.installed). Later turns reuse it. The template does not ship either harness. - Your own model credentials, passed with each prompt (see below). Styne does not supply a model.
Send a prompt
202: the turn runs on in the sandbox while you read its events.
A conversation runs one turn at a time: a prompt into a conversation with a running turn is
409 conversation_busy
(steer or interrupt it instead). Up to 8 turns run at once in one sandbox, in different conversations; more is
429 too_many_turns.
Pass your credentials
Theenv values travel in the request body to the sandbox’s agent launcher on its standard input. They are not written
to disk, not logged, not stored by Styne and not echoed back (the answer lists the variable names only), and every
event masks them as ***. The harness itself can still see them in its environment, as any program you run in the
sandbox can, so give an agent a key you are willing to give that sandbox. Send env again with every prompt and every
steer: Styne keeps no copy to reuse.
Follow the events
A page of events; resume fromnextCursor:
conversationId, promptId, harness and ts. conversation takes one id or a comma-separated
list; without it every conversation of the sandbox is read. A page answers {"events": [...], "nextCursor": N, "more": bool} (limit 1 to 1000, default 200). cursor is a byte position: keep the nextCursor and send it back.
With
follow=1 the stream also carries {"type":"ping","cursor":N} after 15 quiet seconds and ends with
{"type":"end","cursor":N} after 10 minutes, or earlier when the prompt named by until has finished: reconnect from
that cursor. Each event line is cut to 1 MiB (truncated: true replaces the event).
Read status and conversations
GET /sandboxes/{id}/prompts/{promptId}:statusisqueued(the launcher is starting),running,succeeded,failed,interruptedorlost(the turn’s process is gone without an end, e.g. the sandbox was stopped), withexitCodeand the times.GET /sandboxes/{id}/conversations: every conversation, most recently used first, withharness,model,promptCount,lastPrompt,running,runningPromptandcurrent(the one a prompt withoutneworconversationIdcontinues).GET /sandboxes/{id}/conversations/{conversationId}: one of them.
~/.agent), so they survive an API restart and a stop and resume of the
sandbox, and are in its snapshots. A turn running when the sandbox stops is lost.
Steer or interrupt a turn
native: false: neither harness takes a new message into a running
non-interactive turn, so the turn is stopped and a new one resumes the session; what the first turn had finished
stays. A conversation with nothing running answers 409 no_running_turn (error.details.reason: no_turn or
turn_ended); start work with a prompt instead.
An interrupt stops every running turn of the sandbox, or only conversation’s. The turn ends with
prompt.finished interrupted. An interrupt with nothing running answers 200 with an empty list.
Customise the harness
Put your rules, MCP servers and skills in the harness’s ordinary config files in the sandbox home. Only sandboxes of the same account are reachable: a sandbox of another account is a404.
The same routes exist under /boat/v1 for clients of that API.