{"openapi":"3.1.0","info":{"title":"Tracks API","version":"0.0.1","description":"Run coding agents such as Claude Code in isolated sandboxes with an API key of your organization. Create a run with a prompt, then follow its output and what it costs, or launch an experiment to compare agents on your scenarios."},"paths":{"/runs":{"post":{"tags":["Runs"],"operationId":"runs.create","parameters":[{"name":"idempotency-key","in":"header","schema":{"type":"string","minLength":1,"maxLength":255,"description":"A unique value you choose, up to 255 characters, to retry safely: a request with a key already used in your organization returns the run the first request created, without starting another, whatever its body."},"required":false}],"security":[{"bearer":[]}],"responses":{"201":{"description":"A coding agent working on your prompt in an isolated sandbox.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveRun"},{"$ref":"#/components/schemas/EndedRun"},{"$ref":"#/components/schemas/FailedRun"}],"description":"A coding agent working on your prompt in an isolated sandbox."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"402":{"description":"Your organization's balance is $0 or below: add funds to start runs again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientBalanceEncoded"}}}},"403":{"description":"Your organization cannot start runs after a dispute on one of its payments: contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationBlockedEncoded"}}}},"422":{"description":"The agent cannot use this model. The message lists the models it can use. | A `connection_id` in `environment.mcp_servers` does not exist or is not `active`. | An input file is missing, expired, or inaccessible to your organization.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ModelNotOfferedEncoded"},{"$ref":"#/components/schemas/ConnectionUnusableEncoded"},{"$ref":"#/components/schemas/FileUnavailableEncoded"}]}}}},"503":{"description":"The model provider could not be reached to check the model. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelProviderUnavailableEncoded"}}}}},"description":"Starts a coding agent on your prompt in a fresh sandbox. A one-shot run, the default, ends when the agent finishes; otherwise the run waits `idle` for follow-up prompts until you end it or it times out. Send an `Idempotency-Key` header to retry without creating a second run. The run gets the label `started_by: key:<id>`, with the id of the API key that created it, in place of any `started_by` you send. Runs start only while your organization's balance is above $0.","summary":"Create a run","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunInput"}}},"required":true}},"get":{"tags":["Runs"],"operationId":"runs.list","parameters":[{"name":"label","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"after","in":"query","schema":{"allOf":[{"$ref":"#/components/schemas/RunId"},{"description":"Return only runs listed after the run with this id."}]},"required":false},{"name":"limit","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Maximum number of items to return, from 1 to 1000. Defaults to 100."}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/ActiveRun"},{"$ref":"#/components/schemas/EndedRun"},{"$ref":"#/components/schemas/FailedRun"}],"description":"A coding agent working on your prompt in an isolated sandbox."}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}}},"description":"Returns your runs, most recently started first. To get the next page, pass the `id` of the last run received as `after`.","summary":"List runs"}},"/runs/{id}":{"get":{"tags":["Runs"],"operationId":"runs.get","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A coding agent working on your prompt in an isolated sandbox.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveRun"},{"$ref":"#/components/schemas/EndedRun"},{"$ref":"#/components/schemas/FailedRun"}],"description":"A coding agent working on your prompt in an isolated sandbox."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Returns a run and its current status.","summary":"Get a run"}},"/runs/{id}/usage":{"get":{"tags":["Runs"],"operationId":"runs.getUsage","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"What a run consumed and what it cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunUsage"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Returns what the run has consumed so far, per model and in sandbox time, and what it cost.","summary":"Get a run's usage"}},"/runs/{id}/end":{"post":{"tags":["Runs"],"operationId":"runs.end","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true}],"security":[{"bearer":[]}],"responses":{"202":{"description":"A coding agent working on your prompt in an isolated sandbox.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveRun"},{"$ref":"#/components/schemas/EndedRun"},{"$ref":"#/components/schemas/FailedRun"}],"description":"A coding agent working on your prompt in an isolated sandbox."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Ends the run with `completed` once its current prompt finishes, then destroys its sandbox. Ending a run that has ended does nothing.","summary":"End a run"}},"/runs/{id}/cancel":{"post":{"tags":["Runs"],"operationId":"runs.cancel","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true}],"security":[{"bearer":[]}],"responses":{"202":{"description":"A coding agent working on your prompt in an isolated sandbox.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveRun"},{"$ref":"#/components/schemas/EndedRun"},{"$ref":"#/components/schemas/FailedRun"}],"description":"A coding agent working on your prompt in an isolated sandbox."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Stops the agent right away, even mid-prompt, ends the run with `canceled`, then destroys its sandbox. Canceling a run that has ended does nothing.","summary":"Cancel a run"}},"/runs/{id}/prompts":{"post":{"tags":["Runs"],"operationId":"runs.sendPrompt","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true}],"security":[{"bearer":[]}],"responses":{"202":{"description":"One instruction to the agent and the work it did in response.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnfinishedPrompt"},{"$ref":"#/components/schemas/FinishedPrompt"}],"description":"One instruction to the agent and the work it did in response."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}},"409":{"description":"The run accepts no prompt now: it is one-shot, has ended, or is still working on a prompt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotIdleEncoded"}}}},"422":{"description":"The agent cannot use this model. The message lists the models it can use.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelNotOfferedEncoded"}}}},"503":{"description":"The model provider could not be reached to check the model. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelProviderUnavailableEncoded"}}}}},"description":"Asks the agent to continue where its last prompt stopped. Accepted only while the run is `idle`; the run is `working` again until the agent stops.","summary":"Send a follow-up prompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPromptInput"}}},"required":true}},"get":{"tags":["Runs"],"operationId":"runs.listPrompts","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Return only items after this position."}]},"required":false},{"name":"limit","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Maximum number of items to return, from 1 to 1000. Defaults to 100."}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/UnfinishedPrompt"},{"$ref":"#/components/schemas/FinishedPrompt"}],"description":"One instruction to the agent and the work it did in response."}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Returns the run's prompts in order. To get the next page, pass the `index` of the last prompt received as `after`.","summary":"List a run's prompts"}},"/runs/{id}/frames":{"get":{"tags":["Runs"],"operationId":"runs.listFrames","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Return only items after this position."}]},"required":false},{"name":"limit","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Maximum number of items to return, from 1 to 1000. Defaults to 100."}]},"required":false},{"name":"prompt","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Return only this prompt's output."}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Frame"}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Returns the agent's output, line by line, in order. To get the next page, pass the `seq` of the last line received as `after`.","summary":"List a run's frames"}},"/runs/{id}/events":{"get":{"tags":["Runs"],"operationId":"runs.listEvents","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Return only items after this position."}]},"required":false},{"name":"limit","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Maximum number of items to return, from 1 to 1000. Defaults to 100."}]},"required":false},{"name":"prompt","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Return only this prompt's events."}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/PromptEvent"},{"$ref":"#/components/schemas/MessageEvent"},{"$ref":"#/components/schemas/ReasoningEvent"},{"$ref":"#/components/schemas/ToolStartedEvent"},{"$ref":"#/components/schemas/ToolEndedEvent"},{"$ref":"#/components/schemas/SubagentStartedEvent"},{"$ref":"#/components/schemas/SubagentEndedEvent"},{"$ref":"#/components/schemas/PageVisitedEvent"},{"$ref":"#/components/schemas/StopEvent"}],"description":"One thing the agent did, read from its output so that runs of every harness read alike."}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Returns what the agent did, in order: each prompt, then its messages, reasoning, tool calls and subagents, then a `stop` once the agent stopped. Events read alike whatever the harness, and are read from the run's output: `frame_seqs` points at the lines each one comes from. To get the next page, pass the `seq` of the last event received as `after`.","summary":"List a run's events"}},"/runs/{id}/events/{seq}/screenshot":{"get":{"tags":["Runs"],"operationId":"runs.getScreenshot","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true},{"name":"seq","in":"path","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization. | This event has no screenshot.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunNotFoundEncoded"},{"$ref":"#/components/schemas/ScreenshotNotFoundEncoded"}]}}}}},"description":"Returns the image of a page the agent's browser showed, for a `tool_ended` or `page_visited` event that has a `screenshot`. Its content type is the image's own, usually `image/jpeg`.","summary":"Get a screenshot"}},"/runs/{id}/frames/stream":{"get":{"tags":["Runs"],"operationId":"runs.followFrames","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Send only lines whose `seq` is greater than this."}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"text/event-stream":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string","enum":["frame"]},"data":{"$ref":"#/components/schemas/FrameEncoded"}},"required":["event","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string","enum":["heartbeat"]},"data":{"type":"string","enum":[""]}},"required":["event","data"],"additionalProperties":false}]},"x-effect-stream":{"encoding":"sse","causeSchema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Fail"]},"error":{"not":{}}},"required":["_tag","error"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Die"]},"defect":{}},"required":["_tag","defect"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Interrupt"]},"fiberId":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["_tag","fiberId"],"additionalProperties":false}]}},"errorSchema":{"not":{}},"failureEvent":"effect/http-api/stream/failure"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Sends the agent's output as server-sent events as it is produced: a `frame` event per line, its data the line as JSON, and a `heartbeat` event every 30 seconds to keep the connection open. Closes once the run has ended and every line was sent. The connection may also close earlier; to pick up where it stopped, call again with the `seq` of the last line received as `after`, or let an SSE client reconnect: the `Last-Event-ID` header it sends is used when `after` is absent.","summary":"Stream a run's frames"}},"/runs/{id}/events/stream":{"get":{"tags":["Runs"],"operationId":"runs.followEvents","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/RunId"},"required":true},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?$","allOf":[{"description":"Send only events whose `seq` is greater than this."}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"text/event-stream":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string","enum":["event"]},"data":{"type":"string","contentMediaType":"application/json","contentSchema":{"anyOf":[{"$ref":"#/components/schemas/PromptEvent"},{"$ref":"#/components/schemas/MessageEvent"},{"$ref":"#/components/schemas/ReasoningEvent"},{"$ref":"#/components/schemas/ToolStartedEvent"},{"$ref":"#/components/schemas/ToolEndedEvent"},{"$ref":"#/components/schemas/SubagentStartedEvent"},{"$ref":"#/components/schemas/SubagentEndedEvent"},{"$ref":"#/components/schemas/PageVisitedEvent"},{"$ref":"#/components/schemas/StopEvent"}],"description":"One thing the agent did, read from its output so that runs of every harness read alike."}}},"required":["event","data"],"additionalProperties":false},{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string","enum":["heartbeat"]},"data":{"type":"string","enum":[""]}},"required":["event","data"],"additionalProperties":false}]},"x-effect-stream":{"encoding":"sse","causeSchema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["Fail"]},"error":{"not":{}}},"required":["_tag","error"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Die"]},"defect":{}},"required":["_tag","defect"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["Interrupt"]},"fiberId":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["_tag","fiberId"],"additionalProperties":false}]}},"errorSchema":{"not":{}},"failureEvent":"effect/http-api/stream/failure"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No run with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNotFoundEncoded"}}}}},"description":"Sends what the agent did as server-sent events as it happens: an `event` event per event, its data the event as JSON, and a `heartbeat` event every 30 seconds to keep the connection open. Closes once the run has ended and every event was sent. The connection may also close earlier; to pick up where it stopped, call again with the `seq` of the last event received as `after`, or let an SSE client reconnect: the `Last-Event-ID` header it sends is used when `after` is absent.","summary":"Stream a run's events"}},"/files":{"post":{"tags":["Files"],"operationId":"files.createUpload","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Reference returned when requesting a file upload."},"url":{"type":"string"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"upload_expires_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["id","url","method","headers","upload_expires_at","expires_at"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}}},"description":"Request with `name`, `content_type` and exact byte `size`, e.g. `{\"name\":\"photo.png\",\"content_type\":\"image/png\",\"size\":12345}`. Any type of file, up to 20 MiB each. PUT raw bytes (not JSON or base64) to the returned `url` with every returned header within 15 minutes; browsers set `content-length` from the body. Uploads are write-once; repeating the PUT returns 412. Pass the returned `id` in `input_files` when creating a run. Files in the landing zone expire after 24 hours and are deleted asynchronously. Files attached to a run are retained permanently and their references can be reused by your organization.","summary":"Request a file upload","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Filename, without directories; up to 128 ASCII letters, digits, spaces, dots, hyphens or underscores, starting with a letter or digit."},"content_type":{"type":"string","description":"MIME type, without parameters; `application/octet-stream` when unknown."},"size":{"type":"integer","minimum":1,"maximum":20971520,"description":"Exact size in bytes, from 1 to 20 MiB."}},"required":["name","content_type","size"],"additionalProperties":false}}},"required":true}}},"/connections":{"post":{"tags":["Connections"],"operationId":"connections.create","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"CreatedConnection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedConnection"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"422":{"description":"The connection cannot be started: the return URL is not allowed, or the MCP server cannot be authorized in a way we support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRefusedEncoded"}}}},"502":{"description":"The MCP server or its authorization server could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerUnreachableEncoded"}}}}},"description":"Starts connecting to an MCP server that acts as one of its users. Send the user's browser to `consent_url`. Once they consent, they get a `confirmation`: as a code shown to them, to give back to you, or, if you passed the optional `return_url`, sent to it with `connection_id`. Confirm the connection with it within 10 minutes to make it `active`, then give its `id` to runs as `connection_id`.","summary":"Create a connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionInput"}}},"required":true}},"get":{"tags":["Connections"],"operationId":"connections.list","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/WorkingConnection"},{"$ref":"#/components/schemas/FailedConnection"}],"description":"Access to an MCP server as one of its users, kept by us."}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}}},"description":"Returns every connection.","summary":"List connections"}},"/connections/{id}":{"get":{"tags":["Connections"],"operationId":"connections.get","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ConnectionId_2"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Access to an MCP server as one of its users, kept by us.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkingConnection"},{"$ref":"#/components/schemas/FailedConnection"}],"description":"Access to an MCP server as one of its users, kept by us."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No connection with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionNotFoundEncoded"}}}}},"description":"Returns a connection.","summary":"Get a connection"},"delete":{"tags":["Connections"],"operationId":"connections.delete","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ConnectionId_2"},"required":true}],"security":[{"bearer":[]}],"responses":{"204":{"description":"<No Content>"},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No connection with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionNotFoundEncoded"}}}}},"description":"Deletes a connection and the access it holds.","summary":"Delete a connection"}},"/connections/{id}/confirm":{"post":{"tags":["Connections"],"operationId":"connections.confirm","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ConnectionId_2"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Access to an MCP server as one of its users, kept by us.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkingConnection"},{"$ref":"#/components/schemas/FailedConnection"}],"description":"Access to an MCP server as one of its users, kept by us."}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No connection with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionNotFoundEncoded"}}}},"409":{"description":"The connection is not waiting for this confirmation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmationRefusedEncoded"}}}}},"description":"Makes an `unconfirmed` connection `active`. Confirm it only when the browser that came back to your return URL belongs to the user who started the connection.","summary":"Confirm a connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmConnectionInput"}}},"required":true}}},"/experiments":{"post":{"tags":["Experiments"],"operationId":"experiments.create","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"Scenarios given to several agents in several variants, each run judged on the scenario's evaluations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"422":{"description":"An input file is missing, expired, or inaccessible to your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUnavailableEncoded"}}}}},"description":"Creates an experiment from its scenarios, agents, variants and run settings. Launch it to start its runs.","summary":"Create an experiment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentInput"}}},"required":true}},"get":{"tags":["Experiments"],"operationId":"experiments.list","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Experiment"}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}}},"description":"Returns every experiment.","summary":"List experiments"}},"/experiments/{id}":{"get":{"tags":["Experiments"],"operationId":"experiments.get","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExperimentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Scenarios given to several agents in several variants, each run judged on the scenario's evaluations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No experiment with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentNotFoundEncoded"}}}}},"description":"Returns an experiment.","summary":"Get an experiment"},"put":{"tags":["Experiments"],"operationId":"experiments.update","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExperimentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Scenarios given to several agents in several variants, each run judged on the scenario's evaluations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experiment"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No experiment with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentNotFoundEncoded"}}}},"422":{"description":"An input file is missing, expired, or inaccessible to your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUnavailableEncoded"}}}}},"description":"Replaces the whole experiment: send it complete, as `GET /experiments/{id}` returns it. Executions already launched keep the experiment as it was.","summary":"Update an experiment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentInput"}}},"required":true}},"delete":{"tags":["Experiments"],"operationId":"experiments.delete","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExperimentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"204":{"description":"<No Content>"},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No experiment with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentNotFoundEncoded"}}}}},"description":"Deletes an experiment. Its executions, their runs and results stay.","summary":"Delete an experiment"}},"/experiments/{id}/executions":{"post":{"tags":["Executions"],"operationId":"executions.launch","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExperimentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"201":{"description":"One launch of an experiment: a run for every scenario, variant, agent and repetition, with the experiment as it was when launched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"402":{"description":"Your organization's balance is $0 or below: add funds to start runs again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientBalanceEncoded"}}}},"403":{"description":"Your organization cannot start runs after a dispute on one of its payments: contact us.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationBlockedEncoded"}}}},"404":{"description":"No experiment with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentNotFoundEncoded"}}}},"422":{"description":"The experiment cannot be launched as it is: `missing` says what to fix.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperimentIncompleteEncoded"}}}}},"description":"Starts an execution of the experiment as it is now: a run for every scenario, variant, agent and repetition, at most 500, started in the background. Each run is judged on its scenario's evaluations once it ends. Executions start only while your organization's balance is above $0.","summary":"Launch an experiment"},"get":{"tags":["Executions"],"operationId":"executions.list","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExperimentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Execution"}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}}},"description":"Returns the experiment's executions, the latest launched first, even after it was deleted.","summary":"List an experiment's executions"}},"/executions/{id}":{"get":{"tags":["Executions"],"operationId":"executions.get","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExecutionId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"One launch of an experiment: a run for every scenario, variant, agent and repetition, with the experiment as it was when launched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No execution with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionNotFoundEncoded"}}}}},"description":"Returns an execution, where its runs stand and its pass rate. Poll it until it is no longer `pending`.","summary":"Get an execution"}},"/executions/{id}/slots":{"get":{"tags":["Executions"],"operationId":"executions.listSlots","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExecutionId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}},"has_more":{"type":"boolean","description":"Whether more items are available after this page."}},"required":["data","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No execution with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionNotFoundEncoded"}}}}},"description":"Returns every run the execution plans, with its run once started and its verdict once judged. Read a run's work with the runs endpoints.","summary":"List an execution's slots"}},"/executions/{id}/cancel":{"post":{"tags":["Executions"],"operationId":"executions.cancel","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/ExecutionId"},"required":true}],"security":[{"bearer":[]}],"responses":{"202":{"description":"One launch of an experiment: a run for every scenario, variant, agent and repetition, with the experiment as it was when launched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}},"404":{"description":"No execution with this id exists in your organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionNotFoundEncoded"}}}}},"description":"Starts none of its runs left and cancels those started. Canceling an execution already canceled does nothing.","summary":"Cancel an execution"}},"/library":{"get":{"tags":["Library"],"operationId":"library.get","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"What your organization keeps for its experiments, added in the web app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Library"}}}},"400":{"description":"The request is invalid: a value is missing, has the wrong type or is out of range. Fix it before sending the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestEncoded"}}}},"401":{"description":"The API key is missing, malformed or revoked, or its organization is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRefusedEncoded"}}}}},"description":"Returns the repositories, skills, MCP servers and command-line tools your experiments can pick, by id.","summary":"Get the library"}},"/health":{"get":{"tags":["System"],"operationId":"health","parameters":[],"security":[],"responses":{"204":{"description":"<No Content>"}},"description":"Returns 204 when the API is up. No key required.","summary":"Check health"}},"/egress-ips":{"get":{"tags":["System"],"operationId":"egressIps","parameters":[],"security":[],"responses":{"200":{"description":"EgressIps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EgressIps"}}}}},"description":"The fixed addresses we call MCP servers and their authorization servers from. Allow them on an MCP server that only accepts known addresses. Commands the agent runs in its sandbox, such as cloning the repository, come from other addresses. No key required.","summary":"List egress IPs"}}},"components":{"schemas":{"EgressIps":{"type":"object","properties":{"ips":{"type":"array","items":{"type":"string"},"description":"IPv4 addresses, empty when the API runs locally."}},"required":["ips"],"additionalProperties":false},"InvalidRequestEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InvalidRequest"]},"message":{"type":"string","description":"Every problem found, in one sentence."},"location":{"type":"string","enum":["path","query","header","body"],"description":"The part of the request that is wrong."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/RequestIssue"},"description":"Each problem found, with where it is."}},"required":["_tag","message","location","issues"],"additionalProperties":false},"RequestIssue":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"description":"Keys leading to the wrong value inside that part of the request, such as `[\"agent\", \"model\"]`. Empty when the problem concerns that part as a whole."},"message":{"type":"string","description":"What is wrong with the value."}},"required":["path","message"],"additionalProperties":false,"description":"One problem found in the request."},"ApiKeyRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ApiKeyRefused"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"Library":{"type":"object","properties":{"repositories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id to pick it in an experiment."},"name":{"type":"string"},"url":{"type":"string","description":"URL of the Git repository."},"ref":{"type":"string","description":"Branch, tag or commit checked out."}},"required":["id","name","url","ref"],"additionalProperties":false}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id to pick it in an experiment."},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name","description"],"additionalProperties":false}},"mcp_servers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id to pick it in an experiment."},"name":{"type":"string","description":"Name the agent knows the MCP server by."},"url":{"type":"string"},"connected":{"type":"boolean","description":"Whether runs can use it: always for one without an account, otherwise once connected in the web app."}},"required":["id","name","url","connected"],"additionalProperties":false}},"command_line_tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id to pick it in an experiment."},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["repositories","skills","mcp_servers","command_line_tools"],"additionalProperties":false,"description":"What your organization keeps for its experiments, added in the web app."},"ExecutionNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ExecutionNotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"Execution":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ExecutionId"},"experiment_id":{"$ref":"#/components/schemas/ExperimentId"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Its place among the experiment's executions, from 1."},"launched_at":{"type":"string"},"canceled_at":{"type":"string"},"pending":{"type":"boolean","description":"Whether some of its runs have not ended yet or wait for their evaluation results. Its pass rate is final once it is `false`, canceled or not."},"slots":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Runs the execution plans."},"running":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Runs not started yet or not ended."},"judging":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Ended runs waiting for their evaluation results."},"judged":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Runs with a verdict."},"passed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Runs that passed their scenario."}},"required":["total","running","judging","judged","passed"],"additionalProperties":false,"description":"How many of its slots, one per scenario, variant, agent and repetition, stand where."},"pass_rate":{"type":"integer","minimum":0,"maximum":100,"description":"Runs that passed out of those with a verdict, as a whole percent. Absent until one run has a verdict."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["id","experiment_id","number","launched_at","pending","slots","cost_usd"],"additionalProperties":false,"description":"One launch of an experiment: a run for every scenario, variant, agent and repetition, with the experiment as it was when launched."},"ExperimentId":{"type":"string","description":"Unique identifier of the experiment."},"ExecutionId":{"type":"string","description":"Unique identifier of the execution."},"Slot":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the slot."},"scenario_id":{"type":"string"},"repository_id":{"type":"string","description":"Absent when the run has no repository."},"agent_tools_id":{"type":"string"},"agent":{"$ref":"#/components/schemas/ExperimentAgent"},"repetition":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Which of the identical runs it is, from 1."},"run_id":{"$ref":"#/components/schemas/RunId_1"},"outcome":{"type":"string","enum":["running","judging","judged","not_evaluated"],"description":"`running` while its run waits to start or has not ended, `judging` while it waits for evaluation results, `judged` once they are all in, or `not_evaluated` when it never will be."},"verdict":{"type":"string","enum":["passed","failed"],"description":"Whether the run passed its scenario, once judged."},"score":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"not_evaluated_reason":{"type":"string","enum":["never_started","no_evaluations","run_not_completed","agent_failed","evidence_too_long","too_many_attempts"],"description":"Why the run has no verdict: it never started, its scenario has no evaluations, it did not end `completed`, its agent stopped with an error such as its model provider being unreachable, what it did was too long to judge, or judging failed too many times."},"refusal":{"type":"string","description":"Why its run could not start."},"evaluation_results":{"type":"array","items":{"type":"object","properties":{"evaluation_id":{"type":"string"},"passed":{"type":"boolean"}},"required":["evaluation_id","passed"],"additionalProperties":false},"description":"Each evaluation judged so far, and whether the run passed it."}},"required":["id","scenario_id","agent_tools_id","agent","repetition","outcome","evaluation_results"],"additionalProperties":false,"description":"One run an execution plans, for one scenario, variant, agent and repetition, and how it was judged."},"RunId_1":{"type":"string","description":"The run, once started."},"ExperimentAgent":{"type":"object","properties":{"harness":{"$ref":"#/components/schemas/Harness"},"model":{"type":"string","description":"Model the agent uses, such as `claude-sonnet-5-5`."}},"required":["harness","model"],"additionalProperties":false,"description":"A coding agent and the model it uses."},"Harness":{"type":"string","enum":["claude-code","claude-desktop","codex","codex-app","cursor"],"description":"The coding agent to run: `claude-code` (Claude Code), `claude-desktop` (Cowork, the agent workspace of Anthropic's Claude desktop app, for documents, research and longer tasks), `codex` (OpenAI's Codex CLI), `codex-app` (the Codex mode of OpenAI's ChatGPT desktop app, with its browser, computer-use and document tools) or `cursor` (Cursor's CLI)."},"OrganizationBlockedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrganizationBlocked"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"InsufficientBalanceEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InsufficientBalance"]},"message":{"type":"string"},"top_up_url":{"type":"string","description":"Where to add funds to your organization's balance."}},"required":["_tag","message","top_up_url"],"additionalProperties":false},"ExperimentIncompleteEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ExperimentIncomplete"]},"message":{"type":"string"},"missing":{"type":"array","items":{"type":"string"},"description":"Each thing to fix before launching, in a sentence."}},"required":["_tag","message","missing"],"additionalProperties":false},"ExperimentNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ExperimentNotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"FileUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["FileUnavailable"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"Experiment":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ExperimentId"},"name":{"type":"string","description":"Name of the experiment."},"scenarios":{"type":"array","items":{"$ref":"#/components/schemas/Scenario"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentAgent"},"description":"Agents every scenario is given to, each once."},"repositories":{"type":"array","items":{"type":"string"},"description":"Ids of repositories from your library, as listed by `GET /library`, each once, tried in turn with every agent tool configuration. Defaults to none: runs start without a repository."},"agent_tools":{"type":"array","items":{"$ref":"#/components/schemas/AgentTools"}},"excluded_variants":{"type":"array","items":{"$ref":"#/components/schemas/ExcludedVariant_1"},"description":"Combinations of repository and agent tools not to run. Every other combination is a variant, run for each scenario and agent. Defaults to none."},"run_settings":{"$ref":"#/components/schemas/RunSettings"}},"required":["id","name","scenarios","agents","repositories","agent_tools","excluded_variants","run_settings"],"additionalProperties":false,"description":"Scenarios given to several agents in several variants, each run judged on the scenario's evaluations."},"RunSettings":{"type":"object","properties":{"repetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Identical runs started for each scenario, variant and agent, to compare results beyond chance."},"time_limit_seconds":{"type":"number","exclusiveMinimum":0,"maximum":43200,"description":"Longest each run may last, in seconds, above 0 and at most 43200."},"budget_usd":{"type":"number","exclusiveMinimum":0,"maximum":10000,"description":"Most each run may spend, in US dollars, above 0 and at most 10000."},"setup":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run in each run's sandbox after checkout and before the prompt. At most 32768 characters."},"teardown":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run in each run's sandbox after the run ends. At most 32768 characters."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},"description":"Environment variables set in every process of each run's agent, each name once. Defaults to none."}},"required":["repetitions","time_limit_seconds","budget_usd","variables"],"additionalProperties":false,"description":"What every run of the experiment shares."},"ExcludedVariant_1":{"type":"object","properties":{"repository_id":{"type":"string","description":"Id of one of the experiment's repositories. Omit it for no repository."},"agent_tools_id":{"type":"string","description":"Id of one of the experiment's agent tool configurations."}},"required":["agent_tools_id"],"additionalProperties":false,"description":"A combination of repository and agent tools not to run."},"AgentTools":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Identifier you choose for the agent tool configuration, unique in the experiment, up to 128 characters, such as `with-docs-mcp`. Results refer to it."},"name":{"type":"string","description":"Short name of the agent tools, such as `No agent tools` for the baseline."},"skills":{"type":"array","items":{"type":"string"},"description":"Ids of skills from your library, as listed by `GET /library`."},"mcp_servers":{"type":"array","items":{"type":"string"},"description":"Ids of MCP servers from your library, as listed by `GET /library`."},"command_line_tools":{"type":"array","items":{"type":"string"},"description":"Ids of command-line tools from your library, as listed by `GET /library`."},"browser":{"type":"boolean"}},"required":["id","name","skills","mcp_servers","command_line_tools"],"additionalProperties":false,"description":"Skills, MCP servers, command-line tools and a browser given to the agent. Keep one with none as the baseline the others are compared to."},"Scenario":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Identifier you choose for the scenario, unique in the experiment, up to 128 characters, such as `checkout`. Results refer to it."},"name":{"type":"string","description":"Short name of the scenario."},"prompt":{"type":"string","description":"What the agent is asked to do."},"input_files":{"type":"array","items":{"type":"string","description":"Reference returned when requesting a file upload."},"maxItems":20,"description":"Up to 20 uploaded file ids, given to each of the scenario's runs. Kept for good once saved. Defaults to none."},"evaluations":{"type":"array","items":{"$ref":"#/components/schemas/Evaluation"}},"passing_score":{"type":"integer","minimum":0,"maximum":100,"description":"Score out of 100, weighted by the evaluations' weights, a run needs to pass. Omit it so a run passes only when it passes every evaluation."}},"required":["id","name","prompt","input_files","evaluations"],"additionalProperties":false,"description":"One task given to the agents."},"Evaluation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Identifier you choose for the evaluation, unique in its scenario, up to 128 characters, such as `tests-pass`. Results refer to it."},"name":{"type":"string","description":"Short name of what is checked."},"judging_instructions":{"type":"string","description":"The yes-or-no question a judge answers from what the agent did, such as `Do the tests pass?`."},"weight":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"How much it counts in the run's score. Defaults to 1."}},"required":["id","name","judging_instructions","weight"],"additionalProperties":false,"description":"One criterion every run of the scenario is judged on."},"ExperimentInput":{"type":"object","properties":{"name":{"type":"string","description":"Name of the experiment."},"scenarios":{"type":"array","items":{"$ref":"#/components/schemas/ScenarioInput"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/ExperimentAgent"},"description":"Agents every scenario is given to, each once."},"repositories":{"type":"array","items":{"type":"string"},"description":"Ids of repositories from your library, as listed by `GET /library`, each once, tried in turn with every agent tool configuration. Defaults to none: runs start without a repository.","uniqueItems":true},"agent_tools":{"type":"array","items":{"$ref":"#/components/schemas/AgentTools"}},"excluded_variants":{"type":"array","items":{"$ref":"#/components/schemas/ExcludedVariant"},"description":"Combinations of repository and agent tools not to run. Every other combination is a variant, run for each scenario and agent. Defaults to none."},"run_settings":{"$ref":"#/components/schemas/RunSettingsInput"}},"required":["name","scenarios","agents","agent_tools","run_settings"],"additionalProperties":false},"RunSettingsInput":{"type":"object","properties":{"repetitions":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Identical runs started for each scenario, variant and agent, to compare results beyond chance."},"time_limit_seconds":{"type":"number","exclusiveMinimum":0,"maximum":43200,"description":"Longest each run may last, in seconds, above 0 and at most 43200."},"budget_usd":{"type":"number","exclusiveMinimum":0,"maximum":10000,"description":"Most each run may spend, in US dollars, above 0 and at most 10000."},"setup":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run in each run's sandbox after checkout and before the prompt. At most 32768 characters."},"teardown":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run in each run's sandbox after the run ends. At most 32768 characters."},"variables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"],"additionalProperties":false},"description":"Environment variables set in every process of each run's agent, each name once. Defaults to none."}},"required":["repetitions","time_limit_seconds","budget_usd"],"additionalProperties":false},"ExcludedVariant":{"type":"object","properties":{"repository_id":{"type":"string","description":"Id of one of the experiment's repositories. Omit it for no repository."},"agent_tools_id":{"type":"string","description":"Id of one of the experiment's agent tool configurations."}},"required":["agent_tools_id"],"additionalProperties":false,"description":"A combination of repository and agent tools not to run."},"ScenarioInput":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Identifier you choose for the scenario, unique in the experiment, up to 128 characters, such as `checkout`. Results refer to it."},"name":{"type":"string","description":"Short name of the scenario."},"prompt":{"type":"string","description":"What the agent is asked to do."},"input_files":{"type":"array","items":{"type":"string","description":"Reference returned when requesting a file upload."},"maxItems":20,"description":"Up to 20 uploaded file ids, given to each of the scenario's runs. Kept for good once saved. Defaults to none."},"evaluations":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationInput"}},"passing_score":{"type":"integer","minimum":0,"maximum":100,"description":"Score out of 100, weighted by the evaluations' weights, a run needs to pass. Omit it so a run passes only when it passes every evaluation."}},"required":["id","name","prompt","evaluations"],"additionalProperties":false},"EvaluationInput":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Identifier you choose for the evaluation, unique in its scenario, up to 128 characters, such as `tests-pass`. Results refer to it."},"name":{"type":"string","description":"Short name of what is checked."},"judging_instructions":{"type":"string","description":"The yes-or-no question a judge answers from what the agent did, such as `Do the tests pass?`."},"weight":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"How much it counts in the run's score. Defaults to 1."}},"required":["id","name","judging_instructions"],"additionalProperties":false},"ConnectionNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConnectionNotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ConnectionId_2":{"type":"string","description":"Unique identifier of the connection."},"ConfirmationRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConfirmationRefused"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"FailedConnection":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ConnectionId_2"},"server_url":{"type":"string","description":"URL of the MCP server."},"created_at":{"type":"string"},"status":{"type":"string","enum":["failed"]},"failure":{"type":"string","description":"Why the consent did not complete."}},"required":["id","server_url","created_at","status","failure"],"additionalProperties":false,"description":"A connection whose consent did not complete."},"WorkingConnection":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ConnectionId_2"},"server_url":{"type":"string","description":"URL of the MCP server."},"created_at":{"type":"string"},"status":{"type":"string","enum":["authorizing","unconfirmed","active"],"description":"`authorizing` until the user consents on the MCP server, `unconfirmed` until you confirm it, `active` once it can be used."}},"required":["id","server_url","created_at","status"],"additionalProperties":false,"description":"A connection that has not failed."},"ConfirmConnectionInput":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"description":"The `confirmation` your return URL received, or the code the user gave you, proving the consent came back to you. Valid for 10 minutes after the consent."}},"required":["confirmation"],"additionalProperties":false},"ServerUnreachableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ServerUnreachable"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ConnectionRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConnectionRefused"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"CreatedConnection":{"type":"object","properties":{"connection":{"anyOf":[{"$ref":"#/components/schemas/WorkingConnection"},{"$ref":"#/components/schemas/FailedConnection"}],"description":"Access to an MCP server as one of its users, kept by us."},"consent_url":{"type":"string","description":"Send the user's browser there to consent on the MCP server. Valid for 10 minutes, once. The browser then comes back to your `return_url`, or shows the confirmation code without one."}},"required":["connection","consent_url"],"additionalProperties":false},"CreateConnectionInput":{"type":"object","properties":{"server_url":{"type":"string"},"return_url":{"type":"string"}},"required":["server_url"],"additionalProperties":false},"RunNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RunNotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"StopEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["stop"]},"stop_reason":{"type":"string","enum":["completed","failed","canceled"],"description":"Why the agent stopped. When `failed`, `error` may explain what went wrong."},"error":{"type":"string","description":"What went wrong."}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","stop_reason"],"additionalProperties":false,"description":"The agent stopped working on the prompt; the last event of its prompt. It ends everything still open in the prompt: any tool call or subagent without its own end event ended with it."},"RunId":{"type":"string","description":"Unique identifier of the run."},"PageVisitedEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["page_visited"]},"tool_call_id":{"type":"string","description":"The browser tool call that led to the page, when the agent had made one."},"page_id":{"type":"string","description":"Identifier of the page in the run: a later visit to the same page keeps it."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many times the page was seen changed, this one included, starting at 1."},"url":{"type":"string","description":"URL of the page."},"title":{"type":"string","description":"Title of the page, empty when it has none."},"reason":{"type":"string","enum":["arrival","settled","after_submit","error","after_action","prompt_end"],"description":"Why it was captured: on arrival, once settled, after a form was submitted, on an error, after a browser action, or when the prompt ended."},"screenshot":{"$ref":"#/components/schemas/Screenshot_1"}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","page_id","version","url","title","reason"],"additionalProperties":false,"description":"The agent's browser showed a page, new or changed."},"Screenshot_1":{"type":"object","properties":{"page_url":{"type":"string","description":"Address of the page shown."}},"required":["page_url"],"additionalProperties":false,"description":"The page as the browser captured it. Absent when it captured none; its image may be missing when the sandbox was gone before it was kept."},"SubagentEndedEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["subagent_ended"]},"outcome":{"$ref":"#/components/schemas/Outcome"}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","outcome"],"additionalProperties":false,"description":"A subagent ended."},"Outcome":{"type":"string","enum":["succeeded","failed"],"description":"Whether the tool call or subagent succeeded."},"SubagentStartedEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["subagent_started"]},"description":{"type":"string","description":"What the agent asked the subagent to do, in short."}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type"],"additionalProperties":false,"description":"A subagent started; its `subagent_id` is the `tool_call_id` of the `tool_started` event that launched it. That tool call may end before the subagent does: the subagent is done at its `subagent_ended`."},"ToolEndedEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["tool_ended"]},"tool_call_id":{"type":"string","description":"Identifier of the tool call, unique in its run."},"outcome":{"$ref":"#/components/schemas/Outcome"},"output":{"type":"string","description":"What the tool returned, possibly truncated."},"structured":{"description":"The structured content an MCP tool returned beside its text, unchanged. Absent when the tool returned none or it was too large."},"screenshot":{"$ref":"#/components/schemas/Screenshot"}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","tool_call_id","outcome","output"],"additionalProperties":false,"description":"A tool call ended; its `tool_call_id` is the one of the `tool_started` event."},"Screenshot":{"type":"object","properties":{"page_url":{"type":"string","description":"Address of the page shown."}},"required":["page_url"],"additionalProperties":false,"description":"The page a browser tool call left its browser on, as the harness captured it. Absent when it captured none."},"ToolStartedEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["tool_started"]},"tool_call_id":{"type":"string","description":"Identifier of the tool call, unique in its run."},"tool_name":{"type":"string","description":"Name of the tool, as the harness calls it."},"input":{"description":"What the agent passed to the tool."}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","tool_call_id","tool_name","input"],"additionalProperties":false,"description":"The agent called a tool."},"ReasoningEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string","description":"The reasoning, or a summary of it. Absent when the harness hides it."}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type"],"additionalProperties":false,"description":"The agent reasoning before it acts."},"MessageEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["message"]},"text":{"type":"string","description":"What the agent wrote."}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","text"],"additionalProperties":false,"description":"Text the agent wrote, apart from reasoning and tool calls."},"PromptEvent":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the event in the run, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the event belongs to."},"captured_at":{"type":"string"},"subagent_id":{"type":"string","description":"The subagent that did it: the `tool_call_id` of the `tool_started` event that launched it. Absent when the run's agent did it."},"frame_seqs":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"The `seq` of each output line the event was read from. Empty for events we record ourselves."},"type":{"type":"string","enum":["prompt"]},"text":{"type":"string","description":"What you asked the agent to do."}},"required":["run_id","seq","prompt","captured_at","frame_seqs","type","text"],"additionalProperties":false,"description":"A prompt given to the agent; the first event of its prompt."},"FrameEncoded":{"type":"string","contentMediaType":"application/json","contentSchema":{"$ref":"#/components/schemas/Frame"}},"Frame":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position of the line in the run's output, starting at 1. Always increasing, but some numbers may be skipped."},"prompt":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Index of the prompt the agent was working on."},"process":{"type":"string","description":"Program in the sandbox that printed the line: `prompt-1`, `prompt-2`… for the agent working on each prompt, `browser` for its browser."},"captured_at":{"type":"string"},"channel":{"type":"string","enum":["stdout","stderr"],"description":"Output stream the line came from."},"body":{"type":"string","description":"The line, exactly as the agent printed it."}},"required":["run_id","seq","prompt","process","captured_at","channel","body"],"additionalProperties":false,"description":"One line of output from the agent or its browser."},"ScreenshotNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ScreenshotNotFound"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"FinishedPrompt":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"index":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Position of the prompt in its run, starting at 1."},"text":{"type":"string","description":"What you asked the agent to do."},"model":{"type":"string","description":"Model for this prompt, when not the run's."},"submitted_at":{"type":"string"},"status":{"type":"string","enum":["finished"],"description":"The agent stopped, whatever its exit code."},"finished_at":{"type":"string"},"exit_code":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Exit code of the agent."}},"required":["run_id","index","text","submitted_at","status","finished_at","exit_code"],"additionalProperties":false,"description":"A prompt the agent has finished."},"UnfinishedPrompt":{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/RunId"},"index":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Position of the prompt in its run, starting at 1."},"text":{"type":"string","description":"What you asked the agent to do."},"model":{"type":"string","description":"Model for this prompt, when not the run's."},"submitted_at":{"type":"string"},"status":{"type":"string","enum":["working","failed","canceled"],"description":"`working` while the agent works on it. `failed` or `canceled` when the run ended before the prompt finished."}},"required":["run_id","index","text","submitted_at","status"],"additionalProperties":false,"description":"A prompt the agent has not finished."},"ModelProviderUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ModelProviderUnavailable"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"ModelNotOfferedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ModelNotOffered"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"RunNotIdleEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RunNotIdle"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SendPromptInput":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"What you ask the agent to do next."},"model":{"type":"string","minLength":1,"description":"Model for this prompt only. Defaults to the run's model."}},"required":["text"],"additionalProperties":false},"FailedRun":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RunId"},"input_files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Reference returned when requesting a file upload."},"name":{"type":"string","description":"Filename, without directories; up to 128 ASCII letters, digits, spaces, dots, hyphens or underscores, starting with a letter or digit."},"content_type":{"type":"string","description":"MIME type, without parameters; `application/octet-stream` when unknown."},"size":{"type":"integer","minimum":1,"maximum":20971520,"description":"Exact size in bytes, from 1 to 20 MiB."},"path":{"type":"string","description":"Absolute path in the agent's sandbox."},"download_url":{"type":"string","description":"Signed download URL, valid for 15 minutes."},"download_expires_at":{"type":"string"}},"required":["id","name","content_type","size","path","download_url","download_expires_at"],"additionalProperties":false}},"labels":{"type":"object","additionalProperties":{"type":"string","maxLength":256},"description":"Labels you attach to the run to find it again, as keys and values, such as `{ \"ticket\": \"ENG-42\" }`. We never read them. Keys match `^[A-Za-z0-9_.-]{1,64}$`; at most 20 labels with values of up to 256 characters.","maxProperties":20},"agent":{"$ref":"#/components/schemas/Agent"},"environment":{"$ref":"#/components/schemas/Environment"},"budget_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"one_shot":{"type":"boolean","description":"Whether the run ends as soon as its first prompt finishes."},"idle_timeout_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the run waits for a follow-up prompt before it ends, in seconds. Absent for a one-shot run."},"time_limit_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Longest the run may last, in seconds from when it starts."},"started_at":{"type":"string"},"last_prompt":{"anyOf":[{"$ref":"#/components/schemas/UnfinishedPrompt"},{"$ref":"#/components/schemas/FinishedPrompt"}],"description":"One instruction to the agent and the work it did in response."},"status":{"type":"string","enum":["ended"]},"ended_at":{"type":"string"},"end_reason":{"type":"string","enum":["failed"]},"failure":{"type":"string","description":"What went wrong."},"failure_kind":{"$ref":"#/components/schemas/FailureKind"}},"required":["id","input_files","labels","agent","environment","budget_usd","one_shot","time_limit_seconds","started_at","last_prompt","status","ended_at","end_reason","failure","failure_kind"],"additionalProperties":false,"description":"A run that ended because something went wrong."},"FailureKind":{"type":"string","enum":["repository_checkout_failed","setup_failed","browser_not_started","sandbox_not_found","process_lost","sandbox_unavailable","agent_stopped","unexpected"],"description":"What kind of thing went wrong: the repository could not be checked out, the environment's setup command failed, the browser did not start, the sandbox disappeared, the agent's process was lost, the sandbox provider failed, the agent of a run that accepts no follow-ups stopped with an error, or something unexpected."},"Environment":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"description":"URL of a Git repository to clone before the agent starts."},"variables":{"type":"array","items":{"type":"string"},"description":"Names of the environment variables set in every process of the agent. Their values are never returned."},"setup":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run with bash in the repository directory after checkout and before the first prompt, with the run's variables set, while the run is `preparing`. A non-zero exit fails the run. It may run again after a restart on our side: make it idempotent. At most 32768 characters."},"teardown":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run with bash in the repository directory after the run ends and before its sandbox is destroyed, with the run's variables set. Its exit code doesn't change how the run ended. It may run again after a restart on our side: make it idempotent. At most 32768 characters."},"skills":{"type":"array","items":{"$ref":"#/components/schemas/Skill"}},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/McpServer"}},"browser":{"type":"boolean","description":"Whether the agent was given a headless Chromium in its sandbox."}},"required":["variables","skills","mcp_servers","browser"],"additionalProperties":false,"description":"What the agent works on."},"McpServer":{"type":"object","properties":{"name":{"type":"string","description":"Name the agent knows the MCP server by."},"url":{"type":"string","description":"URL of the MCP server."},"connection_id":{"$ref":"#/components/schemas/ConnectionId_1"},"headers":{"type":"array","items":{"type":"string"},"description":"Names of the headers we add to every request to the MCP server. Their values are never returned."}},"required":["name","url","headers"],"additionalProperties":false,"description":"An MCP server the agent can use."},"ConnectionId_1":{"type":"string","description":"The connection the agent uses it through, if any."},"Skill":{"type":"object","properties":{"name":{"type":"string","description":"Name of the skill."},"files":{"type":"array","items":{"type":"string"},"description":"Paths of the files in the skill's folder."}},"required":["name","files"],"additionalProperties":false,"description":"A skill the agent can load."},"Agent":{"type":"object","properties":{"harness":{"$ref":"#/components/schemas/Harness"},"model":{"type":"string","minLength":1,"description":"Model the agent uses, such as `claude-sonnet-5-5`, or a Cursor model id such as `gpt-5.6-luna-low`."}},"required":["harness","model"],"additionalProperties":false,"description":"The coding agent and the model it uses."},"EndedRun":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RunId"},"input_files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Reference returned when requesting a file upload."},"name":{"type":"string","description":"Filename, without directories; up to 128 ASCII letters, digits, spaces, dots, hyphens or underscores, starting with a letter or digit."},"content_type":{"type":"string","description":"MIME type, without parameters; `application/octet-stream` when unknown."},"size":{"type":"integer","minimum":1,"maximum":20971520,"description":"Exact size in bytes, from 1 to 20 MiB."},"path":{"type":"string","description":"Absolute path in the agent's sandbox."},"download_url":{"type":"string","description":"Signed download URL, valid for 15 minutes."},"download_expires_at":{"type":"string"}},"required":["id","name","content_type","size","path","download_url","download_expires_at"],"additionalProperties":false}},"labels":{"type":"object","additionalProperties":{"type":"string","maxLength":256},"description":"Labels you attach to the run to find it again, as keys and values, such as `{ \"ticket\": \"ENG-42\" }`. We never read them. Keys match `^[A-Za-z0-9_.-]{1,64}$`; at most 20 labels with values of up to 256 characters.","maxProperties":20},"agent":{"$ref":"#/components/schemas/Agent"},"environment":{"$ref":"#/components/schemas/Environment"},"budget_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"one_shot":{"type":"boolean","description":"Whether the run ends as soon as its first prompt finishes."},"idle_timeout_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the run waits for a follow-up prompt before it ends, in seconds. Absent for a one-shot run."},"time_limit_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Longest the run may last, in seconds from when it starts."},"started_at":{"type":"string"},"last_prompt":{"anyOf":[{"$ref":"#/components/schemas/UnfinishedPrompt"},{"$ref":"#/components/schemas/FinishedPrompt"}],"description":"One instruction to the agent and the work it did in response."},"status":{"type":"string","enum":["ended"]},"ended_at":{"type":"string"},"end_reason":{"type":"string","enum":["completed","idle_timeout","time_limit","budget_exceeded","canceled"]}},"required":["id","input_files","labels","agent","environment","budget_usd","one_shot","time_limit_seconds","started_at","last_prompt","status","ended_at","end_reason"],"additionalProperties":false,"description":"A run that ended without failing."},"ActiveRun":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RunId"},"input_files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Reference returned when requesting a file upload."},"name":{"type":"string","description":"Filename, without directories; up to 128 ASCII letters, digits, spaces, dots, hyphens or underscores, starting with a letter or digit."},"content_type":{"type":"string","description":"MIME type, without parameters; `application/octet-stream` when unknown."},"size":{"type":"integer","minimum":1,"maximum":20971520,"description":"Exact size in bytes, from 1 to 20 MiB."},"path":{"type":"string","description":"Absolute path in the agent's sandbox."},"download_url":{"type":"string","description":"Signed download URL, valid for 15 minutes."},"download_expires_at":{"type":"string"}},"required":["id","name","content_type","size","path","download_url","download_expires_at"],"additionalProperties":false}},"labels":{"type":"object","additionalProperties":{"type":"string","maxLength":256},"description":"Labels you attach to the run to find it again, as keys and values, such as `{ \"ticket\": \"ENG-42\" }`. We never read them. Keys match `^[A-Za-z0-9_.-]{1,64}$`; at most 20 labels with values of up to 256 characters.","maxProperties":20},"agent":{"$ref":"#/components/schemas/Agent"},"environment":{"$ref":"#/components/schemas/Environment"},"budget_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"one_shot":{"type":"boolean","description":"Whether the run ends as soon as its first prompt finishes."},"idle_timeout_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the run waits for a follow-up prompt before it ends, in seconds. Absent for a one-shot run."},"time_limit_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Longest the run may last, in seconds from when it starts."},"started_at":{"type":"string"},"last_prompt":{"anyOf":[{"$ref":"#/components/schemas/UnfinishedPrompt"},{"$ref":"#/components/schemas/FinishedPrompt"}],"description":"One instruction to the agent and the work it did in response."},"status":{"type":"string","enum":["preparing","working","idle"],"description":"`preparing` while its sandbox gets ready, `working` while the agent works on a prompt, `idle` while it waits for a follow-up prompt."}},"required":["id","input_files","labels","agent","environment","budget_usd","one_shot","time_limit_seconds","started_at","last_prompt","status"],"additionalProperties":false,"description":"A run that has not ended."},"RunUsage":{"type":"object","properties":{"cost_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"models":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"Company serving the model, such as `anthropic`."},"model":{"type":"string"},"quantities":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"description":"Units consumed, keyed by unit as the provider counts them, such as input tokens or web searches."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["provider","model","quantities","cost_usd"],"additionalProperties":false},"description":"Model usage, one entry per model."},"sandbox":{"type":"object","properties":{"seconds":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"cost_usd":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["seconds","cost_usd"],"additionalProperties":false}},"required":["cost_usd","models","sandbox"],"additionalProperties":false,"description":"What a run consumed and what it cost."},"ConnectionUnusableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConnectionUnusable"]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"CreateRunInput":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/Agent"},"prompt":{"type":"string","minLength":1,"description":"What you ask the agent to do first."},"input_files":{"type":"array","items":{"type":"string","description":"Reference returned when requesting a file upload."},"maxItems":20,"description":"Up to 20 uploaded file ids, staged in the sandbox before setup and referenced in the first prompt."},"environment":{"$ref":"#/components/schemas/EnvironmentInput"},"labels":{"type":"object","additionalProperties":{"type":"string","maxLength":256},"description":"Labels you attach to the run to find it again, as keys and values, such as `{ \"ticket\": \"ENG-42\" }`. We never read them. Keys match `^[A-Za-z0-9_.-]{1,64}$`; at most 20 labels with values of up to 256 characters.","maxProperties":20},"budget_usd":{"type":"number","minimum":0.01,"maximum":10000,"description":"Maximum the run may spend, in US dollars. Defaults to a standard budget when omitted. The run ends with `budget_exceeded` once it is reached."},"one_shot":{"type":"boolean","description":"Whether the run ends as soon as its first prompt finishes. Defaults to `true`. Set it to `false` to send follow-up prompts while the run is `idle`."},"idle_timeout_seconds":{"type":"integer","minimum":120,"maximum":900,"description":"How long the run waits for a follow-up prompt before it ends with `idle_timeout`, in seconds, from 120 to 900. Defaults to 900. Only allowed when `one_shot` is `false`."},"time_limit_seconds":{"type":"integer","minimum":60,"maximum":43200,"description":"Longest the run may last, in seconds from when it starts, from 60 to 43200. Defaults to 7200. Once reached, the run ends with `time_limit`, even in the middle of a prompt."}},"required":["agent","prompt","environment"],"additionalProperties":false},"EnvironmentInput":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"description":"URL of a Git repository to clone before the agent starts."},"variables":{"type":"object","additionalProperties":{"type":"string","maxLength":32768},"description":"Environment variables set in every process of the agent, by name. Their values are never returned. Names match `^[A-Za-z_][A-Za-z0-9_]*$`; at most 100 variables of up to 32768 characters each. `PATH`, `HOME` and names starting with `ANTHROPIC_`, `CLAUDE_`, `OPENAI_`, `CODEX_` or `AGENT_RUNNER_` are reserved for running the agent.","maxProperties":100},"setup":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run with bash in the repository directory after checkout and before the first prompt, with the run's variables set, while the run is `preparing`. A non-zero exit fails the run. It may run again after a restart on our side: make it idempotent. At most 32768 characters."},"teardown":{"type":"string","minLength":1,"maxLength":32768,"description":"Shell script run with bash in the repository directory after the run ends and before its sandbox is destroyed, with the run's variables set. Its exit code doesn't change how the run ended. It may run again after a restart on our side: make it idempotent. At most 32768 characters."},"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillInput"},"maxItems":20},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/McpServerInput"},"maxItems":20},"browser":{"type":"boolean"}},"additionalProperties":false},"McpServerInput":{"anyOf":[{"$ref":"#/components/schemas/McpServerByUrlInput"},{"$ref":"#/components/schemas/McpServerByConnectionInput"}],"description":"An MCP server the agent can use, reached through us: credentials never enter the sandbox. Set `url`, with `headers` if it takes an API key, or `connection_id`."},"McpServerByConnectionInput":{"type":"object","properties":{"name":{"type":"string","description":"Name the agent knows the MCP server by, unique in the run, matching `^[A-Za-z0-9_-]{1,64}$`, such as `linear`. `chatgpt_plugins` is reserved for running the agent."},"connection_id":{"$ref":"#/components/schemas/ConnectionId"},"url":{"not":{}},"headers":{"not":{}}},"required":["name","connection_id"],"additionalProperties":false,"description":"An MCP server given by a connection to it, called as the user who consented."},"ConnectionId":{"type":"string","description":"An `active` connection: the agent uses its MCP server as the user who consented."},"McpServerByUrlInput":{"type":"object","properties":{"name":{"type":"string","description":"Name the agent knows the MCP server by, unique in the run, matching `^[A-Za-z0-9_-]{1,64}$`, such as `linear`. `chatgpt_plugins` is reserved for running the agent."},"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string","maxLength":8192},"description":"Headers we add to every request to the MCP server, typically its API key, such as `{ \"Authorization\": \"Bearer …\" }` or `{ \"x-api-key\": \"…\" }`. They never enter the sandbox and their values are never returned. Names match `^[A-Za-z0-9-]{1,64}$`; at most 20 headers of up to 8192 characters each, on one line.","minProperties":1,"maxProperties":20,"propertyNames":{"type":"string"}},"connection_id":{"not":{}}},"required":["name","url"],"additionalProperties":false,"description":"An MCP server given by its URL."},"SkillInput":{"type":"object","properties":{"name":{"type":"string","maxLength":64,"description":"Name of the skill, unique in the run, matching `^[a-z0-9]+(-[a-z0-9]+)*$` and up to 64 characters, such as `release-notes`. `plugin-management` is reserved for running the agent."},"files":{"type":"array","items":{"$ref":"#/components/schemas/SkillFileInput"},"maxItems":100}},"required":["name","files"],"additionalProperties":false},"SkillFileInput":{"type":"object","properties":{"path":{"type":"string","maxLength":200},"content":{"type":"string","description":"Text of the file. A file starting with `#!` is made executable."}},"required":["path","content"],"additionalProperties":false,"description":"A text file of a skill."}},"securitySchemes":{"bearer":{"description":"An API key of your organization, starting with `trk_`, sent as `Authorization: Bearer <key>`.","type":"http","scheme":"bearer"}}},"security":[],"tags":[{"name":"Runs","description":"Start coding agents and follow their work."},{"name":"Files","description":"Upload files to place in a run's sandbox."},{"name":"Connections","description":"Let agents use MCP servers as one of their users, without their credentials entering the sandbox."},{"name":"Experiments","description":"Define scenarios to give several agents in several variants, judged on what they did."},{"name":"Executions","description":"Launch experiments and read their results."},{"name":"Library","description":"What your experiments can give their agents."},{"name":"System"}],"servers":[{"url":"https://tracks.alpic.ai/api"}]}