POST /v1/sessions/{session_id}/runs
Start a Run
Start one execution inside an existing session. A Run is the unit of work — one instruction in, one result out.
Parameters
instruction*stringNatural-language instruction.
toolsstring[]Tool allowlist for this Run.
streambooleanStream the response (SSE).
max_stepsnumberMax execution steps (default 64).
Response
{
id: "run_4c81b9d2",
object: "run",
session_id: "ses_9f31a2b4",
status: "running",
instruction: "Fix the N+1 in src/api/users.ts and add a test.",
step: 0,
max_steps: 64,
created_at: 1716250502
}{
id: "run_4c81b9d2",
object: "run",
session_id: "ses_9f31a2b4",
status: "running",
instruction: "Fix the N+1 in src/api/users.ts and add a test.",
step: 0,
max_steps: 64,
created_at: 1716250502
}