Interlaken
API referenceAgents and workflowsAgent sessions

Spawn an interactive Claude Code / Codex agent session (its own microVM sandbox)

POST
/api/v1/agent-sessions

Requires the agent_sessions:create permission.

Boots a disposable sandbox running the chosen CLI harness against a cloned git repo; chat with it turn-by-turn via /:id/messages. 409 code=connector_required when the harness's provider connector (or github, for repo_full_name) is missing. harness=claude_remote instead connects the sandbox's Claude Code to the caller's own Claude app over Remote Control: the session takes no turns from this API (POST /:id/messages is refused) and answers with remote_control_name, the name it appears under in that app.

Authorization

AuthorizationBearer <token>

An access token from this zone's POST /oauth/token, or a session token from POST /api/v1/auth/login. Send it as Authorization: Bearer <token>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/agent-sessions" \  -H "Content-Type: application/json" \  -d '{    "harness": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "state": "string"}