{"openapi":"3.2.0","info":{"title":"Inspect API","version":"1.0.0","description":"API for programmatically creating and managing Inspect sessions.\n\n## Authentication\n\nMost API requests require authentication using an API key. Include your API key in the `Authorization` header as a Bearer token:\n\n```\nAuthorization: Bearer riu_xxxxxxxxxxxxx\n```\n\n## Getting an API Key\n\n### User keys (`riu_` prefix)\n\nUser keys let you use the API as yourself. Sessions created with your key will open PRs under your GitHub account.\n\nTo generate a user API key:\n1. Go to [Settings](https://inspect.com/my/settings)\n2. Scroll to the **Developer** section\n3. Click **Generate API key**\n4. Copy and save the key - it will only be shown once\n\n### System keys (`ris_` prefix)\n\nSystem keys are for automated integrations that need to open PRs as Inspect itself (not as a specific user).\nTo request a system key, ask your Inspect administrators so they can assess the request. Include:\n\n1. The system key name.\n2. Whether the key needs read-only or write access.\n3. The repository scope the key needs.\n4. What the integration will do with the key.\n5. The expected request/session volume.\n\n## Request validation\n\nRequest bodies are validated strictly. A body containing a field that the endpoint does not define, including inside a nested object, is rejected with a `400` response whose message names the field, for example `Unrecognized key: \"promt\"`. Map fields such as `variables` accept any keys, and free-form JSON fields such as `output_schema` accept any content. Unknown query parameters are ignored.\n"},"tags":[{"name":"Operate"},{"name":"Artifacts","description":"Manage artifacts"},{"name":"Automations","description":"Manage automations"},{"name":"Skills","description":"Manage reusable skills"},{"name":"Agents","description":"Manage custom agents"},{"name":"Memories","description":"Read and write personal memories"},{"name":"User","description":"Read the API key user's preferences"},{"name":"Previews","description":"Report pull request preview deployments"},{"name":"Deployments","description":"Report repository deployments"},{"name":"Repositories","description":"List available repositories"},{"name":"Models","description":"List available models"},{"name":"Sessions","description":"Create and manage Inspect sessions"}],"paths":{"/api/v2/agents":{"get":{"operationId":"listAgents","summary":"List agents","description":"List available agents. Returns all non-deleted agents with their basic metadata (no `prompt` or `skills` here; use `GET /api/v2/agents/{agent_id}` for full configuration). Use the returned `id` in the `agent_id` field when creating a session.","parameters":[],"responses":{"200":{"description":"List of custom agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.AgentList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]},"post":{"operationId":"createAgent","summary":"Create agent","description":"Create a custom agent owned by the user associated with the API key. Slack app, avatar, and contributor settings are not managed by this endpoint.","parameters":[],"responses":{"201":{"description":"Custom agent created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Agents.AgentDetail"}}}}}},"400":{"description":"Invalid request body. JSON for schema errors; plain text for repositories that are not configured repository IDs.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The agent could not be saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.CreateAgentRequest"}}}}}},"/api/v2/agents/{agent_id}":{"get":{"operationId":"getAgent","summary":"Get agent","description":"Retrieve a single agent by ID, including system `prompt`, `skills`, capabilities, and repository configuration. The list endpoint (`GET /api/v2/agents`) returns summary metadata only; use this route for full configuration. Same API key authentication as other public v1 endpoints.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID (from the list agents response)","schema":{"type":"string"}}],"responses":{"200":{"description":"Agent details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Agents.AgentDetail"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found or deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]},"patch":{"operationId":"updateAgent","summary":"Update agent","description":"Partially update a custom agent. The API key user must be the creator, a contributor, or an Inspect admin. Only provided fields are changed.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Custom agent updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Agents.AgentDetail"}}}}}},"400":{"description":"Invalid request body. JSON for schema errors; plain text for repositories that are not configured repository IDs.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, the managed Review agent, or insufficient agent permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found or deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The agent could not be saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.UpdateAgentRequest"}}}}}},"/api/v2/agents/{agent_id}/versions":{"get":{"operationId":"listAgentVersions","summary":"List agent versions","description":"List every saved prompt version for an agent, newest first. Only the prompt is versioned; the rest of the agent's configuration is always current. The API key user must be the creator, a contributor, or an Inspect admin.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Agent prompt versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.AgentVersionList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient agent permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found or archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/api/v2/artifacts":{"get":{"operationId":"listArtifacts","summary":"List artifacts","description":"List or search published artifacts, newest first. Supports cursor pagination.","parameters":[{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.first"},{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.after"},{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.query"},{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.type"}],"responses":{"200":{"description":"List results for artifacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.ArtifactList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Artifacts"]},"post":{"operationId":"createArtifact","summary":"Create artifact","description":"Publish a link artifact. If an artifact with the same canonical URL already exists, returns it unchanged with status 200 and `meta.created: false`. Returns 400 when the URL has credentials or a local/private host.","parameters":[],"responses":{"200":{"description":"An artifact with the same canonical URL already existed and is returned unchanged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.CreateArtifactResult"}}}},"201":{"description":"Artifact created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.CreateArtifactResult"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Artifacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.CreateArtifactRequest"}}}}}},"/api/v2/artifacts/{artifact_id}":{"get":{"operationId":"getArtifact","summary":"Get artifact","description":"Retrieve a published artifact.","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Artifacts.Artifact"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Artifact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Artifacts"]},"patch":{"operationId":"updateArtifact","summary":"Update artifact","description":"Partially update a published artifact. Returns 400 when `url` or `type` is set on a `file` or `session_replay` artifact or the URL has credentials or a local/private host, and 409 when another artifact already uses the URL.","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Artifacts.Artifact"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Artifact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Artifact URL already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Artifacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.UpdateArtifactRequest"}}}}},"delete":{"operationId":"deleteArtifact","summary":"Delete artifact","description":"Remove a published artifact. Artifacts produced in a session stay with that session, unpublished; others are deleted.","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Artifact deleted"},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Artifact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Artifacts"]}},"/api/v2/automations":{"get":{"operationId":"listAutomations","summary":"List automations","description":"List automations owned by or shared with the authenticated user. Pass `scope=all` to also include published automations and their soft forks. Supports cursor pagination.","parameters":[{"name":"first","in":"query","required":false,"description":"Number of results to return (max 100).","schema":{"$ref":"#/components/schemas/Automations.AutomationPageSize","default":50},"explode":false},{"name":"after","in":"query","required":false,"description":"Cursor for pagination. Use `meta.next_cursor` from a previous response.","schema":{"type":"string"},"explode":false},{"name":"include_archived","in":"query","required":false,"description":"If true, include archived automations. Defaults to false.","schema":{"type":"boolean","default":false},"explode":false},{"name":"scope","in":"query","required":false,"description":"`mine` returns automations the authenticated user owns or collaborates on. `all` also returns every automation the user can view, including published automations and their soft forks. Defaults to `mine`.","schema":{"$ref":"#/components/schemas/Automations.AutomationListScope","default":"mine"},"explode":false}],"responses":{"200":{"description":"List of automations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.AutomationList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Automations"]},"post":{"operationId":"createAutomation","summary":"Create automation","description":"Create a new automation with zero or more independently configured triggers.","parameters":[],"responses":{"201":{"description":"Automation created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, insufficient automation permissions, or a repository outside the API key's allowed repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting automation, trigger, or integration state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Trigger integration is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Automations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.CreateAutomationRequest"}}}}}},"/api/v2/automations/{automation_id}":{"get":{"operationId":"getAutomation","summary":"Get automation","description":"Retrieve a single automation by ID.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Automation details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, insufficient automation permissions, or a repository outside the API key's allowed repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Automations"]},"patch":{"operationId":"updateAutomation","summary":"Update automation","description":"Partially update an automation. Only provided fields are changed.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Automation updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, insufficient automation permissions, or a repository outside the API key's allowed repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicting automation, trigger, or integration state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Trigger integration is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Automations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.UpdateAutomationRequest"}}}}},"delete":{"operationId":"archiveAutomation","summary":"Archive automation","description":"Soft-archive an automation. The automation is disabled and hidden from default list queries but can still be retrieved with include_archived=true.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Automation archived"},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, insufficient automation permissions, or a repository outside the API key's allowed repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Automations"]}},"/api/v2/automations/{automation_id}/trigger":{"post":{"operationId":"triggerAutomation","summary":"Trigger automation","description":"Manually trigger an automation run.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Automation triggered","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, insufficient automation permissions, or a repository outside the API key's allowed repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Automations"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.TriggerAutomationRequest"}}}}}},"/api/v2/memories":{"get":{"operationId":"listMemories","summary":"List memories","description":"List active memories in a personal scope. Memory reads are available to every Inspect API key holder.","parameters":[{"name":"scope","in":"query","required":true,"description":"Scope type to read.","schema":{"$ref":"#/components/schemas/Memories.MemoryScopeType"},"explode":false},{"name":"scope_id","in":"query","required":false,"description":"User id. Defaults to the API key user.","schema":{"$ref":"#/components/schemas/Memories.MemoryUserId"},"explode":false},{"name":"directive_limit","in":"query","required":false,"description":"Maximum number of directive memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryDirectiveLimit","default":20},"explode":false},{"name":"fact_limit","in":"query","required":false,"description":"Maximum number of fact memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryFactLimit","default":50},"explode":false}],"responses":{"200":{"description":"Active memories in the requested scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.MemoryList"}}}},"400":{"description":"Invalid scope selection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Memory storage failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Memories"]},"post":{"operationId":"createMemory","summary":"Create memory","description":"Create one durable memory. `personal` always targets the API key user's own scope.","parameters":[],"responses":{"201":{"description":"Created memory","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.CreatedMemory"}}}}}},"400":{"description":"Invalid memory payload","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Memory storage failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Memories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.CreateMemoryRequest"}}}}}},"/api/v2/memories/context":{"get":{"operationId":"getMemoryContext","summary":"Get memory context","description":"Read the active memory context for a user. Personal memories default to the API key user; pass `user_id` to read another user's context.","parameters":[{"name":"user_id","in":"query","required":false,"description":"User whose personal memories are included. Defaults to the API key user. Ignored when `include_personal` is `false`.","schema":{"$ref":"#/components/schemas/Memories.MemoryUserId"},"explode":false},{"name":"include_personal","in":"query","required":false,"description":"Set to `false` to exclude personal memories from the context.","schema":{"type":"boolean","default":true},"explode":false},{"name":"directive_limit","in":"query","required":false,"description":"Maximum number of directive memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryDirectiveLimit","default":20},"explode":false},{"name":"fact_limit","in":"query","required":false,"description":"Maximum number of fact memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryFactLimit","default":50},"explode":false}],"responses":{"200":{"description":"Active memory context for the requested scopes","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryContext"}}}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Memory storage failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Memories"]}},"/api/v2/memories/{memory_id}":{"get":{"operationId":"getMemory","summary":"Get memory","description":"Read one memory by id, including its canonical body, lifecycle state, and every scope it is placed in. Archived memories are returned.","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Memory details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryDetails"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Memory storage failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Memories"]},"patch":{"operationId":"updateMemory","summary":"Update memory","description":"Replace the title, canonical body, discovery summary, and type of an active memory.","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated memory","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryResult"}}}}}},"400":{"description":"Invalid memory payload","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Memory is archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Memory storage failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Memories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.UpdateMemoryRequest"}}}}}},"/api/v2/memories/{memory_id}/archive":{"post":{"operationId":"archiveMemory","summary":"Archive memory","description":"Archive a stale, superseded, or no-longer-relevant memory.","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Archived memory","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryResult"}}}}}},"400":{"description":"Invalid or malformed archive payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Memory is already archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Memory storage failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Memories"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.ArchiveMemoryRequest"}}}}}},"/api/v2/models":{"get":{"operationId":"listModels","summary":"List models","description":"List available models.","parameters":[],"responses":{"200":{"description":"List of models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models.ModelList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Models"]}},"/api/v2/repositories":{"get":{"operationId":"listRepositories","summary":"List repositories","description":"List available repositories. System API keys see every repository available to them; user keys see their visible, non-hidden repositories.","parameters":[],"responses":{"200":{"description":"List of repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repositories.RepositoryList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Repositories"]}},"/api/v2/repositories/{owner}/{repo}/deployments":{"post":{"operationId":"reportDeployment","summary":"Report deployment","description":"Report deployment status for one or more pull requests. Accepts normal personal or system API keys with write access and access to the repository. Only deployed and failed statuses are accepted. Each new event is notified independently, without a cross-environment completion gate. Send requests to your own Inspect origin. Idempotency keys are scoped per repository/PR, independent of the API key: retries with the same key do not record or notify again. Reuse a key only for the same event.","parameters":[{"name":"owner","in":"path","required":true,"description":"GitHub repository owner.","schema":{"$ref":"#/components/schemas/Deployments.RepositoryPathSegment"}},{"name":"repo","in":"path","required":true,"description":"GitHub repository name.","schema":{"$ref":"#/components/schemas/Deployments.RepositoryPathSegment"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable event ID, deduplicated per repository/PR across retries and credential rotation.","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The event was recorded, or was already recorded with the same idempotency key. Slack delivery is asynchronous and best effort.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deployments.DeploymentReport"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key or its user is read-only, or the key scope does not allow the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The repository is not registered or is not accessible to this user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Deployments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployments.ReportDeploymentRequest"}}}}}},"/api/v2/repositories/{owner}/{repo}/pulls/{pull_request_number}/previews":{"get":{"operationId":"listPullRequestPreviews","summary":"List pull request previews","description":"List the latest state of every preview reported for a pull request, as stored on the Inspect sessions currently linked to it.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"}],"responses":{"200":{"description":"Previews for the pull request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Previews.PullRequestPreviewList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The repository is not registered or not accessible to this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Previews"]}},"/api/v2/repositories/{owner}/{repo}/pulls/{pull_request_number}/previews/{name}":{"put":{"operationId":"upsertPullRequestPreview","summary":"Report pull request preview","description":"Record the deploy status of a named preview for a pull request, typically from CI. The status is applied to every Inspect session currently linked to the pull request; sessions linked later receive the next reported status. Retries are safe: an update whose `occurred_at` is older than the stored status for the same preview is ignored. A `deploying` or `failed` status keeps the last successful URL.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"},{"$ref":"#/components/parameters/Previews.PreviewParams.name"}],"responses":{"200":{"description":"The status was accepted","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Previews.UpsertedPullRequestPreview"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is read-only or not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The repository is not registered or not accessible to this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Previews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Previews.UpsertPullRequestPreviewRequest"}}}}},"delete":{"operationId":"deletePullRequestPreview","summary":"Delete pull request preview","description":"Remove a named preview from every Inspect session linked to the pull request, for example after the preview environment is torn down.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"},{"$ref":"#/components/parameters/Previews.PreviewParams.name"}],"responses":{"204":{"description":"The preview was removed (or did not exist)"},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is read-only or not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The repository is not registered or not accessible to this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Previews"]}},"/api/v2/sessions":{"get":{"operationId":"listSessions","summary":"List sessions","description":"List sessions. By default returns only sessions owned by the authenticated user. Use `all=true` to return all sessions. Private sessions are excluded from this discoverable listing unless the API key user owns or participates in them; fetch other sessions by direct session ID instead.","parameters":[{"name":"all","in":"query","required":false,"description":"If true, return all sessions (not just the authenticated user's).","schema":{"type":"boolean","default":false},"explode":false},{"name":"include_archived","in":"query","required":false,"description":"If true, include archived (deleted) sessions in the results.","schema":{"type":"boolean","default":false},"explode":false},{"name":"repository","in":"query","required":false,"description":"Filter by repository ID","schema":{"type":"string"},"explode":false},{"name":"pull_request_number","in":"query","required":false,"description":"Filter by pull request number","schema":{"type":"number"},"explode":false},{"name":"branch","in":"query","required":false,"description":"Filter by branch name. Also matches the current head branch of pull requests the session opened.","schema":{"type":"string"},"explode":false},{"name":"agent_id","in":"query","required":false,"description":"Filter by custom agent ID","schema":{"type":"string"},"explode":false},{"name":"slack_thread","in":"query","required":false,"description":"Filter by linked Slack thread in `channel_id:thread_ts` format.","schema":{"type":"string"},"explode":false},{"name":"tag","in":"query","required":false,"description":"Filter by a single session tag (exact, case-sensitive match). By default matches tags added by each session owner; combine with `tagged_by` to match tags added by a specific user instead.","schema":{"type":"string"},"explode":false},{"name":"tagged_by","in":"query","required":false,"description":"Email of the Inspect user whose tags should be used for the `tag` filter and surfaced in each returned session's `tags` field. Defaults to each session's owner. Returns 400 when no Inspect user exists for the email.","schema":{"type":"string","format":"email"},"explode":false},{"name":"start_date","in":"query","required":false,"description":"Filter sessions created on or after this date. ISO 8601 format (e.g. 2025-01-01T00:00:00Z); date-only values use the server's local time.","schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}]},"explode":false},{"name":"end_date","in":"query","required":false,"description":"Filter sessions created on or before this date. ISO 8601 format (e.g. 2025-12-31T23:59:59Z); date-only values use the server's local time.","schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}]},"explode":false},{"name":"sort_by","in":"query","required":false,"description":"Sort order for sessions by creation time. Defaults to newest first.","schema":{"$ref":"#/components/schemas/Sessions.SessionSortOrder","default":"created_at_desc"},"explode":false},{"name":"limit","in":"query","required":false,"description":"Maximum number of sessions to return (1-100)","schema":{"$ref":"#/components/schemas/Sessions.SessionPageSize","default":100},"explode":false}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SessionList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"]},"post":{"operationId":"createSession","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-supplied key for safe retries. A same-key retry from the same API key user returns the originally-created session (HTTP 200) instead of creating a duplicate. Blank keys are ignored; otherwise 8 to 255 characters. Idempotency is keyed per API key user.","schema":{"type":"string","maxLength":255}}],"description":"Create a new Inspect session with an initial prompt. Accepts either `application/json` or `multipart/form-data`. Use multipart when you need to upload file attachments alongside the prompt; put the JSON request in the `data` field.\n\nSupports an `Idempotency-Key` request header. When the same key is sent twice from the same API key, the second call returns the originally-created session (HTTP 200) instead of creating a new one. Keys are scoped per API key user and remain valid until the originally-created session is archived; a same-key request after archive starts a fresh session.","summary":"Create session","responses":{"200":{"description":"Idempotency-Key replay - returns the session originally created for this key.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"201":{"description":"Session created successfully","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.CreateSessionRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Sessions.CreateSessionMultipartRequest"},"encoding":{"data":{"contentType":"application/json"},"attachments":{"contentType":"*/*"}}}}}}},"/api/v2/sessions/{session_id}":{"get":{"operationId":"getSession","summary":"Get session","description":"Retrieve details for a specific session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionDetail"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"]},"patch":{"operationId":"updateSession","summary":"Update session","description":"Update session metadata. Only the session owner can update a session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.UpdateSessionRequest"}}}}},"delete":{"operationId":"archiveSession","summary":"Archive session","description":"Archive a session by setting its deletedAt timestamp. Archived sessions are hidden from default list queries but can still be retrieved individually or by using include_archived=true. The session can be archived by the session owner or by the API key user who originally created the session (e.g. when using on_behalf_of).","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"name":"close_pull_request","in":"query","required":false,"description":"Whether to close the session pull request when archiving.","schema":{"type":"boolean","default":true},"explode":false}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/cost":{"get":{"operationId":"getSessionCost","summary":"Get session cost","description":"Best-effort refresh the session durable-object export and return the latest persisted token totals and cost for a specific session. This can be used while a session is still running, without waiting for the scheduled export job. Laminar-runtime sessions return Laminar usage totals, including the usage of the session's subagents such as Verification agent runs, and messageCount is always 0 for them. Use GET /sessions/{session_id}/subagents/{subagent_id}/cost for a single subagent's usage. A Laminar-runtime session that was never bound to a Laminar session returns zero totals.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Latest session cost and token totals","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionCost"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["session_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["upstream_error"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/diff":{"get":{"operationId":"getSessionDiff","summary":"Get session diff","description":"Retrieve the raw unified diff for an authorized Inspect session. The endpoint is session-scoped and does not accept arbitrary diff file IDs. Pending or running sessions return the local working-tree diff when one is available; otherwise the stored authoritative session diff is returned.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"name":"repository","in":"query","required":false,"description":"Repository ID whose diff should be returned. Must be one of the session's `repositories`. Defaults to the first one.","schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"Raw unified diff for the session","headers":{"X-Inspect-Diff-Source":{"required":false,"description":"Source selected for this response: local for an active working-tree diff, or github for the authoritative GitHub diff. Omitted when the stored diff predates source tracking.","schema":{"type":"string","enum":["local","github"]}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/ValidationError"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/messages":{"get":{"operationId":"getSessionMessages","summary":"List session messages","description":"Retrieve all messages for a specific session, including user prompts and assistant responses. Laminar-runtime sessions return the same message shape, projected from the Laminar transcript. If the Laminar transcript exceeds the read limits, the response contains the latest history only and has the header `X-Inspect-Transcript-Truncated: true`.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session messages","headers":{"X-Inspect-Transcript-Truncated":{"required":false,"description":"Set to `true` when a Laminar transcript exceeded the read limits and only the latest history is returned.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.MessageList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/prompt":{"post":{"operationId":"sendPrompt","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"description":"Send a follow-up prompt to an existing session. Accepts either `application/json` or `multipart/form-data` (JSON request in the `data` field, files in `attachments`). By default prompts are delivered immediately. Set `delivery` to `queued` to enqueue the prompt behind active or outstanding work. If the session has no outstanding prompts, the prompt is delivered immediately and `queued_prompt` is omitted, restarting a dormant sandbox when necessary. Prompts that remain queued may not appear in `/messages` until they are released and processed.","summary":"Send prompt","responses":{"200":{"description":"Prompt accepted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SendPromptResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unhandled server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SendPromptRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Sessions.SendPromptMultipartRequest"},"encoding":{"data":{"contentType":"application/json"},"attachments":{"contentType":"*/*"}}}}}}},"/api/v2/sessions/{session_id}/stop":{"post":{"operationId":"stopSession","summary":"Stop session","description":"Interrupt the session's active turn without archiving it. Cancels any queued prompts and sets the session status to `finished`, but leaves `deletedAt` untouched — so a session that was previously archived and resumed can still be stopped. No-ops (returns the current session) when the session is not running. The session can be stopped by the session owner or by the API key user who originally created the session (e.g. when using on_behalf_of).","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/subagents":{"get":{"operationId":"listSessionSubagents","summary":"List session subagents","description":"List the subagents of a session, newest first, including Verification agent runs Inspect started for it. Subagents are not sessions: read them through the subagent endpoints of their parent session. Sessions without a Laminar runtime return an empty list.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Subagents of the session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SessionSubagentList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["session_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["upstream_error"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/subagents/{subagent_id}/cost":{"get":{"operationId":"getSessionSubagentCost","summary":"Get session subagent cost","description":"Return the token totals and cost of a subagent of the session, including its own subagents. `sessionId` is the subagent ID and messageCount is always 0. Returns 404 when the subagent does not belong to the session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"$ref":"#/components/parameters/Sessions.SessionSubagentIdParams.subagent_id"}],"responses":{"200":{"description":"Latest session cost and token totals","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionCost"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["session_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["subagent_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}]}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["upstream_error"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/subagents/{subagent_id}/messages":{"get":{"operationId":"getSessionSubagentMessages","summary":"List session subagent messages","description":"Retrieve the messages of a subagent of the session, in the same shape as GET /sessions/{session_id}/messages. Returns 404 when the subagent does not belong to the session. If the transcript exceeds the read limits, the response contains the latest history only and has the header `X-Inspect-Transcript-Truncated: true`.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"$ref":"#/components/parameters/Sessions.SessionSubagentIdParams.subagent_id"}],"responses":{"200":{"description":"Session messages","headers":{"X-Inspect-Transcript-Truncated":{"required":false,"description":"Set to `true` when a Laminar transcript exceeded the read limits and only the latest history is returned.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.MessageList"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["session_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["subagent_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}]}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["upstream_error"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}}}}},"tags":["Sessions"]}},"/api/v2/sessions/{session_id}/tags":{"put":{"operationId":"updateSessionTags","summary":"Replace session tags","description":"Replace the set of tags that the API key's user has applied to a session. Tags are scoped per user: this endpoint only affects tags added by the calling API key's user and never modifies tags added by the session owner or anyone else. Passing an empty array removes all of the caller's tags from the session. The operation is idempotent, making it suitable for pipelines that periodically reconcile labels onto sessions. Find sessions by these tags with `GET /sessions?tag=...&tagged_by=<caller email>`.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"The caller's tags on the session were replaced","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionTags"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.UpdateSessionTagsRequest"}}}}}},"/api/v2/sessions/{session_id}/update-base-branch":{"post":{"operationId":"updateSessionBaseBranch","summary":"Update session base branch","description":"Update the base branch for a session's first repository. The branch must exist in the session repository. If the session already has an open pull request, its base branch is updated on GitHub as well. Only the session owner can update the base branch. Returns 400 when the branch or repository is invalid (including a branch that does not exist), 409 when the session's pull request is merged or closed, 502 when updating the pull request on GitHub fails, and 500 when the new base branch could not be saved.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Base branch update result.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.UpdateBaseBranchSuccess"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.UpdateBaseBranchRequest"}}}}}},"/api/v2/sessions/{session_id}/verification":{"post":{"operationId":"startSessionVerification","summary":"Start session verification","description":"Start or rerun the Verification agent on the current head of the session's pull request. A new run supersedes any older run for that pull request. Runs even when the session owner has turned off automatic Verification agent runs, as long as the repository configures verification at `.inspect/verification/config.yml`. The session owner or the API key user who originally created the session can start a run; read-only API keys cannot start runs in writable sessions. Returns 202 when a run started or was already running, 400 when the session has pull requests in multiple repositories and no repository was given, and 409 with a `reason` when no run started.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"202":{"description":"Verification agent run started or already running","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionVerificationStarted"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Verification agent run did not start","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SessionVerificationNotStarted"}}}}},"tags":["Sessions"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.StartSessionVerificationRequest"}}}}}},"/api/v2/skills":{"get":{"operationId":"listSkills","summary":"List skills","description":"List active skills in the catalog, including built-in skills. Filter by a case-insensitive `query` that matches the skill ID or description. Use `GET /api/v2/skills/{skill_id}` for skill files.","parameters":[{"name":"query","in":"query","required":false,"description":"Optional text to match against skill IDs and descriptions.","schema":{"type":"string"},"explode":false},{"name":"limit","in":"query","required":false,"description":"Maximum number of skills to return.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20},"explode":false}],"responses":{"200":{"description":"Matching skills","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skills.SkillSummaryList"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Skills"]},"post":{"operationId":"createSkill","summary":"Create skill","description":"Create a skill owned by the API key user. Provide either `content` (the `SKILL.md` body) or `files` (the complete file set, which must include `SKILL.md`). Creating a skill with the ID of an archived skill restores it; only its original owner or an admin can do this.","parameters":[],"responses":{"201":{"description":"Skill created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Skills.Skill"}}}}}},"400":{"description":"Invalid skill, missing `SKILL.md`, too many or too large files, or unknown collaborator IDs","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, or the archived skill belongs to another user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A skill with this ID already exists or is built into Inspect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Skills"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skills.CreateSkillRequest"}}}}}},"/api/v2/skills/{skill_id}":{"get":{"operationId":"getSkill","summary":"Get skill","description":"Retrieve an active skill, including every file, its owner, and its collaborators.","parameters":[{"name":"skill_id","in":"path","required":true,"description":"Skill ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Skill details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Skills.Skill"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found or archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Skills"]},"patch":{"operationId":"updateSkill","summary":"Update skill","description":"Update or rename a skill. Omitted fields are unchanged. `files` replaces the complete file set and must include `SKILL.md`; `content` replaces only `SKILL.md`. Renaming updates references from user settings and custom agents. Only the owner, a collaborator, or an admin can update a skill; built-in skills are read-only.","parameters":[{"name":"skill_id","in":"path","required":true,"description":"Current skill ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Skill updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Skills.Skill"}}}}}},"400":{"description":"Invalid or empty skill update, missing `SKILL.md`, too many or too large files, or unknown collaborator IDs","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/Error"}]}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, built-in skill, or insufficient skill permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found or archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The new skill ID already exists or is built into Inspect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Skills"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skills.UpdateSkillRequest"}}}}},"delete":{"operationId":"archiveSkill","summary":"Archive skill","description":"Archive a skill so it no longer appears in the catalog or loads for agents. Only the owner, a collaborator, or an admin can archive a skill; built-in skills cannot be archived.","parameters":[{"name":"skill_id","in":"path","required":true,"description":"Skill ID","schema":{"type":"string"}}],"responses":{"204":{"description":"Skill archived"},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Read-only API key, built-in skill, or insufficient skill permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Skill not found or already archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Skills"]}},"/api/v2/user/preferences":{"get":{"operationId":"getUserPreferences","summary":"Get user preferences","description":"Retrieve the authenticated user's preferences, including their default model and agent.","parameters":[],"responses":{"200":{"description":"User preferences","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User.UserPreferences"}}}}}},"401":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["User"]}}},"security":[{"bearerAuth":[]}],"components":{"parameters":{"Artifacts.ListArtifactsQuery.after":{"name":"after","in":"query","required":false,"description":"Cursor for pagination. Use `meta.next_cursor` from a previous response.","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactCursor"},"explode":false},"Artifacts.ListArtifactsQuery.first":{"name":"first","in":"query","required":false,"description":"Number of results to return (max 100).","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactPageSize","default":50},"explode":false},"Artifacts.ListArtifactsQuery.query":{"name":"query","in":"query","required":false,"description":"Full-text search across title, URL, and description.","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactSearchQuery"},"explode":false},"Artifacts.ListArtifactsQuery.type":{"name":"type","in":"query","required":false,"description":"Filter artifacts by type.","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactType"},"explode":false},"Previews.PreviewParams.name":{"name":"name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Previews.PreviewName"}},"Previews.PullRequestParams.owner":{"name":"owner","in":"path","required":true,"description":"GitHub repository owner.","schema":{"type":"string","minLength":1}},"Previews.PullRequestParams.pull_request_number":{"name":"pull_request_number","in":"path","required":true,"description":"Pull request number.","schema":{"$ref":"#/components/schemas/Previews.PullRequestNumber"}},"Previews.PullRequestParams.repo":{"name":"repo","in":"path","required":true,"description":"GitHub repository name.","schema":{"type":"string","minLength":1}},"Sessions.SessionIdParam":{"name":"session_id","in":"path","required":true,"description":"The unique identifier of the session","schema":{"type":"string"}},"Sessions.SessionSubagentIdParams.subagent_id":{"name":"subagent_id","in":"path","required":true,"description":"The unique identifier of a subagent of the session","schema":{"type":"string"}}},"schemas":{"Agents.Agent":{"type":"object","required":["id","name","description","model","builtin","created_at"],"properties":{"id":{"type":"string","description":"Unique identifier for the agent"},"name":{"type":"string","description":"Display name of the agent"},"description":{"type":"string","description":"Description of what this agent does"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Preferred model for this agent, or null to use the default"},"builtin":{"type":"boolean","description":"Whether this is a built-in agent"},"created_at":{"type":"string","format":"date-time","description":"When the agent was created"}}},"Agents.AgentCapabilities":{"type":"object","required":["edit","git_write","browser","user_skills","repository_skills","datadog","customer_data_access","notion","inspect_sessions","web_search","artifacts","tools"],"properties":{"edit":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"git_write":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"browser":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"user_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"repository_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"datadog":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"customer_data_access":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"notion":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"inspect_sessions":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"web_search":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"artifacts":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"tools":{"type":"object","unevaluatedProperties":{"type":"boolean"},"description":"Per-tool enablement overrides. Empty when no tool is overridden."}},"description":"Capability and tool access overrides. A null capability retains its default."},"Agents.AgentCapabilitiesInput":{"type":"object","properties":{"edit":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"git_write":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"browser":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"user_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"repository_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"datadog":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"customer_data_access":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"notion":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"inspect_sessions":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"web_search":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"artifacts":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"tools":{"type":"object","unevaluatedProperties":{"type":"boolean"},"description":"Per-tool enablement overrides. Empty when no tool is overridden."}},"description":"Capability and tool access overrides. Omitted or null capabilities retain their defaults.","additionalProperties":false},"Agents.AgentDetail":{"type":"object","required":["prompt","created_by","skills","capabilities","prompt_context_mode","repositories","repository_hint"],"properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System prompt for this agent, or null when not set"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User id of the creator, if any"},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Configured skills for this agent"},"capabilities":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentCapabilities"},{"type":"null"}],"description":"Boolean capability toggles (edit, git_write, browser, integrations, etc.)"},"prompt_context_mode":{"$ref":"#/components/schemas/Agents.PromptContextMode","description":"How this agent applies its custom prompt: append keeps the tuned base system prompt, replace uses the custom prompt as the primary system prompt."},"repositories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repository allowlist for this agent, or null when unrestricted"},"repository_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional repository hint string"}},"allOf":[{"$ref":"#/components/schemas/Agents.Agent"}],"description":"Full agent configuration for a single ID. Includes fields not present on the list-agents response."},"Agents.AgentList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agents.Agent"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Agents.AgentVersion":{"type":"object","required":["version","prompt","created_at","created_by"],"properties":{"version":{"type":"integer","format":"int32","description":"Monotonic prompt version number"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Prompt saved in this version"},"created_at":{"type":"string","format":"date-time"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentVersionAuthor"},{"type":"null"}],"description":"User who saved this version, when known"}}},"Agents.AgentVersionAuthor":{"type":"object","required":["id","name","email"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}}},"Agents.AgentVersionList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agents.AgentVersion"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Agents.CreateAgentRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the agent."},"description":{"type":"string","description":"Description of what this agent does","default":""},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":100000,"description":"System prompt, or null to clear it","default":null},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":200,"description":"Preferred model, or null to use the default. Any string up to 200 characters is stored; it is not checked against the model list.","default":null},"skills":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.SkillName"}},{"type":"null"}],"description":"Configured skill names, or null for no explicit skill list","default":null},"capabilities":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentCapabilitiesInput"},{"type":"null"}],"description":"Capability overrides, or null to restore defaults","default":null},"prompt_context_mode":{"$ref":"#/components/schemas/Agents.PromptContextMode","description":"Whether the custom prompt appends to or replaces the base system prompt","default":"append"},"repositories":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.WorkspaceId"}},{"type":"null"}],"description":"Repository allowlist containing configured repository IDs; null means unrestricted","default":null},"repository_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"description":"Optional default repository hint","default":null}},"additionalProperties":false},"Agents.PromptContextMode":{"type":"string","enum":["append","replace"]},"Agents.SkillName":{"type":"string","minLength":1},"Agents.UpdateAgentRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the agent."},"description":{"type":"string","description":"Description of what this agent does"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":100000,"description":"System prompt, or null to clear it"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":200,"description":"Preferred model, or null to use the default. Any string up to 200 characters is stored; it is not checked against the model list."},"skills":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.SkillName"}},{"type":"null"}],"description":"Configured skill names, or null for no explicit skill list"},"capabilities":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentCapabilitiesInput"},{"type":"null"}],"description":"Capability overrides, or null to restore defaults"},"prompt_context_mode":{"$ref":"#/components/schemas/Agents.PromptContextMode","description":"Whether the custom prompt appends to or replaces the base system prompt"},"repositories":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.WorkspaceId"}},{"type":"null"}],"description":"Repository allowlist containing configured repository IDs; null means unrestricted"},"repository_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"description":"Optional default repository hint"}},"description":"At least one field must be provided.","additionalProperties":false,"minProperties":1},"Agents.WorkspaceId":{"type":"string","minLength":1,"description":"Configured Inspect repository ID"},"Artifacts.Artifact":{"anyOf":[{"$ref":"#/components/schemas/Artifacts.LinkArtifact"},{"$ref":"#/components/schemas/Artifacts.FileArtifact"},{"$ref":"#/components/schemas/Artifacts.SessionReplayArtifact"}],"description":"An artifact, discriminated by `type`: `file` and `session_replay` have their own shapes; every other type is a `LinkArtifact`."},"Artifacts.ArtifactBase":{"type":"object","required":["id","title","description","created_at"],"properties":{"id":{"type":"string","description":"Unique artifact identifier"},"title":{"type":"string","description":"Artifact title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description"},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created"}}},"Artifacts.ArtifactCursor":{"type":"string","maxLength":1024},"Artifacts.ArtifactDescription":{"type":"string","minLength":10,"maxLength":2000},"Artifacts.ArtifactList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Artifacts.Artifact"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Artifacts.ArtifactPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Artifacts.ArtifactSearchQuery":{"type":"string","minLength":1,"maxLength":200},"Artifacts.ArtifactTitle":{"type":"string","minLength":1,"maxLength":200},"Artifacts.ArtifactType":{"type":"string","enum":["link","doc","ticket","message","channel","dashboard","pdf","design","feature_flag","file","session_replay"]},"Artifacts.ArtifactUrl":{"type":"string","format":"uri","maxLength":2048,"description":"HTTP(S) URL without credentials or local/private host literals. Stored in WHATWG-canonical form."},"Artifacts.CreateArtifactMeta":{"type":"object","required":["created"],"properties":{"created":{"type":"boolean","description":"False when an artifact with the same canonical URL already existed; that artifact is returned unchanged."}}},"Artifacts.CreateArtifactRequest":{"type":"object","required":["type","title","url","description"],"properties":{"type":{"$ref":"#/components/schemas/Artifacts.LinkArtifactType"},"title":{"$ref":"#/components/schemas/Artifacts.ArtifactTitle"},"url":{"$ref":"#/components/schemas/Artifacts.ArtifactUrl"},"description":{"$ref":"#/components/schemas/Artifacts.ArtifactDescription"}}},"Artifacts.CreateArtifactResult":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Artifacts.Artifact"},"meta":{"$ref":"#/components/schemas/Artifacts.CreateArtifactMeta"}}},"Artifacts.FileArtifact":{"type":"object","required":["id","title","description","created_at","type","url","upload_id","file_name","mime_type"],"properties":{"id":{"type":"string","description":"Unique artifact identifier"},"title":{"type":"string","description":"Artifact title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description"},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created"},"type":{"type":"string","enum":["file"]},"url":{"type":"string","format":"uri","description":"Signed download URL for the file. Signed URLs expire; an expired URL returns an error."},"upload_id":{"type":"string","description":"Identifier of the stored upload"},"file_name":{"type":"string","description":"File name, including its extension"},"mime_type":{"type":"string","description":"MIME type of the file"}},"description":"A file uploaded from a session."},"Artifacts.LinkArtifact":{"type":"object","required":["id","title","description","created_at","type","url"],"properties":{"id":{"type":"string","description":"Unique artifact identifier"},"title":{"type":"string","description":"Artifact title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description"},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created"},"type":{"$ref":"#/components/schemas/Artifacts.LinkArtifactType"},"url":{"type":"string","format":"uri","description":"URL of the resource"}},"description":"A pointer to an external resource, such as a doc, ticket, or dashboard."},"Artifacts.LinkArtifactType":{"type":"string","enum":["link","doc","ticket","message","channel","dashboard","pdf","design","feature_flag"],"description":"Types of artifacts that point at an external resource. Only these types can be created or re-categorized through the API; `file` and `session_replay` artifacts are produced by sessions."},"Artifacts.SessionReplayArtifact":{"type":"object","required":["id","title","description","created_at","type","url","session_id","replay_id","recording","markers"],"properties":{"id":{"type":"string","description":"Unique artifact identifier"},"title":{"type":"string","description":"Artifact title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description"},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created"},"type":{"type":"string","enum":["session_replay"]},"url":{"type":"string","format":"uri","description":"URL of the replay player. Viewing it requires access to the session that captured the replay."},"session_id":{"type":"string","description":"Identifier of the Inspect session that captured the replay"},"replay_id":{"type":"string","description":"Replay identifier"},"recording":{"$ref":"#/components/schemas/Artifacts.SessionReplayRecording"},"markers":{"type":"array","items":{"$ref":"#/components/schemas/Artifacts.SessionReplayMarker"}}},"description":"A Datadog session replay captured by a session."},"Artifacts.SessionReplayMarker":{"type":"object","required":["label","occurred_at","color"],"properties":{"label":{"type":"string","description":"Short description of the recorded event"},"occurred_at":{"type":"string","format":"date-time","description":"When the event happened"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSS color for the timeline marker"}},"description":"A marked event on the replay timeline."},"Artifacts.SessionReplayRecording":{"type":"object","required":["datadog_session_id","application_id","application_name","user_email","datadog_url","started_at","ended_at","view_count"],"properties":{"datadog_session_id":{"type":"string","description":"Datadog RUM session identifier"},"application_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Datadog RUM application identifier"},"application_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Datadog RUM application name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email of the user recorded in the replay"},"datadog_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Link to the session in Datadog"},"started_at":{"type":"string","format":"date-time","description":"When the recording starts"},"ended_at":{"type":"string","format":"date-time","description":"When the recording ends"},"view_count":{"type":"integer","format":"int32","description":"Number of views recorded"}},"description":"Datadog RUM session the replay was recorded from."},"Artifacts.UpdateArtifactRequest":{"type":"object","properties":{"title":{"$ref":"#/components/schemas/Artifacts.ArtifactTitle"},"description":{"$ref":"#/components/schemas/Artifacts.ArtifactDescription"},"url":{"$ref":"#/components/schemas/Artifacts.ArtifactUrl"},"type":{"$ref":"#/components/schemas/Artifacts.LinkArtifactType"}},"description":"Provide at least one field to update. `url` and `type` can only be changed on link artifacts.","minProperties":1},"Automations.AutoAddressPrReviewBuddyPolicy":{"type":"object","required":["enabled","enabled_finding_types"],"properties":{"enabled":{"type":"boolean"},"enabled_finding_types":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewFindingType"}}}},"Automations.AutoAddressPrReviewBuddyPolicyInput":{"type":"object","required":["enabled_finding_types"],"properties":{"enabled":{"type":"boolean"},"enabled_finding_types":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewFindingType"}}},"additionalProperties":false},"Automations.AutoAddressPrReviewFindingType":{"type":"string","enum":["critical","warning","suggestion"]},"Automations.AutoAddressPrReviewIdentityRule":{"type":"object","required":["selector","rule_type"],"properties":{"selector":{"type":"string","minLength":1,"description":"GitHub identity selector key."},"rule_type":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewIdentityRuleType"}},"additionalProperties":false},"Automations.AutoAddressPrReviewIdentityRuleType":{"type":"string","enum":["allow","block"]},"Automations.AutoAddressPrReviewReviewerCategories":{"type":"object","required":["human","bot"],"properties":{"human":{"type":"boolean"},"bot":{"type":"boolean"}},"additionalProperties":false},"Automations.AutoAddressPrReviewsPolicy":{"type":"object","required":["enabled","reviewer_categories","identity_rules","review_buddy"],"properties":{"enabled":{"type":"boolean"},"reviewer_categories":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewReviewerCategories"},"identity_rules":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewIdentityRule"}},"review_buddy":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewBuddyPolicy"}},"description":"PR review auto-addressing policy."},"Automations.AutoAddressPrReviewsPolicyInput":{"type":"object","required":["enabled","reviewer_categories","identity_rules","review_buddy"],"properties":{"enabled":{"type":"boolean"},"reviewer_categories":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewReviewerCategories"},"identity_rules":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewIdentityRule"}},"review_buddy":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewBuddyPolicyInput"}},"description":"PR review auto-addressing policy. Requests reject unknown fields.","additionalProperties":false},"Automations.Automation":{"type":"object","required":["id","name","description","prompt","repositories","triggers","slack_channel_id","slack_fanout_destinations","post_to_slack_on_start","slack_mention_users","notify_collaborators_on_merge","run_as","owner","collaborators","model_id","agent_id","autofix_ci_failures","auto_review_enabled","auto_address_pull_request_reviews_policy","template_variables","enabled","last_run_at","next_run_at","archived_at","created_at","updated_at","viewer_can_edit"],"properties":{"id":{"type":"string","description":"Unique automation identifier"},"name":{"type":"string","description":"Automation name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description"},"prompt":{"type":"string","description":"Prompt template sent to the agent"},"repositories":{"type":"array","items":{"type":"string"},"description":"Repository IDs the automation targets"},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationTrigger"},"description":"Trigger definitions"},"slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Slack channel to post session updates to. Null when the viewer cannot edit the automation."},"slack_fanout_destinations":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackFanoutDestination"},"description":"Purpose-routed Slack destinations. Each entry grants permission to post in one channel only when the result matches that entry context. Empty when the viewer cannot edit the automation."},"post_to_slack_on_start":{"type":"boolean","description":"Whether automation sessions post to Slack when they start. False when the viewer cannot edit the automation."},"slack_mention_users":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackMention"},"description":"Slack users and user groups mentioned in automation posts. Empty when the viewer cannot edit the automation."},"notify_collaborators_on_merge":{"type":"boolean","description":"Whether automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available."},"run_as":{"$ref":"#/components/schemas/Automations.AutomationRunAs","description":"Identity automation sessions run as: `owner` (the automation owner) or `inspect` (the Inspect system user). Only the owner can change this."},"owner":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationCollaborator"},{"type":"null"}],"description":"User who owns the automation. Null for system-owned automations."},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationCollaborator"},"description":"Users who can view and edit this automation from Automations. The automation owner is always included in this list. Empty when the viewer cannot edit the automation."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model override"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom agent override"},"autofix_ci_failures":{"type":"boolean","description":"Whether sessions created by this automation automatically respond to CI failures."},"auto_review_enabled":{"type":"boolean","description":"Whether sessions created by this automation automatically review and fix code."},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicy"},{"type":"null"}],"description":"PR review auto-addressing policy applied to sessions. Null follows the owner user setting."},"template_variables":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableDefinition"},"description":"Template variable definitions"},"enabled":{"type":"boolean","description":"Whether automatic triggers are active. Manual-only automations do not have an enable/disable state."},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the automation last ran"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the automation is next scheduled to run"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the automation was archived, null if active"},"created_at":{"type":"string","format":"date-time","description":"When the automation was created"},"updated_at":{"type":"string","format":"date-time","description":"When the automation was last updated"},"viewer_can_edit":{"type":"boolean","description":"Whether the authenticated user owns or collaborates on this automation. When false, destinations, collaborators, and agent execution settings are redacted."}}},"Automations.AutomationBranchName":{"type":"string","maxLength":250},"Automations.AutomationCheckName":{"type":"string","minLength":1,"maxLength":250},"Automations.AutomationCollaborator":{"type":"object","required":["id","name","email","avatar_url"],"properties":{"id":{"type":"string","description":"User id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User display name"},"email":{"type":"string","description":"User email"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User avatar URL"}}},"Automations.AutomationConditionText":{"type":"string","minLength":1,"maxLength":500},"Automations.AutomationFilePattern":{"type":"string","minLength":1},"Automations.AutomationList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Automations.Automation"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Automations.AutomationListScope":{"type":"string","enum":["mine","all"]},"Automations.AutomationPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Automations.AutomationRepositoryId":{"type":"string","minLength":1,"description":"Repository id, or `auto` to let Inspect detect the repository. Must be a repository known to Inspect."},"Automations.AutomationRunAs":{"type":"string","enum":["owner","inspect"]},"Automations.AutomationSlackFanoutContext":{"type":"string","minLength":1,"maxLength":1000},"Automations.AutomationSlackFanoutDestination":{"type":"object","required":["channel_id","context"],"properties":{"channel_id":{"type":"string","description":"Slack channel id for a configured fanout destination."},"context":{"type":"string","description":"Natural-language routing context for the specific purpose that makes this channel the right destination."}}},"Automations.AutomationSlackFanoutDestinationInput":{"type":"object","required":["channel_id","context"],"properties":{"channel_id":{"type":"string","minLength":1,"maxLength":500,"description":"Slack channel id or pasted Slack channel link. The API normalizes channel ids from links.","examples":["C03KH3AGN2G"]},"context":{"$ref":"#/components/schemas/Automations.AutomationSlackFanoutContext","description":"The exact purpose that belongs in this destination, e.g. \"mobile app related issues or minor improvements\". Do not use this as a generic broadcast reason."}}},"Automations.AutomationSlackMention":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUser"},{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUserGroup"}],"description":"Slack user or user group mentioned when the automation posts to Slack."},"Automations.AutomationSlackMentionInput":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUserInput"},{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUserGroupInput"}],"description":"Slack user (the default when `type` is omitted) or user group to mention."},"Automations.AutomationSlackMentionUser":{"type":"object","required":["type","id","name","avatar_url"],"properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string"},"name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Automations.AutomationSlackMentionUserGroup":{"type":"object","required":["type","id","name","handle"],"properties":{"type":{"type":"string","enum":["usergroup"]},"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"}}},"Automations.AutomationSlackMentionUserGroupInput":{"type":"object","required":["type","id","name","handle"],"properties":{"type":{"type":"string","enum":["usergroup"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"handle":{"type":"string","minLength":1}}},"Automations.AutomationSlackMentionUserInput":{"type":"object","required":["id","name","avatar_url"],"properties":{"type":{"type":"string","enum":["user"],"default":"user"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Automations.AutomationTemplateVariableDefinition":{"type":"object","required":["label","value_type","default_value","options"],"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display label for this variable, or null when not set."},"value_type":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableValueType","description":"Expected value shape for editor inputs. Prompt rendering still substitutes strings. Defaults to `text`."},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default substitution value, or null when not set."},"options":{"type":"array","items":{"type":"string"},"description":"Allowed substitution values shown as a picker. Empty when any value is accepted."}}},"Automations.AutomationTemplateVariableDefinitionInput":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display label for this variable, or null when not set."},"value_type":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableValueType","description":"Expected value shape for editor inputs. Prompt rendering still substitutes strings. Defaults to `text`."},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default substitution value, or null when not set."},"options":{"type":"array","items":{"type":"string"},"description":"Allowed substitution values shown as a picker. Empty when any value is accepted."}},"description":"The template for adding optional properties."},"Automations.AutomationTemplateVariableValueType":{"type":"string","enum":["text","integer","number","boolean"]},"Automations.AutomationTextOperator":{"type":"string","enum":["contains","not_contains","starts_with","ends_with","equals","not_equals"]},"Automations.AutomationTrigger":{"anyOf":[{"$ref":"#/components/schemas/Automations.CronAutomationTrigger"},{"$ref":"#/components/schemas/Automations.PushAutomationTrigger"},{"$ref":"#/components/schemas/Automations.StatusCheckAutomationTrigger"},{"$ref":"#/components/schemas/Automations.PrCommentAutomationTrigger"},{"$ref":"#/components/schemas/Automations.SentryAutomationTrigger"},{"$ref":"#/components/schemas/Automations.SlackAutomationTrigger"},{"$ref":"#/components/schemas/Automations.DatadogAutomationTrigger"},{"$ref":"#/components/schemas/Automations.LaunchDarklyAutomationTrigger"}]},"Automations.AutomationTriggerInput":{"anyOf":[{"$ref":"#/components/schemas/Automations.CronAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.PushAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.StatusCheckAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.PrCommentAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.SentryAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.SlackAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.DatadogAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.LaunchDarklyAutomationTriggerInput"}],"description":"Trigger definition, selected by `type`."},"Automations.AutomationTriggerInputBase":{"type":"object","required":["id"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true}}},"Automations.AutomationUserId":{"type":"string","minLength":1},"Automations.CreateAutomationRequest":{"type":"object","required":["name","prompt","repositories","triggers"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Automation name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"description":"Optional description. When omitted, a short plain-language description is generated from the prompt.","default":null},"prompt":{"type":"string","minLength":1,"maxLength":100000,"description":"Prompt template sent to the agent"},"source_automation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional published automation ID to soft fork.","default":null},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId"},"minItems":1,"description":"Repository IDs the automation targets"},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationTriggerInput"},"description":"Trigger definitions. Pass an empty array for manual-only. Any trigger type may appear multiple times."},"slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"slack_fanout_destinations":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackFanoutDestinationInput"},"maxItems":50,"description":"Optional purpose-routed destinations. When users describe Slack routing in natural language, extract each Slack channel id/link plus the specific purpose/context that belongs there into this array and show the diff before enabling or saving.","default":[]},"post_to_slack_on_start":{"type":"boolean","description":"Whether automation sessions post to Slack when they start.","default":true},"slack_mention_users":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackMentionInput"},"description":"Slack users and user groups to mention in automation posts.","default":[]},"notify_collaborators_on_merge":{"type":"boolean","description":"When true, automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available.","default":false},"run_as":{"$ref":"#/components/schemas/Automations.AutomationRunAs","description":"Identity automation sessions run as: `owner` (the automation owner) or `inspect` (the Inspect system user). Only the owner can change this.","default":"owner"},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationUserId"},"description":"Users who can view and edit this automation from Automations. The owner is always included and ignored if passed here.","default":[]},"model_id":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"type":"string"},{"type":"null"}],"description":"Model used by the automation. Must be one of the model ids from `GET /api/v2/models`. Defaults to the default automation model unless the selected custom agent defines its own model.","default":null},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null},"autofix_ci_failures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null resolves to the owner user setting and is stored explicitly.","default":null},"auto_review_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null resolves to false and is stored explicitly.","default":null},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicyInput"},{"type":"null"}],"description":"Policy applied to sessions. Null snapshots the owner user setting when the automation is created.","default":null},"enabled":{"type":"boolean","description":"Whether automatic triggers are active. Ignored when triggers is empty for manual-only automations.","default":true},"template_variables":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableDefinitionInput"},"description":"Template variable definitions keyed by variable name.","default":{}}},"description":"Creates an automation whose ordered trigger list may contain repeated trigger types."},"Automations.CronAutomationTrigger":{"type":"object","required":["id","type","schedule_expression","cron_expression","timezone","enabled"],"properties":{"id":{"type":"string","description":"Stable trigger identifier."},"type":{"type":"string","enum":["cron"]},"schedule_expression":{"type":"string","description":"Human-readable or raw cron schedule expression"},"cron_expression":{"type":"string","description":"Cron expression"},"timezone":{"type":"string","description":"IANA timezone"},"enabled":{"type":"boolean","description":"Whether this trigger is enabled"}}},"Automations.CronAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["cron"]},"schedule_expression":{"type":"string","maxLength":200,"description":"Human-readable or raw cron schedule expression.","default":""},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":100,"description":"Cron expression. Required: a missing, null, or empty value is rejected.","default":null},"timezone":{"type":"string","description":"IANA timezone for cron triggers","default":"UTC"}}},"Automations.DatadogAutomationTrigger":{"type":"object","required":["id","type","enabled","monitor_url","scope","monitor_id","reply_to_slack_message","provisioning_status","provisioning_error"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["datadog"]},"enabled":{"type":"boolean"},"monitor_url":{"type":"string","description":"Datadog monitor URL for a Datadog trigger."},"scope":{"$ref":"#/components/schemas/Automations.DatadogTriggerScope","description":"Datadog transitions that start this trigger."},"monitor_id":{"type":"string","description":"Datadog monitor identifier."},"reply_to_slack_message":{"type":"boolean","description":"Whether automation responses should reuse the matching Datadog notification thread in the configured Slack channel."},"provisioning_status":{"$ref":"#/components/schemas/Automations.DatadogTriggerProvisioningStatus"},"provisioning_error":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Automations.DatadogAutomationTriggerInput":{"type":"object","required":["id","type","monitor_url","scope"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["datadog"]},"monitor_url":{"$ref":"#/components/schemas/Automations.DatadogMonitorUrl","description":"Full Datadog monitor URL."},"scope":{"$ref":"#/components/schemas/Automations.DatadogTriggerScope","description":"Transitions that start the automation."},"reply_to_slack_message":{"type":"boolean","description":"Reply in the matching Datadog notification thread when it appears in the configured Slack channel.","default":true}}},"Automations.DatadogMonitorUrl":{"type":"string","minLength":1,"maxLength":2000},"Automations.DatadogTriggerProvisioningStatus":{"type":"string","enum":["pending","active","error","deprovisioning","deleted"]},"Automations.DatadogTriggerScope":{"type":"string","enum":["alert","warning","all"]},"Automations.GithubPrCommentAuthorCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["author"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"description":"GitHub logins, matched case-insensitively. Requests trim each login and strip a leading `@` before validating it as a GitHub username (optionally ending in `[bot]`)."}}},"Automations.GithubPrCommentAuthorTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["author_type"]},"operator":{"type":"string","enum":["equals","not_equals"]},"value":{"type":"string","enum":["human","bot"]}}},"Automations.GithubPrCommentCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.GithubPrCommentTextCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentKindCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorTypeCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorCondition"}],"description":"A typed GitHub PR comment condition. Conditions on one trigger are ANDed."},"Automations.GithubPrCommentKind":{"type":"string","enum":["conversation","review_comment","review"]},"Automations.GithubPrCommentKindCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["comment_kind"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPrCommentKind"},"minItems":1,"maxItems":3}}},"Automations.GithubPrCommentTextCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["text"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator"},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText"}}},"Automations.GithubStatusCheckResult":{"type":"string","enum":["failure","error","timed_out","startup_failure","action_required","success","cancelled","neutral","skipped"]},"Automations.LaunchDarklyAutomationTrigger":{"type":"object","required":["id","type","enabled","project_key","environment_key","conditions","provisioning_status","provisioning_error"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["launchdarkly"]},"enabled":{"type":"boolean"},"project_key":{"type":"string"},"environment_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LaunchDarklyCondition"}},"provisioning_status":{"$ref":"#/components/schemas/Automations.LaunchDarklyTriggerProvisioningStatus"},"provisioning_error":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Automations.LaunchDarklyAutomationTriggerInput":{"type":"object","required":["id","type","project_key","conditions"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["launchdarkly"]},"project_key":{"$ref":"#/components/schemas/Automations.LaunchDarklyProjectKey"},"environment_key":{"anyOf":[{"$ref":"#/components/schemas/Automations.LaunchDarklyEnvironmentKey"},{"type":"null"}],"default":null},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LaunchDarklyCondition"},"maxItems":20}}},"Automations.LaunchDarklyCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"$ref":"#/components/schemas/Automations.LaunchDarklyConditionField"},"operator":{"$ref":"#/components/schemas/Automations.LaunchDarklyConditionOperator"},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText"}}},"Automations.LaunchDarklyConditionField":{"type":"string","enum":["flag_key","action","member_email","comment"]},"Automations.LaunchDarklyConditionOperator":{"type":"string","enum":["equals","not_equals","contains","starts_with"]},"Automations.LaunchDarklyEnvironmentKey":{"type":"string","maxLength":256,"pattern":"^[a-zA-Z0-9_.-]*$"},"Automations.LaunchDarklyProjectKey":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[a-zA-Z0-9_.-]+$"},"Automations.LaunchDarklyTriggerProvisioningStatus":{"type":"string","enum":["pending","active","error","deleted"]},"Automations.PrCommentAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","conditions"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["pull_request_comment"]},"enabled":{"type":"boolean"},"watched_repository":{"type":"string","description":"Repository id of the watched repository."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPrCommentCondition"},"description":"All conditions must match. Empty matches every new PR comment, including bot comments."}}},"Automations.PrCommentAutomationTriggerInput":{"type":"object","required":["id","type","watched_repository"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["pull_request_comment"]},"watched_repository":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId","description":"Repository id of the watched repository."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPrCommentCondition"},"maxItems":20,"description":"All conditions must match. Empty matches every new PR comment, including bot comments. When omitted, defaults to `[{ \"field\": \"author_type\", \"operator\": \"equals\", \"value\": \"human\" }]` (human-authored comments only).","default":[{"field":"author_type","operator":"equals","value":"human"}]}}},"Automations.PushAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","file_patterns","branch"],"properties":{"id":{"type":"string","description":"Stable trigger identifier."},"type":{"type":"string","enum":["push"]},"enabled":{"type":"boolean"},"watched_repository":{"type":"string","description":"Repository id watched by a push trigger."},"file_patterns":{"type":"array","items":{"type":"string"},"description":"File globs matched by a push trigger."},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact branch matched by a push trigger, or null for any branch."}}},"Automations.PushAutomationTriggerInput":{"type":"object","required":["id","type","watched_repository","file_patterns"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["push"]},"watched_repository":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId","description":"Repository id of the watched repository."},"file_patterns":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationFilePattern"},"minItems":1,"description":"File globs matched against changed paths."},"branch":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationBranchName"},{"type":"null"}],"description":"Optional exact branch name.","default":null}}},"Automations.SentryAutomationTrigger":{"type":"object","required":["id","type","enabled","installation_id"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["sentry"]},"enabled":{"type":"boolean"},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inspect Sentry organization id to accept alerts from. Null accepts alerts from every connected Sentry organization."}}},"Automations.SentryAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["sentry"]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":64,"description":"Inspect Sentry organization id to accept alerts from. Omit or use null to accept alerts from every connected Sentry organization.","default":null}}},"Automations.SlackAutomationCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.SlackTextCondition"},{"$ref":"#/components/schemas/Automations.SlackThreadCondition"},{"$ref":"#/components/schemas/Automations.SlackSenderCondition"},{"$ref":"#/components/schemas/Automations.SlackSenderTypeCondition"},{"$ref":"#/components/schemas/Automations.SlackMentionsCondition"},{"$ref":"#/components/schemas/Automations.SlackReactionCondition"},{"$ref":"#/components/schemas/Automations.SlackUserCondition"}],"description":"A typed Slack event condition. Conditions on one trigger are ANDed; values or entities inside one condition use the operator semantics."},"Automations.SlackAutomationConditionInput":{"anyOf":[{"$ref":"#/components/schemas/Automations.SlackTextCondition"},{"$ref":"#/components/schemas/Automations.SlackThreadCondition"},{"$ref":"#/components/schemas/Automations.SlackSenderConditionInput"},{"$ref":"#/components/schemas/Automations.SlackSenderTypeCondition"},{"$ref":"#/components/schemas/Automations.SlackMentionsConditionInput"},{"$ref":"#/components/schemas/Automations.SlackReactionCondition"},{"$ref":"#/components/schemas/Automations.SlackUserConditionInput"}],"description":"A typed Slack event condition. Conditions on one trigger are ANDed; values or entities inside one condition use the operator semantics."},"Automations.SlackAutomationEntityRef":{"type":"object","required":["kind","id","aliases"],"properties":{"kind":{"type":"string","enum":["user","app"]},"id":{"$ref":"#/components/schemas/Automations.SlackEntityId","description":"Canonical Slack user, app, or bot id."},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackEntityId"},"maxItems":10,"description":"Equivalent Slack identity ids accepted by this entity."}},"description":"A Slack user or app identity. Aliases allow one app to match its app, bot, or bot-user ids. `user` ids start with U or W; `app` ids start with A or B."},"Automations.SlackAutomationEntityRefInput":{"type":"object","required":["kind","id"],"properties":{"kind":{"type":"string","enum":["user","app"]},"id":{"$ref":"#/components/schemas/Automations.SlackEntityId","description":"Canonical Slack user, app, or bot id."},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackEntityId"},"maxItems":10,"description":"Equivalent Slack identity ids accepted by this entity."}},"description":"A Slack user or app identity. Aliases allow one app to match its app, bot, or bot-user ids. `user` ids start with U or W; `app` ids start with A or B."},"Automations.SlackAutomationEvent":{"type":"string","enum":["message","reaction_added"]},"Automations.SlackAutomationTrigger":{"type":"object","required":["id","type","enabled","event","channel_ids","conditions"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["slack"]},"enabled":{"type":"boolean"},"event":{"$ref":"#/components/schemas/Automations.SlackAutomationEvent","description":"Slack event type matched by a Slack trigger."},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Slack channel ids watched by a Slack trigger."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationCondition"},"description":"Conditions matched by a Slack trigger. Message and reaction events support different condition fields."}}},"Automations.SlackAutomationTriggerInput":{"type":"object","required":["id","type","event","channel_ids","conditions"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["slack"]},"event":{"$ref":"#/components/schemas/Automations.SlackAutomationEvent","description":"Slack event type to match."},"channel_ids":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackChannelId"},"minItems":1,"maxItems":100,"description":"Slack channel ids to watch."},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationConditionInput"},"maxItems":20,"description":"Every condition must be valid for the selected event."}}},"Automations.SlackChannelId":{"type":"string","pattern":"^[CGcg][A-Za-z0-9]{8,}$"},"Automations.SlackEntityId":{"type":"string","pattern":"^[ABUWabuw][A-Za-z0-9]{8,}$"},"Automations.SlackMentionsCondition":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["mentions"]},"operator":{"type":"string","enum":["includes_any","includes_all","includes_none"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRef"},"minItems":1,"maxItems":100}}},"Automations.SlackMentionsConditionInput":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["mentions"]},"operator":{"type":"string","enum":["includes_any","includes_all","includes_none"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRefInput"},"minItems":1,"maxItems":100}}},"Automations.SlackReactionCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["reaction"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackReactionName"},"minItems":1,"maxItems":100}}},"Automations.SlackReactionName":{"type":"string","minLength":1,"maxLength":100,"pattern":"^:?[a-zA-Z0-9_+-]+:?$"},"Automations.SlackSenderCondition":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["sender"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRef"},"minItems":1,"maxItems":100}}},"Automations.SlackSenderConditionInput":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["sender"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRefInput"},"minItems":1,"maxItems":100}}},"Automations.SlackSenderTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["sender_type"]},"operator":{"type":"string","enum":["equals","not_equals"]},"value":{"type":"string","enum":["human","bot"]}}},"Automations.SlackTextCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["text"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator"},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText"}}},"Automations.SlackThreadCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["thread"]},"operator":{"type":"string","enum":["equals","not_equals"]},"value":{"type":"string","enum":["reply","top_level"]}}},"Automations.SlackUserCondition":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["user"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRef"},"minItems":1,"maxItems":100}}},"Automations.SlackUserConditionInput":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["user"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRefInput"},"minItems":1,"maxItems":100}}},"Automations.StatusCheckAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","branch","check_names","results"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["status_check"]},"enabled":{"type":"boolean"},"watched_repository":{"type":"string","description":"Repository id of the watched repository."},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact branch to watch, or null for any branch."},"check_names":{"type":"array","items":{"type":"string"},"description":"Check names to match. Empty matches every check."},"results":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubStatusCheckResult"},"description":"Check results that start the automation."}}},"Automations.StatusCheckAutomationTriggerInput":{"type":"object","required":["id","type","watched_repository","results"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation."},"enabled":{"type":"boolean","default":true},"type":{"type":"string","enum":["status_check"]},"watched_repository":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId","description":"Repository id of the watched repository."},"branch":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationBranchName"},{"type":"null"}],"description":"Optional exact branch name.","default":null},"check_names":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationCheckName"},"maxItems":50,"description":"Check names to match. Empty matches every check.","default":[]},"results":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubStatusCheckResult"},"minItems":1,"description":"Check results that start the automation."}}},"Automations.TriggerAutomationRequest":{"type":"object","properties":{"variables":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Template variable overrides (string values only)"}}},"Automations.UpdateAutomationRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500},"prompt":{"type":"string","minLength":1,"maxLength":100000},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId"},"minItems":1},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationTriggerInput"},"description":"Replacement trigger definitions. Pass an empty array for manual-only. Preserve ids for retained triggers; any trigger type may appear multiple times."},"slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"slack_fanout_destinations":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackFanoutDestinationInput"},"maxItems":50,"description":"Replacement purpose-routed destination list. Use this when an automation description/update says things like \"[#C03KH3AGN2G](slack://channel?team=T039LN97R&id=C03KH3AGN2G) - mobile app related issues or minor improvements\". Each entry means results matching that purpose may post to that channel."},"post_to_slack_on_start":{"type":"boolean","description":"Whether automation sessions post to Slack when they start."},"slack_mention_users":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackMentionInput"},"description":"Replacement list of Slack users and user groups to mention in automation posts."},"notify_collaborators_on_merge":{"type":"boolean","description":"When true, automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available."},"run_as":{"$ref":"#/components/schemas/Automations.AutomationRunAs","description":"Identity automation sessions run as: `owner` (the automation owner) or `inspect` (the Inspect system user). Only the owner can change this."},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationUserId"},"description":"Replacement collaborator list. Collaborators can view and edit this automation from Automations. The owner is always included and ignored if passed here."},"model_id":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"type":"string"},{"type":"null"}],"description":"Must be one of the model ids from `GET /api/v2/models`."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"autofix_ci_failures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null resolves to the owner user setting and is stored explicitly."},"auto_review_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null resolves to false and is stored explicitly."},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicyInput"},{"type":"null"}],"description":"Policy applied to sessions. Null restores fallback to the owner user setting."},"enabled":{"type":"boolean","description":"Whether automatic triggers are active. Ignored when the automation is manual-only."},"template_variables":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableDefinitionInput"},"description":"Template variable definitions keyed by variable name."}},"description":"Updates an automation. Only provided fields are changed. The triggers field replaces the ordered list; preserve ids for retained triggers."},"Deployments.DeploymentReport":{"type":"object","required":["github_repository","pull_request_numbers"],"properties":{"github_repository":{"type":"string","description":"Lowercased `owner/repo`."},"pull_request_numbers":{"type":"array","items":{"$ref":"#/components/schemas/Deployments.PullRequestNumber"}}}},"Deployments.DeploymentStatus":{"type":"string","enum":["deployed","failed"]},"Deployments.PullRequestNumber":{"type":"integer","format":"int64","exclusiveMinimum":0},"Deployments.ReportDeploymentRequest":{"type":"object","required":["pull_request_numbers","status"],"properties":{"pull_request_numbers":{"type":"array","items":{"$ref":"#/components/schemas/Deployments.PullRequestNumber"},"minItems":1,"maxItems":500,"description":"Pull requests the deployment applies to. Values must be unique.","uniqueItems":true},"status":{"$ref":"#/components/schemas/Deployments.DeploymentStatus"},"environment":{"type":"string","minLength":1,"maxLength":200,"description":"Optional caller-defined environment, shown in notifications and never a completion gate. Omission uses the storage key `default`.","examples":["production"]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Optional deployment failure details."},"occurred_at":{"type":"string","format":"date-time","description":"When the deployment transition occurred. Defaults to receipt time."}},"description":"Unknown properties are rejected.","additionalProperties":false},"Deployments.RepositoryPathSegment":{"type":"string","pattern":"^[^/\\s]+$"},"Error":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Machine-readable error code, for example `session_not_found`. Null when the error has no specific code."}}},"Memories.ArchiveMemoryRequest":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/Memories.MemoryArchiveReason"}}},"Memories.CreateMemoryRequest":{"type":"object","required":["title","content","description","memory_type","scope"],"properties":{"title":{"$ref":"#/components/schemas/Memories.MemoryTitle"},"content":{"$ref":"#/components/schemas/Memories.MemoryContent","description":"Canonical Markdown body. Directive memories must be at most 2000 characters so they can be injected in full."},"description":{"$ref":"#/components/schemas/Memories.MemoryDescription"},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType"},"scope":{"$ref":"#/components/schemas/Memories.MemoryScopeType"},"scope_id":{"$ref":"#/components/schemas/Memories.MemoryUserId","description":"Not supported for personal memories. Any value is rejected with 400."}}},"Memories.CreatedMemory":{"type":"object","required":["memory","scope"],"properties":{"memory":{"$ref":"#/components/schemas/Memories.Memory"},"scope":{"$ref":"#/components/schemas/Memories.MemoryScope"}}},"Memories.Memory":{"type":"object","required":["id","title","content","description","memory_type","archived_at","archived_reason"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"content":{"type":"string","description":"Canonical Markdown body."},"description":{"type":"string","description":"Standalone discovery summary."},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archived_reason":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Memories.MemoryArchiveReason":{"type":"string","minLength":1,"maxLength":500},"Memories.MemoryCatalogEntry":{"type":"object","required":["id","title","description","content","memory_type","updated_at","scope"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","description":"Standalone discovery summary."},"content":{"type":"string","description":"Canonical Markdown body."},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType"},"updated_at":{"type":"string","format":"date-time"},"scope":{"$ref":"#/components/schemas/Memories.MemoryScope"}}},"Memories.MemoryContent":{"type":"string","minLength":1,"maxLength":20000},"Memories.MemoryContext":{"type":"object","required":["scopes","directives","facts"],"properties":{"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryScope"},"description":"Scopes the returned memories were read from."},"directives":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryCatalogEntry"},"description":"Always-on behavioral directives that apply in the requested scopes."},"facts":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryCatalogEntry"},"description":"Fact memories available for discovery in the requested scopes."}}},"Memories.MemoryDescription":{"type":"string","minLength":10,"maxLength":420},"Memories.MemoryDetails":{"type":"object","required":["memory","scopes"],"properties":{"memory":{"$ref":"#/components/schemas/Memories.Memory"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryScope"}}}},"Memories.MemoryDirectiveLimit":{"type":"integer","format":"int32","minimum":1,"maximum":25},"Memories.MemoryFactLimit":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Memories.MemoryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryCatalogEntry"},"description":"Directives first, then facts, each most recently updated first."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Memories.MemoryResult":{"type":"object","required":["memory"],"properties":{"memory":{"$ref":"#/components/schemas/Memories.Memory"}}},"Memories.MemoryScope":{"type":"object","required":["type","id"],"properties":{"type":{"$ref":"#/components/schemas/Memories.MemoryScopeType"},"id":{"type":"string","description":"User id."}}},"Memories.MemoryScopeType":{"type":"string","enum":["personal"]},"Memories.MemoryTitle":{"type":"string","minLength":1,"maxLength":200},"Memories.MemoryType":{"type":"string","enum":["fact","directive"]},"Memories.MemoryUserId":{"type":"string","minLength":1},"Memories.UpdateMemoryRequest":{"type":"object","required":["title","content","description","memory_type"],"properties":{"title":{"$ref":"#/components/schemas/Memories.MemoryTitle"},"content":{"$ref":"#/components/schemas/Memories.MemoryContent","description":"Canonical Markdown body. Directive memories must be at most 2000 characters so they can be injected in full."},"description":{"$ref":"#/components/schemas/Memories.MemoryDescription"},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType"}}},"Models.Model":{"type":"object","required":["id","name","description","aliases","supported_variants","visibility"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Stable shorthand aliases that resolve to this model."},"supported_variants":{"type":"array","items":{"$ref":"#/components/schemas/Models.ModelVariant"},"description":"Reasoning variants accepted for this model. Empty when the model does not support configurable reasoning."},"visibility":{"$ref":"#/components/schemas/Models.ModelVisibility","description":"Whether the model is shown in model pickers: visible to everyone, hidden from everyone, or eap (shown only to early-access users)."}}},"Models.ModelAlias":{"type":"string","enum":["opus","sonnet","haiku","fable","gemini","gemini-pro","gemini-flash","gemini-flash-lite","gemini-3.5-flash","gpt","gpt-6","astra","gpt-5","balanced","frontier","sol","terra","luna","codex","grok","kimi","glm","glm-fast","minimax","qwen","deepseek","muse-wonder","muse-spark"],"description":"Stable shorthand aliases that resolve to a model ID."},"Models.ModelId":{"type":"string","enum":["claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-opus-4-5-20251101","claude-sonnet-5-5","claude-sonnet-5","claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-haiku-5-5","claude-haiku-4-5-20251001","claude-fable-5-1","claude-fable-5","gpt-6-astra","gpt-6.1-sol","gpt-6.1-terra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5","gpt-5.4","gpt-5.3-codex-api-preview","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4-mini","gpt-5.4-nano","gpt-5.2-codex-medium","gpt-5.2-codex-high","gpt-5.2-codex-xhigh","gpt-5.2-medium","gpt-5.2-high","gpt-5.2-xhigh","gpt-5.2-pro-high","gemini-4-argon","gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3-pro-preview","gemini-3-flash-preview","gemini-3.5-flash","gemini-3.6-flash","gemini-3.5-flash-lite","gemini-flash-early-exp2","gemini-pro-early-exp","grok-4.7","grok-4.5","grok-code-fast-1","zai-glm-4.7","zai-glm-4.6","moonshotai/kimi-k2-instruct-0905","accounts/fireworks/models/kimi-k3","accounts/fireworks/routers/kimi-k3-fast","kimi-k2p7-code","kimi-k2p7-code-fast","kimi-k2p6","kimi-k2p6-turbo","accounts/fireworks/routers/kimi-k2p5-turbo","accounts/fireworks/routers/glm-5-fast","glm-5p3","accounts/fireworks/models/glm-5p2","accounts/fireworks/routers/glm-5p2-fast","accounts/fireworks/routers/glm-5p1-fast","minimax-m3","accounts/fireworks/models/minimax-m2p5","qwen3p8-max","accounts/fireworks/models/qwen3p6-plus","deepseek-v4.1-flash-1017","accounts/fireworks/models/deepseek-v4-flash-0731","accounts/fireworks/models/deepseek-v4-pro","kimi-k3-modal","muse-wonder-1.0","muse-spark-1.3"],"description":"Model IDs known to Inspect."},"Models.ModelList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Models.Model"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Models.ModelVariant":{"type":"string","enum":["low","medium","high","xhigh","max","minimal","none"]},"Models.ModelVisibility":{"type":"string","enum":["visible","hidden","eap"]},"Operate.OperateDigest":{"type":"object","required":["id","title","body","source_session_id","created_at"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string","description":"Markdown."},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}}},"Operate.OperateDigestList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateDigest"},"description":"Newest first."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateHomeSession":{"type":"object","required":["session_id"],"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The home session id, or null when the user has none. Read its messages with the Sessions operations."}},"description":"The API key user's active Operate home session."},"Operate.OperateJournalEntry":{"type":"object","required":["task_key","title","body","source_session_id","created_at","updated_at","expires_at"],"properties":{"task_key":{"type":"string","description":"The task key, for example a pull request URL."},"title":{"type":"string"},"body":{"type":"string","description":"Markdown."},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time","description":"30 days after the last write. Expired entries are not returned."}},"description":"The outcome of Operate's background work, such as a post-merge check. Each task key has one entry."},"Operate.OperateJournalEntryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateJournalEntry"},"description":"Most recently written first."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateMemoryAuthor":{"type":"string","enum":["agent","extract"],"description":"Who wrote a memory file version."},"Operate.OperateMemoryFile":{"type":"object","required":["path","kind","version","contents","author","session_id"],"properties":{"path":{"type":"string"},"kind":{"$ref":"#/components/schemas/Operate.OperateMemoryFileKind"},"version":{"type":"integer","format":"int32"},"contents":{"type":"string","description":"The latest version's contents. Memories start with `---` front matter (status, source, dates)."},"author":{"anyOf":[{"$ref":"#/components/schemas/Operate.OperateMemoryAuthor"},{"type":"null"}],"description":"Who wrote the latest version: `agent` (Operate's memory tools) or `extract` (Inspect's background memory extraction). Null when unknown, such as for older versions."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The session that wrote the latest version, when known."}}},"Operate.OperateMemoryFileKind":{"type":"string","enum":["soul","memory","other"],"description":"`soul` is `SOUL.md`, `memory` is `memory/<slug>.md`, and `other` is any other file."},"Operate.OperateMemoryFileList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateMemoryFileSummary"},"description":"`SOUL.md` first, then memories and other files by path. Deleted memories are left out."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateMemoryFileSummary":{"type":"object","required":["path","kind","version","updated_at","author","session_id"],"properties":{"path":{"type":"string"},"kind":{"$ref":"#/components/schemas/Operate.OperateMemoryFileKind"},"version":{"type":"integer","format":"int32"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"author":{"anyOf":[{"$ref":"#/components/schemas/Operate.OperateMemoryAuthor"},{"type":"null"}],"description":"Who wrote the latest version: `agent` (Operate's memory tools) or `extract` (Inspect's background memory extraction). Null when unknown, such as for older versions."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The session that wrote the latest version, when known."}},"description":"A file in the user's Operate memory, without its contents."},"Operate.OperatePin":{"type":"object","required":["id","kind","title","url","body","topic","source_session_id","created_at","updated_at"],"properties":{"id":{"type":"string"},"kind":{"$ref":"#/components/schemas/Operate.OperatePinKind"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"topic":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"description":"A link or note that Operate pinned on the Operate page."},"Operate.OperatePinKind":{"type":"string","enum":["link","note"]},"Operate.OperatePinList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperatePin"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateSchedule":{"type":"object","required":["id","name","cron_expression","timezone","prompt","enabled","next_run_at","last_run_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"cron_expression":{"type":"string"},"timezone":{"type":"string"},"prompt":{"type":"string"},"enabled":{"type":"boolean"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"description":"A recurring wake of the home session that Operate manages, such as the digest."},"Operate.OperateScheduleList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateSchedule"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateWorkItem":{"type":"object","required":["id","title","status","kind","created_at"],"properties":{"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/Operate.OperateWorkStatus"},"kind":{"$ref":"#/components/schemas/Operate.OperateWorkKind"},"created_at":{"type":"string","format":"date-time"}}},"Operate.OperateWorkKind":{"type":"string","enum":["thread","session"],"description":"`thread` is a private Operate thread of the home session; `session` is a regular Inspect session that Operate started."},"Operate.OperateWorkList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateWorkItem"},"description":"The 50 newest open threads and sessions. Empty when the user has no home session."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateWorkStatus":{"type":"string","enum":["pending","running","finished","failed"]},"Pagination.PageMeta":{"type":"object","required":["next_cursor","previous_cursor","has_next_page","has_previous_page"],"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the last item in this page. Pass as `after` to fetch the next page. Null when the page is empty."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the first item in this page. Null when the page is empty."},"has_next_page":{"type":"boolean","description":"Whether more results exist after this page."},"has_previous_page":{"type":"boolean","description":"Whether results exist before this page."}}},"Previews.HttpUrl":{"type":"string","format":"uri","maxLength":2048,"description":"An http or https URL."},"Previews.PreviewName":{"type":"string","maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z][a-z0-9]*)*$","description":"Preview name chosen by the caller, e.g. `default` or `storybook`. Lowercase kebab-case where each segment starts with a letter, at most 64 characters. The `default` preview is the session's primary preview."},"Previews.PreviewStatus":{"type":"string","enum":["deploying","deployed","failed"]},"Previews.PullRequestNumber":{"type":"integer","format":"int64","exclusiveMinimum":0},"Previews.PullRequestPreview":{"type":"object","required":["name","label","status","url","commit_sha","deployed_commit_sha","last_succeeded_at","job_url","error","occurred_at"],"properties":{"name":{"type":"string","description":"Preview name"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name for the preview"},"status":{"$ref":"#/components/schemas/Previews.PreviewStatus","description":"Most recently reported status"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Last successfully deployed URL, kept while a newer deploy is in progress or has failed"},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit of the most recently reported status"},"deployed_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit the `url` was built from"},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the preview last deployed successfully"},"job_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Link to the CI job or run"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure details for a failed status"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the most recently reported status occurred"}}},"Previews.PullRequestPreviewList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Previews.PullRequestPreview"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Previews.UpsertPullRequestPreviewRequest":{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/Previews.PreviewStatus"},"url":{"anyOf":[{"$ref":"#/components/schemas/Previews.HttpUrl"},{"type":"null"}],"description":"Preview URL (http or https). Required when `status` is `deployed`."},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":64,"description":"Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated."},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":100,"description":"Display name for the preview. Omit to keep the current label."},"job_url":{"anyOf":[{"$ref":"#/components/schemas/Previews.HttpUrl"},{"type":"null"}],"description":"Link to the CI job or run."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Failure details, recorded when `status` is `failed`."},"occurred_at":{"type":"string","format":"date-time","description":"When the status change occurred. Defaults to receipt time."}},"description":"Unknown properties are rejected.","additionalProperties":false},"Previews.UpsertedPullRequestPreview":{"type":"object","required":["name","label","status","url","commit_sha","deployed_commit_sha","last_succeeded_at","job_url","error","occurred_at","session_ids"],"properties":{"name":{"type":"string","description":"Preview name"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name for the preview"},"status":{"$ref":"#/components/schemas/Previews.PreviewStatus","description":"Most recently reported status"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Last successfully deployed URL, kept while a newer deploy is in progress or has failed"},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit of the most recently reported status"},"deployed_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit the `url` was built from"},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the preview last deployed successfully"},"job_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Link to the CI job or run"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure details for a failed status"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the most recently reported status occurred"},"session_ids":{"type":"array","items":{"type":"string"},"description":"Sessions updated by this request. Empty when no session is linked to the pull request or the update was older than the stored status."}}},"Repositories.Repository":{"type":"object","required":["id","name","description","organization","remote","github_host","base_branch","auto_match_enabled"],"properties":{"id":{"type":"string","description":"Repository identifier"},"name":{"type":"string","description":"Repository name"},"description":{"type":"string","description":"Repository description"},"organization":{"type":"string","description":"GitHub organization or owner for this repository."},"remote":{"$ref":"#/components/schemas/Repositories.RepositoryRemote"},"github_host":{"type":"string","enum":["github"],"description":"Compatibility host key for this GitHub.com repository."},"base_branch":{"type":"string","description":"Default branch for the repository"},"auto_match_enabled":{"type":"boolean","description":"Whether repository inference may select this repository without an explicit directive or URL"}},"description":"A repository configured in Inspect."},"Repositories.RepositoryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Repositories.Repository"}},"meta":{"$ref":"#/components/schemas/Repositories.RepositoryListMeta"}}},"Repositories.RepositoryListMeta":{"type":"object","required":["next_cursor","previous_cursor","has_next_page","has_previous_page","suggested"],"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the last item in this page. Pass as `after` to fetch the next page. Null when the page is empty."},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the first item in this page. Null when the page is empty."},"has_next_page":{"type":"boolean","description":"Whether more results exist after this page."},"has_previous_page":{"type":"boolean","description":"Whether results exist before this page."},"suggested":{"type":"array","items":{"type":"string"},"description":"IDs of the repositories the user has used most, most used first. Up to five; always empty for system API keys."}}},"Repositories.RepositoryRemote":{"type":"string","enum":["github","codestorage"],"description":"Backing remote type for the repository"},"Sessions.ApiCallbackDataSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]}},"unevaluatedProperties":{}},"Sessions.ApprovalProviderStatus":{"type":"string","enum":["not_started","pending","success","ineligible","unavailable","failed","stale"]},"Sessions.ApprovalPublication":{"type":"object","required":["source_sequence","generation","publication_sequence","head_sha","base_branch"],"properties":{"source_sequence":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"publication_sequence":{"type":"integer","minimum":0},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}]},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Sessions.ApprovalRationale":{"type":"object","required":["version","sections"],"properties":{"version":{"type":"number","enum":[1]},"sections":{"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"status":{"type":"string","enum":["passed","failed","pending","not_completed","neutral"]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"session_ids":{"type":"array","items":{"type":"string"}},"details":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"values":{"type":"array","items":{"type":"string"}}},"required":["label","text","values"]}}},"required":["title","status","summary","session_ids","details"]}}},"required":["title","items"]}}}},"Sessions.ApprovalStatus":{"type":"object","required":["stamp_buddy","smart_reviewer"],"properties":{"stamp_buddy":{"anyOf":[{"$ref":"#/components/schemas/Sessions.StampBuddyApprovalStatus"},{"type":"null"}]},"smart_reviewer":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SmartReviewerApprovalStatus"},{"type":"null"}]}}},"Sessions.AssistantMessage":{"type":"object","required":["role","id","created_at","completed_at","model_id","parts"],"properties":{"role":{"type":"string","enum":["assistant"]},"id":{"type":"string","description":"Unique message identifier"},"created_at":{"type":"string","format":"date-time","description":"When the agent started the message"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the agent finished the message. Null for the latest message while the session is still running."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model that produced the message, or null when unknown"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.MessagePart"},"description":"Content parts that make up the message, in the order the agent produced them"}},"description":"The agent's response to a user turn."},"Sessions.AutoApprovalStatus":{"type":"string","enum":["pending","available","approved","ineligible","shadow","inactive","unavailable","stale"]},"Sessions.ContextualActionKey":{"type":"string","enum":["send_prompt","request_review","merge_when_ready","archive_session"]},"Sessions.CreateSessionMultipartRequest":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Sessions.CreateSessionRequest"}],"description":"JSON-encoded create session request."},"attachments":{"type":"array","items":{},"description":"Optional file attachments."}},"required":["data"]},"Sessions.CreateSessionRequest":{"type":"object","required":["repository"],"properties":{"review_buddy_reviewers":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.ReviewBuddyReviewer"},"description":"Optional Review agent reviewers. Each model must be available to the caller and support the requested reasoning effort."},"repository":{"type":"string","minLength":1,"description":"The repository to create the session for. Use \"auto\" to infer the best repository from the prompt."},"prompt":{"type":"string","description":"The initial prompt for the session. At least one of prompt, attachments, or agent_context is required."},"title":{"type":"string","description":"Optional title for the session. When omitted, Inspect generates one from the creation request."},"no_reply":{"type":"boolean","description":"If true, stores the prompt and dispatches the runner silently without posting an assistant reply back into the session timeline.","default":false},"model":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"$ref":"#/components/schemas/Models.ModelAlias"},{"type":"string"}],"description":"Optional model ID or shorthand alias. An explicit model takes precedence over custom-agent and saved-default models; leave unspecified to use the normal default selection. Use GET /api/v2/models for model IDs and aliases."},"variant":{"$ref":"#/components/schemas/Models.ModelVariant","description":"Optional model variant. Supported values depend on the model; see `supported_variants` in GET /api/v2/models. When omitted, public API automation sessions default gpt-5.6-luna to medium and otherwise use the model's default variant."},"service_tier":{"$ref":"#/components/schemas/Sessions.ModelServiceTier","description":"Optional model service tier. Supported values depend on the selected model; unsupported combinations return 400."},"enabled_skill_ids":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SkillId"},"description":"Optional list of skill IDs to enable for this session in addition to those configured on the caller's user settings, custom agent, or referenced via slash commands in the prompt. Unknown skill IDs are ignored."},"base_branch":{"type":"string","description":"Optional base branch, defaults to the repository's default branch. If provided, Inspect normalizes common Git prefixes and verifies the branch exists on GitHub before creating the session."},"base_commit":{"type":"string","description":"Benchmark mode only (SWE-bench agent). Pins the session to a per-session Code Storage fork of the repository at this commit SHA: full real history up to the commit, no forward history, and no GitHub remote. Required (non-blank) for the SWE-bench agent; ignored for other agents."},"branch":{"type":"string","description":"Optional branch name for the session, only pass this if trying to work on an existing branch"},"pull_request_number":{"type":"number","description":"Optional existing pull request number to associate with this session"},"attach_pull_request":{"type":"boolean","description":"Whether Inspect may automatically associate this session with an existing pull request that matches pull_request_number or branch. Set to false to check out branch without attaching its existing pull request. Pull requests created by this session are still attached. Defaults to true.","default":true},"agent_context":{"type":"string","description":"Optional additional context for the agent that will not appear in user messages. Useful for providing detailed system context or metadata that should inform the agent but not clutter the visible conversation."},"agent_id":{"type":"string","description":"Optional ID of an agent to use for this session. When provided, the session will be configured with the agent's system prompt, model, capability settings, and any repository restrictions. If the agent is limited to a set of repositories, the chosen repository must be within that set. Private agents cannot be started from the public API. Use GET /api/v2/agents to list available agents and their IDs."},"read_only":{"type":"boolean","description":"If true, creates a read-only session where the agent cannot create PRs, push code, or make persistent changes. Useful for Q&A, research, or exploratory tasks.","default":false},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"Controls whether the session appears in discoverable listings and analytics exports. Private sessions remain accessible by direct URL/session ID, but are excluded from list endpoints, public tables, leaderboards, and exports."},"settings":{"$ref":"#/components/schemas/Sessions.CreateSessionSettings","description":"Optional session settings"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.NonEmptyString"},"description":"Optional list of collaborator email addresses to add to the session. Users matching these emails will be added as session participants."},"pull_request_footer":{"type":"string","description":"Optional custom footer text to append to PR descriptions. This will appear between the agent-generated description and the standard Inspect footer."},"commit_prefix":{"type":"string","description":"Optional prefix to prepend to commit messages and PR titles. Useful for linking sessions to external systems like incident trackers or issue management tools."},"pull_request_labels":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.TrimmedNonEmptyString"},"description":"Optional list of GitHub labels to apply to any PR created or adopted by this session. Child sessions inherit these labels automatically."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionTag"},"maxItems":50,"description":"Optional list of tags for grouping and filtering sessions (for example, run IDs, workflow names, or tenant keys)."},"callback_url":{"type":"string","format":"uri","description":"Optional HTTPS webhook URL that the session can call back to via the api_callback tool. The hostname must be allowed by Inspect. When provided, the agent inside the session can send structured events to this URL, proxied through the Inspect API."},"api_callback_data_schema":{"$ref":"#/components/schemas/Sessions.ApiCallbackDataSchema","description":"Optional JSON Schema describing the expected shape of the `data` argument of the `api_callback` tool. Must be an object whose `type`, when present, is `object`. The schema is injected verbatim into the api_callback tool's description so the model knows what payload to send back."},"api_callback_event_types":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.TrimmedNonEmptyString"},"minItems":1,"description":"Optional non-empty list of allowed event_type values for the api_callback tool. When provided, Inspect exposes those values as the tool schema enum and rejects callbacks whose event_type is not in the list.","uniqueItems":true},"on_behalf_of":{"type":"string","format":"email","description":"Optional email address of an existing Inspect user to create the session on behalf of. When provided, the session will be owned by and attributed to this user (including git commits and PR authorship) instead of the API key owner. The user must have logged into Inspect at least once."}}},"Sessions.CreateSessionSettings":{"type":"object","properties":{"ci_failures_enabled":{"type":"boolean","description":"Whether to automatically respond to CI failures for this session. Defaults to user settings or true."},"auto_review_enabled":{"type":"boolean","description":"Whether to automatically review and fix code for this session. Defaults to user settings or false."},"auto_address_pull_request_reviews_policy":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicyInput","description":"Optional per-session automatic PR review addressing policy. When provided, it overrides the session owner's saved policy for reviews associated with this session."}}},"Sessions.DeployStatus":{"type":"string","enum":["succeeded","failed"]},"Sessions.DiffSource":{"type":"string","enum":["local","github"]},"Sessions.Message":{"type":"object","oneOf":[{"$ref":"#/components/schemas/Sessions.UserMessage"},{"$ref":"#/components/schemas/Sessions.AssistantMessage"}],"discriminator":{"propertyName":"role","mapping":{"user":"#/components/schemas/Sessions.UserMessage","assistant":"#/components/schemas/Sessions.AssistantMessage"}},"description":"A message in the session conversation, discriminated by `role`."},"Sessions.MessageList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.Message"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Sessions.MessagePart":{"type":"object","oneOf":[{"$ref":"#/components/schemas/Sessions.MessageTextPart"},{"$ref":"#/components/schemas/Sessions.MessageReasoningPart"},{"$ref":"#/components/schemas/Sessions.MessageToolCallPart"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/Sessions.MessageTextPart","reasoning":"#/components/schemas/Sessions.MessageReasoningPart","tool_call":"#/components/schemas/Sessions.MessageToolCallPart"}},"description":"A content part of a message, discriminated by `type`."},"Sessions.MessageReasoningPart":{"type":"object","required":["type","id","text"],"properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string","description":"Unique part identifier"},"text":{"type":"string"}},"description":"Model reasoning emitted before or between other parts of an assistant message."},"Sessions.MessageSource":{"type":"string","enum":["web","chrome_extension","slack","slack_reaction","github","linear","email","review_chat","automation","background_task","agent","unknown"],"description":"How a user turn was submitted."},"Sessions.MessageTextPart":{"type":"object","required":["type","id","text"],"properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string","description":"Unique part identifier"},"text":{"type":"string"}},"description":"Text written by the user or the agent."},"Sessions.MessageToolCallPart":{"type":"object","required":["type","id","call_id","name","status","input","output","error","started_at","completed_at","subagent"],"properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string","description":"Unique part identifier"},"call_id":{"type":"string","description":"ID the model assigned to the tool call."},"name":{"type":"string","description":"Tool name"},"status":{"type":"string","enum":["running","completed","error"],"description":"`running` until the tool returns, then `completed` or `error`."},"input":{"type":"object","unevaluatedProperties":{},"description":"Tool input arguments. The shape depends on the tool."},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool output when `status` is `completed`, otherwise null."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message when `status` is `error`, otherwise null."},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the tool call started, or null when it has not started."},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the tool returned when `status` is `completed` or `error`, otherwise null."},"subagent":{"anyOf":[{"$ref":"#/components/schemas/Sessions.MessageToolCallSubagent"},{"type":"null"}],"description":"The subagent this tool call started, or null for tool calls that do not run a subagent."}},"description":"A tool call made by the agent, with its input and result."},"Sessions.MessageToolCallSubagent":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Subagent ID. Use it with the subagent messages and cost endpoints of the session."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the agent that ran the subagent, or null when unknown."}},"description":"The subagent a tool call started."},"Sessions.ModelServiceTier":{"type":"string","enum":["default","auto","flex","priority"]},"Sessions.NonEmptyString":{"type":"string","minLength":1},"Sessions.PromptDelivery":{"type":"string","enum":["immediate","queued"]},"Sessions.PullRequestStatus":{"type":"string","enum":["draft","awaiting_review","approved","queued","closed","merged"]},"Sessions.QueuedPrompt":{"type":"object","required":["id","created_at"],"properties":{"id":{"type":"string","description":"Durable queued prompt acceptance handle. There is no per-prompt public lifecycle endpoint yet."},"created_at":{"type":"string","format":"date-time","description":"Timestamp from the persisted Hosted Agent prompt row."}}},"Sessions.ReviewBuddyReviewer":{"type":"object","required":["model","reasoning_effort"],"properties":{"model":{"$ref":"#/components/schemas/Models.ModelId"},"reasoning_effort":{"$ref":"#/components/schemas/Models.ModelVariant"}}},"Sessions.SendPromptMultipartRequest":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Sessions.SendPromptRequest"}],"description":"JSON-encoded prompt request."},"attachments":{"type":"array","items":{},"description":"Optional file attachments."}},"required":["data"]},"Sessions.SendPromptRequest":{"type":"object","properties":{"review_buddy_reviewers":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.ReviewBuddyReviewer"},"description":"Optional Review agent reviewers merged into the session's reviewers. Each model must be available to the caller and support the requested reasoning effort."},"prompt":{"type":"string","description":"The follow-up prompt to accept. At least one of prompt, attachments, or agent_context is required."},"no_reply":{"type":"boolean","description":"If true, stores the prompt and dispatches the runner silently without posting an assistant reply back into the session timeline.","default":false},"model":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"$ref":"#/components/schemas/Models.ModelAlias"},{"type":"string"}],"description":"Optional model ID or shorthand alias to switch to for this prompt. When omitted, the session keeps its current model. Use GET /api/v2/models for model IDs and aliases."},"variant":{"$ref":"#/components/schemas/Models.ModelVariant","description":"Optional model variant. Supported values depend on the model; see `supported_variants` in GET /api/v2/models. Defaults to the session's current variant."},"agent_context":{"type":"string","description":"Optional additional context for the agent that will not appear in user messages."},"commit_prefix":{"type":"string","description":"Optional prefix to prepend to commit messages and PR titles."},"delivery":{"$ref":"#/components/schemas/Sessions.PromptDelivery","description":"`immediate` (default) dispatches the prompt right away. `queued` stores the prompt behind active or outstanding work and returns `queued_prompt` metadata. If an existing session has no outstanding prompts, a queued request is promoted to immediate delivery, `queued_prompt` is omitted, and a dormant sandbox is restarted.","default":"immediate"}}},"Sessions.SendPromptResult":{"type":"object","required":["data","queued_prompt"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"},"queued_prompt":{"anyOf":[{"$ref":"#/components/schemas/Sessions.QueuedPrompt"},{"type":"null"}],"description":"The queued prompt when the prompt remained queued, otherwise null."}}},"Sessions.Session":{"type":"object","required":["id","title","description","status","retryable","visibility","model","user","opening_pull_request","pushing","working_phase","deploy","vnc_url","vnc_expires_at","ota_install_url","ota_qr_code_url","ota_expires_at","has_changes","created_at","finished_at","last_read_at","deleted_at","pull_requests","repositories","branch","base_branch","stack_base_branch","helpfulness","helpfulness_reason","total_input_tokens","total_output_tokens","total_reasoning_tokens","total_cache_read_tokens","total_cache_write_tokens","total_tokens","total_cost","last_user_message_at","parent_session_id","project_id","child_sessions","tags","automation","automation_trigger_source","contextual_actions","settings","viewer_is_owner","read_only","participants","agent","workspace"],"properties":{"id":{"type":"string","description":"Unique identifier for the session"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated title for the session"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated description for the session"},"status":{"$ref":"#/components/schemas/Sessions.SessionStatus","description":"Current status of the session"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the failed operation is expected to succeed if retried. Null unless status is failed; false for archived sessions and failures known to be permanent, otherwise true. Retry mechanics and limits are defined by the calling workflow."},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"Whether this session is discoverable in listings and exports, or only accessible by direct link/session ID."},"model":{"$ref":"#/components/schemas/Sessions.SessionModel"},"user":{"$ref":"#/components/schemas/Sessions.SessionUser"},"opening_pull_request":{"type":"boolean","description":"Whether a PR is currently being opened"},"pushing":{"type":"boolean","description":"Whether changes are currently being pushed"},"working_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current working phase of the agent"},"deploy":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionDeploy"},{"type":"null"}]},"vnc_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"vnc_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ota_install_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"ota_qr_code_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"ota_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"has_changes":{"type":"boolean","description":"Whether the session has uncommitted changes"},"created_at":{"type":"string","format":"date-time","description":"When the session was created"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session finished"},"last_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the API key user last read this session"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session was archived"},"pull_requests":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionPullRequest"},"description":"All current pull requests for the session across its repositories."},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionRepository"},"description":"Per-repository source-control state. The first repository is the launch and deploy anchor."},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Git branch name for the session"},"base_branch":{"type":"string","description":"Base branch for the session"},"stack_base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch this session was explicitly stacked on. Preserved when GitHub retargets the pull request after an upstream merge."},"helpfulness":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"User rating of helpfulness (-1 = not helpful, 0 = neutral, 1 = helpful)"},"helpfulness_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-provided reason for the helpfulness rating"},"total_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Latest persisted total session cost in USD. Null when no usage has been recorded."},"last_user_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last user message was sent"},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the parent session if this is a child session"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Project this session belongs to"},"child_sessions":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionChild"},"description":"Direct child sessions spawned from this session. Always empty in list responses."},"tags":{"type":"array","items":{"type":"string"},"description":"Tags on the session as added by the session owner, or by the `tagged_by` user when that list-endpoint parameter is provided. Tags are per-user; other users' tags are not included."},"automation":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAutomation"},{"type":"null"}],"description":"Automation that created this session, if any. Null for sessions created manually or via the API."},"automation_trigger_source":{"anyOf":[{"type":"string","enum":["scheduled","manual","service_trigger","internal"]},{"type":"null"}],"description":"How the automation run that created this session was triggered. Always null in list responses."},"contextual_actions":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionContextualActions"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/Sessions.SessionSettings","description":"Session settings controlling behavior like notifications"},"viewer_is_owner":{"type":"boolean","description":"Whether the current user owns this session"},"read_only":{"type":"boolean","description":"Whether this is a read-only session where the agent cannot create PRs, push code, or make persistent changes"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionParticipant"},"description":"Users who have participated in this session"},"agent":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAgent"},{"type":"null"}],"description":"Custom agent the session runs with. Always null in list responses."},"workspace":{"$ref":"#/components/schemas/Sessions.SessionWorkspace"}}},"Sessions.SessionAgent":{"type":"object","required":["id","name","model","avatar_url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Sessions.SessionAutomation":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Unique automation identifier"},"name":{"type":"string","description":"Human-readable automation name"}}},"Sessions.SessionChild":{"type":"object","required":["id","title","name","status","created_at"],"properties":{"id":{"type":"string","description":"Child session identifier"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Child session title"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Child session name, or null when the child session has no name"},"status":{"$ref":"#/components/schemas/Sessions.SessionStatus","description":"Current status of the child session"},"created_at":{"type":"string","format":"date-time","description":"When the child session was created"}}},"Sessions.SessionContextualActions":{"type":"object","required":["source_assistant_message_id","suggestions"],"properties":{"source_assistant_message_id":{"type":"string"},"suggestions":{"type":"array","items":{"type":"object","properties":{"action_key":{"$ref":"#/components/schemas/Sessions.ContextualActionKey"},"label":{"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull_request_number":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["action_key","label","prompt","repository","pull_request_number"]}}}},"Sessions.SessionCost":{"type":"object","required":["session_id","message_count","total_input_tokens","total_output_tokens","total_reasoning_tokens","total_cache_read_tokens","total_cache_write_tokens","total_tokens","total_cost","updated_at"],"properties":{"session_id":{"type":"string","description":"Unique identifier for the session"},"message_count":{"type":"integer","description":"Number of assistant messages included in the refreshed cost rollup. Always 0 for Laminar-runtime sessions."},"total_input_tokens":{"type":"integer","description":"Input tokens, including cache read and cache write tokens"},"total_output_tokens":{"type":"integer","description":"Output tokens, including reasoning tokens"},"total_reasoning_tokens":{"type":"integer","description":"Reasoning output tokens"},"total_cache_read_tokens":{"type":"integer","description":"Cache read input tokens"},"total_cache_write_tokens":{"type":"integer","description":"Cache write input tokens"},"total_tokens":{"type":"integer","description":"Total tokens included in the refreshed cost rollup"},"total_cost":{"type":"number","format":"double","description":"Total session cost in USD"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the cost rollup was last refreshed. Null when no usage has been recorded."}}},"Sessions.SessionDeploy":{"type":"object","required":["active","url","commit_sha","latest_commit_sha","last_succeeded_at","last_attempt_status","last_attempt_commit_sha","last_attempt_started_at","timed_out","outdated"],"properties":{"active":{"type":"boolean","description":"Whether a deploy has been attempted"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the deployed preview"},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit SHA of the last successful deploy"},"latest_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Latest commit SHA pushed to the branch"},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last successful deploy occurred"},"last_attempt_status":{"anyOf":[{"$ref":"#/components/schemas/Sessions.DeployStatus"},{"type":"null"}],"description":"Status of the latest completed deploy attempt"},"last_attempt_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit SHA of the latest completed deploy attempt"},"last_attempt_started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Unix timestamp in milliseconds when the latest deploy attempt started"},"timed_out":{"type":"boolean","description":"Whether the latest preview deploy did not report completion in time"},"outdated":{"type":"boolean","description":"Whether the preview is outdated (deployed commit differs from latest pushed commit)"}},"description":"Deploy preview state"},"Sessions.SessionDetail":{"type":"object","required":["id","title","description","status","retryable","visibility","model","user","opening_pull_request","pushing","working_phase","deploy","vnc_url","vnc_expires_at","ota_install_url","ota_qr_code_url","ota_expires_at","has_changes","created_at","finished_at","last_read_at","deleted_at","pull_requests","repositories","branch","base_branch","stack_base_branch","helpfulness","helpfulness_reason","total_input_tokens","total_output_tokens","total_reasoning_tokens","total_cache_read_tokens","total_cache_write_tokens","total_tokens","total_cost","last_user_message_at","parent_session_id","project_id","child_sessions","tags","automation","automation_trigger_source","contextual_actions","settings","viewer_is_owner","read_only","participants","agent","workspace","slack_thread_permalink"],"properties":{"id":{"type":"string","description":"Unique identifier for the session"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated title for the session"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated description for the session"},"status":{"$ref":"#/components/schemas/Sessions.SessionStatus","description":"Current status of the session"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the failed operation is expected to succeed if retried. Null unless status is failed; false for archived sessions and failures known to be permanent, otherwise true. Retry mechanics and limits are defined by the calling workflow."},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"Whether this session is discoverable in listings and exports, or only accessible by direct link/session ID."},"model":{"$ref":"#/components/schemas/Sessions.SessionModel"},"user":{"$ref":"#/components/schemas/Sessions.SessionUser"},"opening_pull_request":{"type":"boolean","description":"Whether a PR is currently being opened"},"pushing":{"type":"boolean","description":"Whether changes are currently being pushed"},"working_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current working phase of the agent"},"deploy":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionDeploy"},{"type":"null"}]},"vnc_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"vnc_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ota_install_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"ota_qr_code_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"ota_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"has_changes":{"type":"boolean","description":"Whether the session has uncommitted changes"},"created_at":{"type":"string","format":"date-time","description":"When the session was created"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session finished"},"last_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the API key user last read this session"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session was archived"},"pull_requests":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionPullRequest"},"description":"All current pull requests for the session across its repositories."},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionRepository"},"description":"Per-repository source-control state. The first repository is the launch and deploy anchor."},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Git branch name for the session"},"base_branch":{"type":"string","description":"Base branch for the session"},"stack_base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch this session was explicitly stacked on. Preserved when GitHub retargets the pull request after an upstream merge."},"helpfulness":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"User rating of helpfulness (-1 = not helpful, 0 = neutral, 1 = helpful)"},"helpfulness_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-provided reason for the helpfulness rating"},"total_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Latest persisted total session cost in USD. Null when no usage has been recorded."},"last_user_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last user message was sent"},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the parent session if this is a child session"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Project this session belongs to"},"child_sessions":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionChild"},"description":"Direct child sessions spawned from this session. Always empty in list responses."},"tags":{"type":"array","items":{"type":"string"},"description":"Tags on the session as added by the session owner, or by the `tagged_by` user when that list-endpoint parameter is provided. Tags are per-user; other users' tags are not included."},"automation":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAutomation"},{"type":"null"}],"description":"Automation that created this session, if any. Null for sessions created manually or via the API."},"automation_trigger_source":{"anyOf":[{"type":"string","enum":["scheduled","manual","service_trigger","internal"]},{"type":"null"}],"description":"How the automation run that created this session was triggered. Always null in list responses."},"contextual_actions":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionContextualActions"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/Sessions.SessionSettings","description":"Session settings controlling behavior like notifications"},"viewer_is_owner":{"type":"boolean","description":"Whether the current user owns this session"},"read_only":{"type":"boolean","description":"Whether this is a read-only session where the agent cannot create PRs, push code, or make persistent changes"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionParticipant"},"description":"Users who have participated in this session"},"agent":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAgent"},{"type":"null"}],"description":"Custom agent the session runs with. Always null in list responses."},"workspace":{"$ref":"#/components/schemas/Sessions.SessionWorkspace"},"slack_thread_permalink":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permalink to the Slack thread linked to the session, if any."}}},"Sessions.SessionList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.Session"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Sessions.SessionModel":{"type":"object","required":["id","name","provider","variant","service_tier"],"properties":{"id":{"type":"string","description":"Model identifier"},"name":{"type":"string","description":"Human-readable model name"},"provider":{"type":"string","description":"Model provider (e.g., anthropic, openai)"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active model variant, or null when not applicable."},"service_tier":{"anyOf":[{"$ref":"#/components/schemas/Sessions.ModelServiceTier"},{"type":"null"}],"description":"Service tier the session runs on, or null when none was selected."}}},"Sessions.SessionPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Sessions.SessionParticipant":{"type":"object","required":["id","session_id","user_id","joined_at","last_active_at","left_at","user"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Participant identifier, or null for the session owner when they have not joined the session explicitly"},"session_id":{"type":"string"},"user_id":{"type":"string"},"joined_at":{"type":"string","format":"date-time"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"left_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the participant left the session, or null."},"user":{"$ref":"#/components/schemas/Sessions.SessionUser"}}},"Sessions.SessionPullRequest":{"type":"object","required":["repository","github_repository","url","pull_request_number","adopted_at","status_updated_at","title","review_session_id","approval_status","status","merged_at","author"],"properties":{"repository":{"type":"string","description":"Repository ID that owns the pull request"},"github_repository":{"type":"string","description":"Canonical GitHub repository name, which may differ from the Inspect repository ID."},"url":{"type":"string","format":"uri","description":"GitHub pull request URL"},"pull_request_number":{"type":"integer","description":"Pull request number"},"adopted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the pull request was adopted into the session"},"status_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the pull request last changed workflow status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pull request title"},"review_session_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"approval_status":{"anyOf":[{"$ref":"#/components/schemas/Sessions.ApprovalStatus"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/Sessions.PullRequestStatus","description":"Workflow status of the pull request"},"merged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the pull request was merged, or null if it has not been merged"},"author":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionPullRequestAuthor"},{"type":"null"}],"description":"GitHub user who opened the pull request, or null when unknown"}}},"Sessions.SessionPullRequestAuthor":{"type":"object","required":["login","display_name","avatar_url","profile_url"],"properties":{"login":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub login"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub display name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub avatar URL"},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub profile URL"}}},"Sessions.SessionRepository":{"type":"object","required":["id","state_updated_at","branch","base_branch","latest_commit_sha","diff"],"properties":{"id":{"type":"string","description":"Repository ID"},"state_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this repository state was last updated"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current branch for this repository"},"base_branch":{"type":"string","description":"Base branch for this repository"},"latest_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Latest commit SHA pushed for this repository"},"diff":{"$ref":"#/components/schemas/Sessions.SessionRepositoryDiff"}}},"Sessions.SessionRepositoryDiff":{"type":"object","required":["file_id","local_file_id","source","additions","deletions"],"properties":{"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Authoritative diff file ID"},"local_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local working-tree diff file ID"},"source":{"anyOf":[{"$ref":"#/components/schemas/Sessions.DiffSource"},{"type":"null"}],"description":"Source of the authoritative diff"},"additions":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of lines added"},"deletions":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of lines deleted"}}},"Sessions.SessionSettings":{"type":"object","required":["ci_failures_enabled","auto_review_enabled","auto_address_pull_request_reviews_policy"],"properties":{"ci_failures_enabled":{"type":"boolean","description":"Whether to automatically respond to CI failures"},"auto_review_enabled":{"type":"boolean","description":"Whether to automatically review and fix code for this session"},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicy"},{"type":"null"}],"description":"Per-session automatic PR review addressing policy, or null when the session owner's saved policy applies."}}},"Sessions.SessionSortOrder":{"type":"string","enum":["created_at_desc","created_at_asc"]},"Sessions.SessionStatus":{"type":"string","enum":["pending","running","finished","failed"]},"Sessions.SessionSubagent":{"type":"object","required":["id","kind","name","status","created_at"],"properties":{"id":{"type":"string","description":"Unique identifier for the subagent. Use it with the subagent messages and cost endpoints of its parent session."},"kind":{"$ref":"#/components/schemas/Sessions.SessionSubagentKind","description":"`verifier` for Verification agent runs Inspect started for the session; `subagent` for other subagents."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the subagent, if known."},"status":{"$ref":"#/components/schemas/Sessions.SessionSubagentStatus","description":"Current status of the subagent."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the subagent was created, if known."}}},"Sessions.SessionSubagentKind":{"type":"string","enum":["verifier","subagent"]},"Sessions.SessionSubagentList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionSubagent"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Sessions.SessionSubagentStatus":{"type":"string","enum":["running","completed","error","abandoned"]},"Sessions.SessionTag":{"type":"string","minLength":1,"maxLength":100},"Sessions.SessionTags":{"type":"object","required":["tags"],"properties":{"tags":{"type":"array","items":{"type":"string"},"description":"The caller's tags on the session after replacement."}}},"Sessions.SessionUser":{"type":"object","required":["id","name","email","avatar_url"],"properties":{"id":{"type":"string","description":"User identifier"},"name":{"type":"string","description":"User display name"},"email":{"type":"string","description":"User email address"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL to user profile image"}}},"Sessions.SessionVerificationNotStarted":{"type":"object","required":["message","code","reason"],"properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"string","enum":["verification_not_started"]},"reason":{"type":"string","enum":["no_pull_request","not_configured","readonly","no_runtime","session_predates_verifier"],"description":"Why no run started: the session has no pull request, the pull request's head has no `.inspect/verification/config.yml`, the session is read-only, its runtime has not started, or it was created before the Verification agent was available."}}},"Sessions.SessionVerificationStarted":{"type":"object","required":["status","repository","pull_request_number"],"properties":{"status":{"type":"string","enum":["started","already_running"],"description":"`started` when a new Verification agent run started, superseding any older run for the pull request; `already_running` when a run for the current head was already in progress."},"repository":{"type":"string","description":"Repository of the verified pull request."},"pull_request_number":{"type":"integer","description":"Number of the verified pull request."}}},"Sessions.SessionVisibility":{"type":"string","enum":["public","private"]},"Sessions.SessionWorkspace":{"type":"object","required":["id","name","description","organization","remote","github_host","base_branch"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"organization":{"type":"string"},"remote":{"type":"string","enum":["github","codestorage"]},"github_host":{"type":"string","enum":["github"]},"base_branch":{"type":"string"}},"description":"The workspace a session is attached to."},"Sessions.SkillId":{"type":"string","minLength":1},"Sessions.SmartReviewerApprovalStatus":{"type":"object","required":["source_sequence","generation","publication_sequence","head_sha","base_branch","status","current","reason","recommendation","request_review_binding","updated_at"],"properties":{"source_sequence":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"publication_sequence":{"type":"integer","minimum":0},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}]},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/Sessions.ApprovalProviderStatus"},"current":{"type":"boolean"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"recommendation":{"anyOf":[{"type":"object","properties":{"login":{"type":"string"},"status":{"type":"string","enum":["available","requested","received","draft"]},"reasoning":{"type":"string"},"selection_reason":{"type":"string"}},"required":["login","status","reasoning","selection_reason"]},{"type":"null"}]},"request_review_binding":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":4096},"updated_at":{"type":"string","format":"date-time"}}},"Sessions.StampBuddyApprovalStatus":{"type":"object","required":["source_sequence","generation","publication_sequence","head_sha","base_branch","view_status","status","current","reason","rationale","risk_tier","auto_approval","history","grant_approval_binding","updated_at"],"properties":{"source_sequence":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"publication_sequence":{"type":"integer","minimum":0},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}]},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"view_status":{"type":"string","enum":["ready","not_started","not_enrolled","unavailable"]},"status":{"$ref":"#/components/schemas/Sessions.ApprovalProviderStatus"},"current":{"type":"boolean"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rationale":{"anyOf":[{"$ref":"#/components/schemas/Sessions.ApprovalRationale"},{"type":"null"}]},"risk_tier":{"anyOf":[{"type":"string","enum":["no_risk","low","medium","major"]},{"type":"null"}]},"auto_approval":{"$ref":"#/components/schemas/Sessions.AutoApprovalStatus"},"history":{"type":"array","items":{"type":"object","properties":{"head_sha":{"type":"string","minLength":1},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1},"status":{"$ref":"#/components/schemas/Sessions.ApprovalProviderStatus"},"auto_approval":{"$ref":"#/components/schemas/Sessions.AutoApprovalStatus"},"updated_at":{"type":"string","format":"date-time"}},"required":["head_sha","session_id","status","auto_approval","updated_at"]},"maxItems":20},"grant_approval_binding":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":4096},"updated_at":{"type":"string","format":"date-time"}}},"Sessions.StartSessionVerificationRequest":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"description":"Repository of the pull request to verify. Required only when the session has pull requests in multiple repositories."}}},"Sessions.TrimmedNonEmptyString":{"type":"string","minLength":1},"Sessions.UpdateBaseBranchRequest":{"type":"object","required":["new_base_branch"],"properties":{"new_base_branch":{"type":"string","minLength":1,"description":"The new base branch. GitHub URL and ref prefixes such as refs/heads/ and origin/ are normalized."}}},"Sessions.UpdateBaseBranchSuccess":{"type":"object","required":["previous_base_branch","new_base_branch","pull_request_updated","repository","pull_request_number","needs_rebase"],"properties":{"previous_base_branch":{"type":"string"},"new_base_branch":{"type":"string"},"pull_request_updated":{"type":"boolean","description":"Whether an existing pull request was updated on GitHub."},"repository":{"type":"string","description":"Repository whose base branch changed."},"pull_request_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The existing pull request number, if the session has one."},"needs_rebase":{"type":"boolean","description":"Whether the session has a feature branch or pull request whose commits may need to be replayed onto the new base."}}},"Sessions.UpdateSessionRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"New session title."},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"New visibility. Private sessions cannot be made public."},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.NonEmptyString"},"description":"Collaborator emails to add as session participants."}}},"Sessions.UpdateSessionTagsRequest":{"type":"object","required":["tags"],"properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionTag"},"maxItems":50,"description":"The complete set of tags the API key's user applies to the session. Pass an empty array to remove all of the caller's tags."}}},"Sessions.UserMessage":{"type":"object","required":["role","id","created_at","source","parent_session_id","synthetic","parts"],"properties":{"role":{"type":"string","enum":["user"]},"id":{"type":"string","description":"Unique message identifier"},"created_at":{"type":"string","format":"date-time","description":"When the message was sent"},"source":{"anyOf":[{"$ref":"#/components/schemas/Sessions.MessageSource"},{"type":"null"}],"description":"Origin of the turn. Human-authored sources include `web`, `chrome_extension`, `slack`, `github`, `linear`, `email` and `review_chat` (the latter arrive via an integration but are written by a person). `automation` and `background_task` are injected programmatically and are not human-authored; `agent` turns are sent by another agent, Inspect session, or the agent runtime, such as parent or child session messages; `slack_reaction` and `unknown` are unclassified. Platform-generated turns, such as goal continuations and scheduled wake-ups, also set `synthetic: true`. Every prompt submitted through the public API is stamped `automation`. Null on older messages."},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the parent session when the turn was sent within a child session, otherwise null."},"synthetic":{"type":"boolean","description":"True on platform-generated turns, such as goal continuations and scheduled wake-ups."},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.MessagePart"},"description":"Content parts that make up the message"}},"description":"A turn submitted to the session by a user, an integration, or another agent."},"Skills.CollaboratorId":{"type":"string","minLength":1},"Skills.CreateSkillRequest":{"type":"object","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/Skills.SkillId","description":"Unique kebab-case skill ID"},"description":{"type":"string","maxLength":2000,"default":""},"content":{"type":"string","description":"`SKILL.md` body. Mutually exclusive with `files`."},"files":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillFileInput"},"maxItems":20,"description":"Complete file set including `SKILL.md`. Mutually exclusive with `content`. At most 20 files and 20 MB in total."},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Skills.CollaboratorId"},"description":"Inspect user IDs who can also edit the skill","default":[]}},"description":"Provide either `content` or `files`, not both.","not":{"required":["content","files"]},"additionalProperties":false},"Skills.Skill":{"type":"object","required":["id","url","description","files","builtin","owner","collaborators","viewer_can_edit","created_at","updated_at"],"properties":{"id":{"type":"string","description":"Kebab-case skill ID"},"url":{"type":"string","format":"uri","description":"Skill page in Inspect"},"description":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillFile"}},"builtin":{"type":"boolean","description":"Built-in skills are read-only"},"owner":{"anyOf":[{"$ref":"#/components/schemas/Skills.SkillPerson"},{"type":"null"}],"description":"Skill owner; null for built-in skills"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillPerson"}},"viewer_can_edit":{"type":"boolean","description":"Whether the API key user can update or archive this skill"},"created_at":{"type":"string","format":"date-time","description":"Creation time; the Unix epoch for built-in skills"},"updated_at":{"type":"string","format":"date-time","description":"Last update time; the Unix epoch for built-in skills"}}},"Skills.SkillFile":{"type":"object","required":["name","content"],"properties":{"name":{"type":"string","description":"Safe relative file path, for example `SKILL.md` or `scripts/run.sh`"},"content":{"type":"string","description":"File contents"}}},"Skills.SkillFileInput":{"type":"object","required":["name","content"],"properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Safe relative file path, for example `SKILL.md` or `scripts/run.sh`. Backslashes, control characters, and empty, `.` or `..` segments are rejected."},"content":{"type":"string","description":"File contents"}}},"Skills.SkillId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$","description":"Kebab-case skill ID"},"Skills.SkillPerson":{"type":"object","required":["id","name","email","avatar_url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"Skills.SkillSummary":{"type":"object","required":["id","url","description"],"properties":{"id":{"type":"string","description":"Kebab-case skill ID"},"url":{"type":"string","format":"uri","description":"Skill page in Inspect"},"description":{"type":"string"}}},"Skills.SkillSummaryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillSummary"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Skills.UpdateSkillRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Skills.SkillId","description":"New skill ID, to rename the skill"},"description":{"type":"string","maxLength":2000},"content":{"type":"string","description":"Replacement `SKILL.md` body. Mutually exclusive with `files`."},"files":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillFileInput"},"maxItems":20,"description":"Replacement for the complete file set, including `SKILL.md`. Mutually exclusive with `content`. At most 20 files and 20 MB in total."},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Skills.CollaboratorId"},"description":"Replacement collaborator list"}},"description":"At least one field must be provided. Provide either `content` or `files`, not both.","not":{"required":["content","files"]},"additionalProperties":false,"minProperties":1},"User.UserPreferences":{"type":"object","required":["default_model","default_model_variant","default_agent_id"],"properties":{"default_model":{"type":"string","description":"The model ID the user has configured as their default for new sessions. Falls back to the platform default model when unset or no longer available as a default.","examples":["claude-opus-4-6"]},"default_model_variant":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The model variant the user has configured for their default model. Null means use the default variant for that model.","examples":[null]},"default_agent_id":{"type":"string","description":"The agent ID the user has configured as their default for new sessions. Falls back to the first built-in agent when unset.","examples":["general"]}}},"ValidationError":{"type":"object","required":["data","error","success"],"properties":{"data":{"description":"The validated input as received."},"error":{"type":"array","items":{"$ref":"#/components/schemas/ValidationIssue"},"description":"Validation issues."},"success":{"type":"boolean","enum":[false]}},"description":"Request validation failure returned by route validators."},"ValidationIssue":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string","description":"Issue code, such as `invalid_type` or `too_small`."},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer","format":"int32"}]},"description":"Location of the invalid value within the validated input."},"message":{"type":"string","description":"Human-readable description of the issue."}},"description":"A request validation issue reported by the validator."}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication. Use your API key as the bearer token."}}},"servers":[{"url":"{origin}","variables":{"origin":{"default":"https://your-org.inspect.com","description":"Your Inspect origin"}}}]}