Open a session: one of your people, working toward one task, inside your environment.
The TASK is required and is exactly one of two shapes: {"instructions": "..."} describes the intent inline, or {"id": "..."} binds a task you registered. A bound task’s instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409.
The ENVIRONMENT is also exactly one of two shapes: environment_id names one you registered, or environment describes an ad-hoc one inline. A registered environment’s name, kind and configuration are snapshot onto the session for the same reason.
Send an Idempotency-Key header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.
Workspace API key as a bearer token: Authorization: Bearer ish_sk_live_.... Keys are workspace-scoped machine principals minted in Settings > Developers (shown once at mint). Scopes: sessions:run (create a session, submit turns, close), sessions:read (read the session and its decision trace), environments:read and environments:write (manage the workspace's registered environments), tasks:read and tasks:write (manage the workspace's registered tasks), people:read and people:write (the people the workspace can run a session for), and usage:read (the workspace's own consumption, spend limits and rate-limit budgets). A key is minted with sessions:run, sessions:read, and tasks:read by default; every other scope must be requested, people:read and usage:read included. An ish user access token also works on the same header for personal scripts.
Pin this session to a declared version of the registered environment, by label (case-insensitive; the canonical label is recorded). Requires environment_id. Omit to use the environment's default version, or to run unversioned when it has none. An unknown label is a 404, never a new bucket.
How long this session's observation frames are retained: none (discard after the turn), 30d, 90d, or indefinite. Omit to inherit the registered environment's setting; an inline environment descriptor defaults to none. Resolved once at open and fixed for the session's lifetime. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.
Idempotent replay: an existing session was returned because the Idempotency-Key and request body matched a prior create.
The full session, without its decision trace.
What create and close return: a caller that opened a session holds the same
object a read would give it, so nothing has to be fetched twice to learn what
was actually frozen. The TRACE is deliberately absent: turns are a paged
subresource of the detail read, and a create has none yet.
When the session left open (UTC), stamped on the first terminal transition and never moved. Null while the session is open. This is the timestamp sessions_ended usage buckets on.
Why the session ended, when that is finer than status: credits_exhausted or plan_allowance_exhausted (both end the session as balance_exhausted), or spend_cap_reached. Null for an ordinary ending. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.
Retention window resolved at open: none, 30d, 90d, or indefinite. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.
The person as they were when the session was created, frozen onto the session.
This, not the live person, is what the session was run against: it stays readable and unchanged after the person is edited or deleted, which is what makes an old trace still mean something. id is the person's id at create time.
Additional keys may be present and more may be added over time; treat anything not listed here as unspecified rather than failing on it.
Deliberation budget the session was opened with: low, medium or high. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ish","description":"Documentation for the ish CLI and MCP server. Simulate a visit and read the reactions before you ship.","colors":{"primary":"#C8623F","light":"#D87A55","dark":"#262220"},"logo":{"light":"https://mintcdn.com/ish/4MaJn6-B7_NnPAml/logo/light.svg?fit=max\u0026auto=format\u0026n=4MaJn6-B7_NnPAml\u0026q=85\u0026s=f0edab6b74c19bec95794ee94d7270c2","dark":"https://mintcdn.com/ish/4MaJn6-B7_NnPAml/logo/dark.svg?fit=max\u0026auto=format\u0026n=4MaJn6-B7_NnPAml\u0026q=85\u0026s=da9e886222890dc4edeaf5b77b455102"},"favicon":{"light":"https://mintcdn.com/ish/4MaJn6-B7_NnPAml/favicon.svg?fit=max\u0026auto=format\u0026n=4MaJn6-B7_NnPAml\u0026q=85\u0026s=871b7f0a040fb0e8c3293911bcbfd37d","dark":"https://mintcdn.com/ish/4MaJn6-B7_NnPAml/favicon-dark.svg?fit=max\u0026auto=format\u0026n=4MaJn6-B7_NnPAml\u0026q=85\u0026s=8915499d3e98ef136443c3c38b96e4b9"},"appearance":{"default":"system"},"background":{"color":{"light":"#FDFCFB","dark":"#1A1816"}},"navbar":{"links":[{"href":"https://app.ishlabs.io","label":"Sign in"}],"primary":{"type":"button","label":"Get ish free","href":"https://app.ishlabs.io"}},"footer":{"socials":{"github":"https://github.com/ishlabs"},"links":[{"header":"Product","items":[{"label":"ishlabs.io","href":"https://ishlabs.io"},{"label":"Pricing","href":"https://ishlabs.io/pricing"},{"label":"Sign in","href":"https://app.ishlabs.io"}]}]},"fonts":{"heading":{"family":"Inter"},"body":{"family":"Inter"}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/ishlabs"},{"anchor":"ishlabs.io","icon":"globe","href":"https://ishlabs.io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ish","hasAudioNarration":false,"actualSubdomain":"ish","customDomains":["docs.ishlabs.io"],"gitSource":{"type":"github","owner":"ishlabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af0209f0311aab340dbb5c0","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Guides","count":45},{"language":"default","tag":"API","count":42},{"language":"default","tag":"API reference","count":28},{"language":"default","tag":"CLI Reference","count":28},{"language":"default","tag":"Core concepts","count":26},{"language":"default","tag":"MCP Reference","count":21},{"language":"default","tag":"Commands","count":20},{"language":"default","tag":"Overview","count":15},{"language":"default","tag":"Tools","count":13},{"language":"default","tag":"How-to guides","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"[data-component-part=\"card-icon\"] svg{background-color:#262220!important}html.dark [data-component-part=\"card-icon\"] svg{background-color:#e8e3de!important}html.dark img[src*=\"/logos/\"]{filter:invert(0.91) brightness(1.03)}#content-area a[href]>div:hover,.ish-card:hover{border-color:#d87a55;transition:border-color 0.15s ease, box-shadow 0.15s ease}"}],"page":{"pagePath":"api/reference/sessions/create-session","slug":"/api/reference/sessions/create-session","pageMetadata":{"title":"Create Session","description":"Open a session: one of your people, working toward one task, inside your environment.\n\nThe TASK is required and is exactly one of two shapes: `{\"instructions\": \"...\"}` describes the intent inline, or `{\"id\": \"...\"}` binds a task you registered. A bound task's instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409.\n\nThe ENVIRONMENT is also exactly one of two shapes: `environment_id` names one you registered, or `environment` describes an ad-hoc one inline. A registered environment's name, kind and configuration are snapshot onto the session for the same reason.\n\nSend an `Idempotency-Key` header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/workspaces/{workspace_id}/sessions","href":"/api/reference/sessions/create-session","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Open a session: one of your people, working toward one task, inside your environment.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The TASK is required and is exactly one of two shapes: \", _jsx(_components.code, {\n children: \"{\\\"instructions\\\": \\\"...\\\"}\"\n }), \" describes the intent inline, or \", _jsx(_components.code, {\n children: \"{\\\"id\\\": \\\"...\\\"}\"\n }), \" binds a task you registered. A bound task’s instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The ENVIRONMENT is also exactly one of two shapes: \", _jsx(_components.code, {\n children: \"environment_id\"\n }), \" names one you registered, or \", _jsx(_components.code, {\n children: \"environment\"\n }), \" describes an ad-hoc one inline. A registered environment’s name, kind and configuration are snapshot onto the session for the same reason.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Send an \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Session","description":"Open a session: one of your people, working toward one task, inside your environment.\n\nThe TASK is required and is exactly one of two shapes: `{\"instructions\": \"...\"}` describes the intent inline, or `{\"id\": \"...\"}` binds a task you registered. A bound task's instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409.\n\nThe ENVIRONMENT is also exactly one of two shapes: `environment_id` names one you registered, or `environment` describes an ad-hoc one inline. A registered environment's name, kind and configuration are snapshot onto the session for the same reason.\n\nSend an `Idempotency-Key` header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/workspaces/{workspace_id}/sessions","href":"/api/reference/sessions/create-session","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Open a session: one of your people, working toward one task, inside your environment.\n\nThe TASK is required and is exactly one of two shapes: `{\"instructions\": \"...\"}` describes the intent inline, or `{\"id\": \"...\"}` binds a task you registered. A bound task's instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409.\n\nThe ENVIRONMENT is also exactly one of two shapes: `environment_id` names one you registered, or `environment` describes an ad-hoc one inline. A registered environment's name, kind and configuration are snapshot onto the session for the same reason.\n\nSend an `Idempotency-Key` header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.","operationId":"createSession","parameters":["6f1a8ba7-1920-46c6-905a-9912772eb9cb","56252dba-fc42-49fa-b246-bb1e710ca4d4"],"requestBody":"38b989ba-2375-4e70-8895-805e3e3b60be","responses":{"200":"0a362cca-80ad-4162-93a2-37f3c96ad760","201":"09f46959-3c7b-4a5d-b9cd-6563f82518e7","401":"4085f43e-1e0f-410e-b365-5a018ab2f6ce","403":"757f3c29-cbb7-491a-8b4f-fbbca4152021","404":"7f832577-5b00-41c4-aea7-a8dfaf6e25e0","409":"69d6f8c7-c965-4fe4-89d5-220c33e56581","422":"dce1f3e9-cf38-4cbc-a4c0-426d792ccfd2","429":"92aaa291-0ef9-4246-8f0f-c13ac981e0a0","500":"a668d522-f23f-4d7f-bfcd-a66720a444b5"},"security":["8390d5c6-dc87-4242-b27a-502382a41072"],"summary":"Create Session","tags":["sessions"],"method":"post","type":"path","servers":["22c3a961-b6d9-4922-b5aa-d0aac292aa39"],"path":"/api/v1/workspaces/{workspace_id}/sessions","baseUrlOptions":["https://api.ishlabs.io"],"title":"Create Session","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"6f1a8ba7-1920-46c6-905a-9912772eb9cb":{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}},"56252dba-fc42-49fa-b246-bb1e710ca4d4":{"in":"header","name":"Idempotency-Key","required":false,"schema":{"oneOf":[{"type":"string","title":"Idempotency-Key","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Idempotency-Key","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}}},"requestBody":{"content":{"application/json":{"examples":{"default":{"title":"default","value":{"environment_id":"3c2a1f80-7e64-4b19-8d55-11aa22bb33cc","max_turns":20,"pacing":"pause_on_decide","person_id":"9f1c7b52-0d3a-4a1e-9c4f-2b8e5a6d1234","reasoning_effort":"low","task":{"instructions":"Find the refund policy and start a return."}}}},"schema":{"additionalProperties":false,"properties":{"pacing":{"enum":["pause_on_decide","frame_on_demand","free_running"],"title":"PacingContract","type":"string","isRequired":true,"uniqueKey":"pacing","typeLabel":"enum\u003cstring>"},"person_id":{"format":"uuid","title":"Person Id","type":"string","isRequired":true,"uniqueKey":"person_id","typeLabel":"string\u003cuuid>"},"task":{"oneOf":[{"type":"object","title":"TaskRef","description":"A registered task in this workspace, bound by id.","required":["id"],"properties":{"id":{"description":"A registered task. Its instructions are frozen onto the session at create; later edits to the registry row never touch this session.","format":"uuid","title":"Id","type":"string","isRequired":true,"uniqueKey":"task.oneOf.0.id","typeLabel":"string\u003cuuid>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"task.oneOf.0","typeLabel":"TaskRef · object"},{"type":"object","title":"TaskDescriptor","description":"A task described inline on the session that uses it.\n\nInstructions only, by design: on this lane your code executes the actions, so verification steps in the create body would hand the answer key to the process being measured. Register a task to attach steps.","required":["instructions"],"properties":{"instructions":{"description":"What the person is trying to do, in their own terms. Rendered into their prompt as the situation paragraph.","maxLength":2000,"minLength":1,"title":"Instructions","type":"string","isRequired":true,"uniqueKey":"task.oneOf.1.instructions","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"task.oneOf.1","typeLabel":"TaskDescriptor · object"}],"isRequired":true,"uniqueKey":"task","typeLabel":"TaskRef · object | TaskDescriptor · object"},"decision_mode":{"enum":["direct","intent"],"title":"DecisionMode","type":"string","default":"intent","uniqueKey":"decision_mode","typeLabel":"enum\u003cstring>"},"environment":{"oneOf":[{"type":"object","title":"EnvironmentDescriptor","description":"An ad-hoc environment described inline. Mutually exclusive with `environment_id`; supply exactly one.","required":["name","kind"],"properties":{"kind":{"description":"The kind of surface (e.g. `web`, `device`, `world`). Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","maxLength":40,"minLength":1,"title":"Kind","type":"string","isRequired":true,"uniqueKey":"environment.oneOf.0.kind","typeLabel":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string","isRequired":true,"uniqueKey":"environment.oneOf.0.name","typeLabel":"string"}},"uniqueKey":"environment.oneOf.0","typeLabel":"EnvironmentDescriptor · object"},{"type":"null","description":"An ad-hoc environment described inline. Mutually exclusive with `environment_id`; supply exactly one.","uniqueKey":"environment.oneOf.1","typeLabel":"null"}],"uniqueKey":"environment","typeLabel":"EnvironmentDescriptor · object | null"},"environment_id":{"oneOf":[{"type":"string","title":"Environment Id","description":"A registered environment in this workspace. Mutually exclusive with `environment`; supply exactly one.","format":"uuid","uniqueKey":"environment_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Environment Id","description":"A registered environment in this workspace. Mutually exclusive with `environment`; supply exactly one.","uniqueKey":"environment_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"environment_id","typeLabel":"string\u003cuuid> | null"},"environment_version":{"oneOf":[{"type":"string","title":"Environment Version","description":"Pin this session to a declared version of the registered environment, by label (case-insensitive; the canonical label is recorded). Requires `environment_id`. Omit to use the environment's default version, or to run unversioned when it has none. An unknown label is a 404, never a new bucket.","maxLength":120,"minLength":1,"uniqueKey":"environment_version.oneOf.0","typeLabel":"string"},{"type":"null","title":"Environment Version","description":"Pin this session to a declared version of the registered environment, by label (case-insensitive; the canonical label is recorded). Requires `environment_id`. Omit to use the environment's default version, or to run unversioned when it has none. An unknown label is a 404, never a new bucket.","uniqueKey":"environment_version.oneOf.1","typeLabel":"null"}],"uniqueKey":"environment_version","typeLabel":"string | null"},"max_turns":{"default":50,"maximum":200,"minimum":1,"title":"Max Turns","type":"integer","uniqueKey":"max_turns","typeLabel":"integer"},"observation_retention":{"oneOf":[{"type":"string","title":"ObservationRetention","description":"How long this session's observation frames are retained: `none` (discard after the turn), `30d`, `90d`, or `indefinite`. Omit to inherit the registered environment's setting; an inline environment descriptor defaults to `none`. Resolved once at open and fixed for the session's lifetime. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","enum":["none","30d","90d","indefinite"],"uniqueKey":"observation_retention.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"How long this session's observation frames are retained: `none` (discard after the turn), `30d`, `90d`, or `indefinite`. Omit to inherit the registered environment's setting; an inline environment descriptor defaults to `none`. Resolved once at open and fixed for the session's lifetime. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","uniqueKey":"observation_retention.oneOf.1","typeLabel":"null"}],"uniqueKey":"observation_retention","typeLabel":"enum\u003cstring> | null"},"reasoning_effort":{"default":"low","enum":["low","medium","high"],"title":"Reasoning Effort","type":"string","uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring>"},"resolver_guidance":{"oneOf":[{"type":"string","title":"Resolver Guidance","maxLength":8000,"uniqueKey":"resolver_guidance.oneOf.0","typeLabel":"string"},{"type":"null","title":"Resolver Guidance","uniqueKey":"resolver_guidance.oneOf.1","typeLabel":"null"}],"uniqueKey":"resolver_guidance","typeLabel":"string | null"}},"required":["person_id","task","pacing"],"title":"CreateSessionRequest","type":"object","uniqueKey":"","typeLabel":"CreateSessionRequest · object"},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"0a362cca-80ad-4162-93a2-37f3c96ad760":{"content":{"application/json":{"schema":{"type":"object","title":"SessionResponse","description":"The full session, without its decision trace.\n\nWhat create and close return: a caller that opened a session holds the same\nobject a read would give it, so nothing has to be fetched twice to learn what\nwas actually frozen. The TRACE is deliberately absent: turns are a paged\nsubresource of the detail read, and a create has none yet.","required":["person_id","workspace_id","pacing","observation_retention","reasoning_effort","person_snapshot","id","status","task","environment","environment_id","environment_revision","environment_version_id","environment_version_label","decision_mode","turn_count","max_turns","created_by_api_key_id","accrued_credits","ended_reason","created_at","updated_at","ended_at"],"properties":{"accrued_credits":{"description":"This session's spend in credits (0 if it had no billable turns).","title":"Accrued Credits","type":"integer","isRequired":true,"uniqueKey":"accrued_credits","typeLabel":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"created_by_api_key_id":{"oneOf":[{"type":"string","title":"Created By Api Key Id","format":"uuid","isRequired":true,"uniqueKey":"created_by_api_key_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Created By Api Key Id","isRequired":true,"uniqueKey":"created_by_api_key_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created_by_api_key_id","typeLabel":"string\u003cuuid> | null"},"decision_mode":{"enum":["direct","intent"],"title":"DecisionMode","type":"string","isRequired":true,"uniqueKey":"decision_mode","typeLabel":"enum\u003cstring>"},"ended_at":{"oneOf":[{"type":"string","title":"Ended At","description":"When the session left `open` (UTC), stamped on the first terminal transition and never moved. Null while the session is open. This is the timestamp `sessions_ended` usage buckets on.","format":"date-time","isRequired":true,"uniqueKey":"ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Ended At","description":"When the session left `open` (UTC), stamped on the first terminal transition and never moved. Null while the session is open. This is the timestamp `sessions_ended` usage buckets on.","isRequired":true,"uniqueKey":"ended_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"ended_at","typeLabel":"string\u003cdate-time> | null"},"ended_reason":{"oneOf":[{"type":"string","title":"Ended Reason","description":"Why the session ended, when that is finer than `status`: `credits_exhausted` or `plan_allowance_exhausted` (both end the session as `balance_exhausted`), or `spend_cap_reached`. Null for an ordinary ending. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","isRequired":true,"uniqueKey":"ended_reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Ended Reason","description":"Why the session ended, when that is finer than `status`: `credits_exhausted` or `plan_allowance_exhausted` (both end the session as `balance_exhausted`), or `spend_cap_reached`. Null for an ordinary ending. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","isRequired":true,"uniqueKey":"ended_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"ended_reason","typeLabel":"string | null"},"environment":{"description":"The environment as frozen at create (name + kind snapshot).","properties":{"kind":{"description":"The kind of surface (e.g. `web`, `device`, `world`). Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","maxLength":40,"minLength":1,"title":"Kind","type":"string","isRequired":true,"uniqueKey":"environment.kind","typeLabel":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string","isRequired":true,"uniqueKey":"environment.name","typeLabel":"string"}},"required":["name","kind"],"title":"EnvironmentDescriptor","type":"object","isRequired":true,"uniqueKey":"environment","typeLabel":"EnvironmentDescriptor · object"},"environment_id":{"oneOf":[{"type":"string","title":"Environment Id","format":"uuid","isRequired":true,"uniqueKey":"environment_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Environment Id","isRequired":true,"uniqueKey":"environment_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_id","typeLabel":"string\u003cuuid> | null"},"environment_revision":{"oneOf":[{"type":"integer","title":"Environment Revision","isRequired":true,"uniqueKey":"environment_revision.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Environment Revision","isRequired":true,"uniqueKey":"environment_revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_revision","typeLabel":"integer | null"},"environment_version_id":{"oneOf":[{"type":"string","title":"Environment Version Id","format":"uuid","isRequired":true,"uniqueKey":"environment_version_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Environment Version Id","isRequired":true,"uniqueKey":"environment_version_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_version_id","typeLabel":"string\u003cuuid> | null"},"environment_version_label":{"oneOf":[{"type":"string","title":"Environment Version Label","isRequired":true,"uniqueKey":"environment_version_label.oneOf.0","typeLabel":"string"},{"type":"null","title":"Environment Version Label","isRequired":true,"uniqueKey":"environment_version_label.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_version_label","typeLabel":"string | null"},"id":{"format":"uuid","title":"Id","type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"max_turns":{"title":"Max Turns","type":"integer","isRequired":true,"uniqueKey":"max_turns","typeLabel":"integer"},"status":{"enum":["open","completed","gave_up","closed","max_turns","spend_cap_reached","balance_exhausted"],"title":"SessionStatus","type":"string","description":"Session status. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"task":{"description":"The session's intent, frozen when it was created. A later edit to a registered task never changes it.","properties":{"id":{"oneOf":[{"type":"string","title":"Id","format":"uuid","isRequired":true,"uniqueKey":"task.id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Id","isRequired":true,"uniqueKey":"task.id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"task.id","typeLabel":"string\u003cuuid> | null"},"instructions":{"title":"Instructions","type":"string","isRequired":true,"uniqueKey":"task.instructions","typeLabel":"string"},"name":{"oneOf":[{"type":"string","title":"Name","isRequired":true,"uniqueKey":"task.name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","isRequired":true,"uniqueKey":"task.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"task.name","typeLabel":"string | null"},"revision":{"oneOf":[{"type":"integer","title":"Revision","description":"The registry row's revision at bind time. Two runs of one task are comparable within a revision of its content.","isRequired":true,"uniqueKey":"task.revision.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Revision","description":"The registry row's revision at bind time. Two runs of one task are comparable within a revision of its content.","isRequired":true,"uniqueKey":"task.revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"task.revision","typeLabel":"integer | null"}},"required":["id","name","revision","instructions"],"title":"TaskSnapshot","type":"object","isRequired":true,"uniqueKey":"task","typeLabel":"TaskSnapshot · object"},"turn_count":{"title":"Turn Count","type":"integer","isRequired":true,"uniqueKey":"turn_count","typeLabel":"integer"},"updated_at":{"format":"date-time","title":"Updated At","type":"string","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"observation_retention":{"description":"Retention window resolved at open: `none`, `30d`, `90d`, or `indefinite`. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","title":"Observation Retention","type":"string","isRequired":true,"uniqueKey":"observation_retention","typeLabel":"string"},"pacing":{"enum":["pause_on_decide","frame_on_demand","free_running"],"title":"PacingContract","type":"string","isRequired":true,"uniqueKey":"pacing","typeLabel":"enum\u003cstring>"},"person_id":{"oneOf":[{"type":"string","title":"Person Id","format":"uuid","isRequired":true,"uniqueKey":"person_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Person Id","isRequired":true,"uniqueKey":"person_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"person_id","typeLabel":"string\u003cuuid> | null"},"person_snapshot":{"additionalProperties":true,"description":"The person as they were when the session was created, frozen onto the session.\n\nThis, not the live person, is what the session was run against: it stays readable and unchanged after the person is edited or deleted, which is what makes an old trace still mean something. `id` is the person's id at create time.\n\nAdditional keys may be present and more may be added over time; treat anything not listed here as unspecified rather than failing on it.","properties":{"id":{"format":"uuid","title":"Id","type":"string","isRequired":true,"uniqueKey":"person_snapshot.id","typeLabel":"string\u003cuuid>"},"name":{"title":"Name","type":"string","isRequired":true,"uniqueKey":"person_snapshot.name","typeLabel":"string"},"snapshotted_at":{"format":"date-time","title":"Snapshotted At","type":"string","isRequired":true,"uniqueKey":"person_snapshot.snapshotted_at","typeLabel":"string\u003cdate-time>"},"type":{"description":"Iteration execution type.","enum":["ai","human"],"title":"IterationType","type":"string","isRequired":true,"uniqueKey":"person_snapshot.type","typeLabel":"enum\u003cstring>"},"avatar_url":{"oneOf":[{"type":"string","title":"Avatar Url","uniqueKey":"person_snapshot.avatar_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Avatar Url","uniqueKey":"person_snapshot.avatar_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.avatar_url","typeLabel":"string | null"},"bio":{"oneOf":[{"type":"string","title":"Bio","uniqueKey":"person_snapshot.bio.oneOf.0","typeLabel":"string"},{"type":"null","title":"Bio","uniqueKey":"person_snapshot.bio.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.bio","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","title":"City","uniqueKey":"person_snapshot.city.oneOf.0","typeLabel":"string"},{"type":"null","title":"City","uniqueKey":"person_snapshot.city.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.city","typeLabel":"string | null"},"country":{"oneOf":[{"type":"string","title":"Country","uniqueKey":"person_snapshot.country.oneOf.0","typeLabel":"string"},{"type":"null","title":"Country","uniqueKey":"person_snapshot.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.country","typeLabel":"string | null"},"date_of_birth":{"oneOf":[{"type":"string","title":"Date Of Birth","format":"date","uniqueKey":"person_snapshot.date_of_birth.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","title":"Date Of Birth","uniqueKey":"person_snapshot.date_of_birth.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.date_of_birth","typeLabel":"string\u003cdate> | null"},"education_level":{"oneOf":[{"type":"string","title":"EducationLevel","enum":["less_than_secondary","secondary","some_post_secondary","vocational_or_associate","bachelor","graduate"],"uniqueKey":"person_snapshot.education_level.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.education_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.education_level","typeLabel":"enum\u003cstring> | null"},"employment_status":{"oneOf":[{"type":"string","title":"EmploymentStatus","enum":["employed_full_time","employed_part_time","self_employed","unemployed_seeking","student","homemaker","retired","unable_to_work","other"],"uniqueKey":"person_snapshot.employment_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.employment_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.employment_status","typeLabel":"enum\u003cstring> | null"},"gender":{"oneOf":[{"type":"string","title":"Gender","description":"Gender options for people.","enum":["male","female","non-binary","prefer_not_to_say"],"uniqueKey":"person_snapshot.gender.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.gender.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.gender","typeLabel":"enum\u003cstring> | null"},"household":{"oneOf":[{"type":"string","title":"Household","enum":["single","couple_no_kids","couple_with_kids","single_parent","shared_housing","adult_with_parents","multi_generational"],"uniqueKey":"person_snapshot.household.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.household.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.household","typeLabel":"enum\u003cstring> | null"},"income_level":{"oneOf":[{"type":"string","title":"IncomeLevel","enum":["lower","lower_middle","middle","upper_middle","upper","prefer_not_to_say"],"uniqueKey":"person_snapshot.income_level.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.income_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.income_level","typeLabel":"enum\u003cstring> | null"},"interests":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"person_snapshot.interests.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Interests","uniqueKey":"person_snapshot.interests.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Interests","uniqueKey":"person_snapshot.interests.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.interests","typeLabel":"string[] | null"},"languages":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"person_snapshot.languages.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Languages","uniqueKey":"person_snapshot.languages.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Languages","uniqueKey":"person_snapshot.languages.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.languages","typeLabel":"string[] | null"},"locale_type":{"oneOf":[{"type":"string","title":"LocaleType","enum":["urban","suburban","small_town","rural"],"uniqueKey":"person_snapshot.locale_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.locale_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.locale_type","typeLabel":"enum\u003cstring> | null"},"occupation":{"oneOf":[{"type":"string","title":"Occupation","uniqueKey":"person_snapshot.occupation.oneOf.0","typeLabel":"string"},{"type":"null","title":"Occupation","uniqueKey":"person_snapshot.occupation.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.occupation","typeLabel":"string | null"},"snapshot_version":{"default":"2","enum":["1","2"],"title":"Snapshot Version","type":"string","uniqueKey":"person_snapshot.snapshot_version","typeLabel":"enum\u003cstring>"},"timezone":{"oneOf":[{"type":"string","title":"Timezone","uniqueKey":"person_snapshot.timezone.oneOf.0","typeLabel":"string"},{"type":"null","title":"Timezone","uniqueKey":"person_snapshot.timezone.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.timezone","typeLabel":"string | null"}},"required":["id","name","type","snapshotted_at"],"title":"PersonSnapshot","type":"object","isRequired":true,"uniqueKey":"person_snapshot","typeLabel":"PersonSnapshot · object"},"reasoning_effort":{"description":"Deliberation budget the session was opened with: `low`, `medium` or `high`. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","title":"Reasoning Effort","type":"string","isRequired":true,"uniqueKey":"reasoning_effort","typeLabel":"string"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string","isRequired":true,"uniqueKey":"workspace_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"","typeLabel":"SessionResponse · object"},"examples":{"Example":{"title":"Example","value":{"accrued_credits":123,"created_at":"2023-11-07T05:31:56Z","created_by_api_key_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","decision_mode":"direct","ended_at":"2023-11-07T05:31:56Z","ended_reason":"\u003cstring>","environment":{"kind":"\u003cstring>","name":"\u003cstring>"},"environment_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","environment_revision":123,"environment_version_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","environment_version_label":"\u003cstring>","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","max_turns":123,"status":"open","task":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","instructions":"\u003cstring>","name":"\u003cstring>","revision":123},"turn_count":123,"updated_at":"2023-11-07T05:31:56Z","observation_retention":"\u003cstring>","pacing":"pause_on_decide","person_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","person_snapshot":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","snapshotted_at":"2023-11-07T05:31:56Z","type":"ai","avatar_url":"\u003cstring>","bio":"\u003cstring>","city":"\u003cstring>","country":"\u003cstring>","date_of_birth":"2023-12-25","education_level":"less_than_secondary","employment_status":"employed_full_time","gender":"male","household":"single","income_level":"lower","interests":["\u003cstring>"],"languages":["\u003cstring>"],"locale_type":"urban","occupation":"\u003cstring>","snapshot_version":"2","timezone":"\u003cstring>"},"reasoning_effort":"\u003cstring>","workspace_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"description":"Idempotent replay: an existing session was returned because the Idempotency-Key and request body matched a prior create.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"09f46959-3c7b-4a5d-b9cd-6563f82518e7":{"content":{"application/json":{"schema":{"type":"object","title":"SessionResponse","description":"The full session, without its decision trace.\n\nWhat create and close return: a caller that opened a session holds the same\nobject a read would give it, so nothing has to be fetched twice to learn what\nwas actually frozen. The TRACE is deliberately absent: turns are a paged\nsubresource of the detail read, and a create has none yet.","required":["person_id","workspace_id","pacing","observation_retention","reasoning_effort","person_snapshot","id","status","task","environment","environment_id","environment_revision","environment_version_id","environment_version_label","decision_mode","turn_count","max_turns","created_by_api_key_id","accrued_credits","ended_reason","created_at","updated_at","ended_at"],"properties":{"accrued_credits":{"description":"This session's spend in credits (0 if it had no billable turns).","title":"Accrued Credits","type":"integer","isRequired":true,"uniqueKey":"accrued_credits","typeLabel":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"created_by_api_key_id":{"oneOf":[{"type":"string","title":"Created By Api Key Id","format":"uuid","isRequired":true,"uniqueKey":"created_by_api_key_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Created By Api Key Id","isRequired":true,"uniqueKey":"created_by_api_key_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created_by_api_key_id","typeLabel":"string\u003cuuid> | null"},"decision_mode":{"enum":["direct","intent"],"title":"DecisionMode","type":"string","isRequired":true,"uniqueKey":"decision_mode","typeLabel":"enum\u003cstring>"},"ended_at":{"oneOf":[{"type":"string","title":"Ended At","description":"When the session left `open` (UTC), stamped on the first terminal transition and never moved. Null while the session is open. This is the timestamp `sessions_ended` usage buckets on.","format":"date-time","isRequired":true,"uniqueKey":"ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Ended At","description":"When the session left `open` (UTC), stamped on the first terminal transition and never moved. Null while the session is open. This is the timestamp `sessions_ended` usage buckets on.","isRequired":true,"uniqueKey":"ended_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"ended_at","typeLabel":"string\u003cdate-time> | null"},"ended_reason":{"oneOf":[{"type":"string","title":"Ended Reason","description":"Why the session ended, when that is finer than `status`: `credits_exhausted` or `plan_allowance_exhausted` (both end the session as `balance_exhausted`), or `spend_cap_reached`. Null for an ordinary ending. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","isRequired":true,"uniqueKey":"ended_reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Ended Reason","description":"Why the session ended, when that is finer than `status`: `credits_exhausted` or `plan_allowance_exhausted` (both end the session as `balance_exhausted`), or `spend_cap_reached`. Null for an ordinary ending. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","isRequired":true,"uniqueKey":"ended_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"ended_reason","typeLabel":"string | null"},"environment":{"description":"The environment as frozen at create (name + kind snapshot).","properties":{"kind":{"description":"The kind of surface (e.g. `web`, `device`, `world`). Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","maxLength":40,"minLength":1,"title":"Kind","type":"string","isRequired":true,"uniqueKey":"environment.kind","typeLabel":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string","isRequired":true,"uniqueKey":"environment.name","typeLabel":"string"}},"required":["name","kind"],"title":"EnvironmentDescriptor","type":"object","isRequired":true,"uniqueKey":"environment","typeLabel":"EnvironmentDescriptor · object"},"environment_id":{"oneOf":[{"type":"string","title":"Environment Id","format":"uuid","isRequired":true,"uniqueKey":"environment_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Environment Id","isRequired":true,"uniqueKey":"environment_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_id","typeLabel":"string\u003cuuid> | null"},"environment_revision":{"oneOf":[{"type":"integer","title":"Environment Revision","isRequired":true,"uniqueKey":"environment_revision.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Environment Revision","isRequired":true,"uniqueKey":"environment_revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_revision","typeLabel":"integer | null"},"environment_version_id":{"oneOf":[{"type":"string","title":"Environment Version Id","format":"uuid","isRequired":true,"uniqueKey":"environment_version_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Environment Version Id","isRequired":true,"uniqueKey":"environment_version_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_version_id","typeLabel":"string\u003cuuid> | null"},"environment_version_label":{"oneOf":[{"type":"string","title":"Environment Version Label","isRequired":true,"uniqueKey":"environment_version_label.oneOf.0","typeLabel":"string"},{"type":"null","title":"Environment Version Label","isRequired":true,"uniqueKey":"environment_version_label.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"environment_version_label","typeLabel":"string | null"},"id":{"format":"uuid","title":"Id","type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string\u003cuuid>"},"max_turns":{"title":"Max Turns","type":"integer","isRequired":true,"uniqueKey":"max_turns","typeLabel":"integer"},"status":{"enum":["open","completed","gave_up","closed","max_turns","spend_cap_reached","balance_exhausted"],"title":"SessionStatus","type":"string","description":"Session status. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"task":{"description":"The session's intent, frozen when it was created. A later edit to a registered task never changes it.","properties":{"id":{"oneOf":[{"type":"string","title":"Id","format":"uuid","isRequired":true,"uniqueKey":"task.id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Id","isRequired":true,"uniqueKey":"task.id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"task.id","typeLabel":"string\u003cuuid> | null"},"instructions":{"title":"Instructions","type":"string","isRequired":true,"uniqueKey":"task.instructions","typeLabel":"string"},"name":{"oneOf":[{"type":"string","title":"Name","isRequired":true,"uniqueKey":"task.name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","isRequired":true,"uniqueKey":"task.name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"task.name","typeLabel":"string | null"},"revision":{"oneOf":[{"type":"integer","title":"Revision","description":"The registry row's revision at bind time. Two runs of one task are comparable within a revision of its content.","isRequired":true,"uniqueKey":"task.revision.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Revision","description":"The registry row's revision at bind time. Two runs of one task are comparable within a revision of its content.","isRequired":true,"uniqueKey":"task.revision.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"task.revision","typeLabel":"integer | null"}},"required":["id","name","revision","instructions"],"title":"TaskSnapshot","type":"object","isRequired":true,"uniqueKey":"task","typeLabel":"TaskSnapshot · object"},"turn_count":{"title":"Turn Count","type":"integer","isRequired":true,"uniqueKey":"turn_count","typeLabel":"integer"},"updated_at":{"format":"date-time","title":"Updated At","type":"string","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"observation_retention":{"description":"Retention window resolved at open: `none`, `30d`, `90d`, or `indefinite`. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","title":"Observation Retention","type":"string","isRequired":true,"uniqueKey":"observation_retention","typeLabel":"string"},"pacing":{"enum":["pause_on_decide","frame_on_demand","free_running"],"title":"PacingContract","type":"string","isRequired":true,"uniqueKey":"pacing","typeLabel":"enum\u003cstring>"},"person_id":{"oneOf":[{"type":"string","title":"Person Id","format":"uuid","isRequired":true,"uniqueKey":"person_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"type":"null","title":"Person Id","isRequired":true,"uniqueKey":"person_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"person_id","typeLabel":"string\u003cuuid> | null"},"person_snapshot":{"additionalProperties":true,"description":"The person as they were when the session was created, frozen onto the session.\n\nThis, not the live person, is what the session was run against: it stays readable and unchanged after the person is edited or deleted, which is what makes an old trace still mean something. `id` is the person's id at create time.\n\nAdditional keys may be present and more may be added over time; treat anything not listed here as unspecified rather than failing on it.","properties":{"id":{"format":"uuid","title":"Id","type":"string","isRequired":true,"uniqueKey":"person_snapshot.id","typeLabel":"string\u003cuuid>"},"name":{"title":"Name","type":"string","isRequired":true,"uniqueKey":"person_snapshot.name","typeLabel":"string"},"snapshotted_at":{"format":"date-time","title":"Snapshotted At","type":"string","isRequired":true,"uniqueKey":"person_snapshot.snapshotted_at","typeLabel":"string\u003cdate-time>"},"type":{"description":"Iteration execution type.","enum":["ai","human"],"title":"IterationType","type":"string","isRequired":true,"uniqueKey":"person_snapshot.type","typeLabel":"enum\u003cstring>"},"avatar_url":{"oneOf":[{"type":"string","title":"Avatar Url","uniqueKey":"person_snapshot.avatar_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Avatar Url","uniqueKey":"person_snapshot.avatar_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.avatar_url","typeLabel":"string | null"},"bio":{"oneOf":[{"type":"string","title":"Bio","uniqueKey":"person_snapshot.bio.oneOf.0","typeLabel":"string"},{"type":"null","title":"Bio","uniqueKey":"person_snapshot.bio.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.bio","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","title":"City","uniqueKey":"person_snapshot.city.oneOf.0","typeLabel":"string"},{"type":"null","title":"City","uniqueKey":"person_snapshot.city.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.city","typeLabel":"string | null"},"country":{"oneOf":[{"type":"string","title":"Country","uniqueKey":"person_snapshot.country.oneOf.0","typeLabel":"string"},{"type":"null","title":"Country","uniqueKey":"person_snapshot.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.country","typeLabel":"string | null"},"date_of_birth":{"oneOf":[{"type":"string","title":"Date Of Birth","format":"date","uniqueKey":"person_snapshot.date_of_birth.oneOf.0","typeLabel":"string\u003cdate>"},{"type":"null","title":"Date Of Birth","uniqueKey":"person_snapshot.date_of_birth.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.date_of_birth","typeLabel":"string\u003cdate> | null"},"education_level":{"oneOf":[{"type":"string","title":"EducationLevel","enum":["less_than_secondary","secondary","some_post_secondary","vocational_or_associate","bachelor","graduate"],"uniqueKey":"person_snapshot.education_level.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.education_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.education_level","typeLabel":"enum\u003cstring> | null"},"employment_status":{"oneOf":[{"type":"string","title":"EmploymentStatus","enum":["employed_full_time","employed_part_time","self_employed","unemployed_seeking","student","homemaker","retired","unable_to_work","other"],"uniqueKey":"person_snapshot.employment_status.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.employment_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.employment_status","typeLabel":"enum\u003cstring> | null"},"gender":{"oneOf":[{"type":"string","title":"Gender","description":"Gender options for people.","enum":["male","female","non-binary","prefer_not_to_say"],"uniqueKey":"person_snapshot.gender.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.gender.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.gender","typeLabel":"enum\u003cstring> | null"},"household":{"oneOf":[{"type":"string","title":"Household","enum":["single","couple_no_kids","couple_with_kids","single_parent","shared_housing","adult_with_parents","multi_generational"],"uniqueKey":"person_snapshot.household.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.household.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.household","typeLabel":"enum\u003cstring> | null"},"income_level":{"oneOf":[{"type":"string","title":"IncomeLevel","enum":["lower","lower_middle","middle","upper_middle","upper","prefer_not_to_say"],"uniqueKey":"person_snapshot.income_level.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.income_level.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.income_level","typeLabel":"enum\u003cstring> | null"},"interests":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"person_snapshot.interests.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Interests","uniqueKey":"person_snapshot.interests.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Interests","uniqueKey":"person_snapshot.interests.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.interests","typeLabel":"string[] | null"},"languages":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"person_snapshot.languages.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Languages","uniqueKey":"person_snapshot.languages.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Languages","uniqueKey":"person_snapshot.languages.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.languages","typeLabel":"string[] | null"},"locale_type":{"oneOf":[{"type":"string","title":"LocaleType","enum":["urban","suburban","small_town","rural"],"uniqueKey":"person_snapshot.locale_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","uniqueKey":"person_snapshot.locale_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.locale_type","typeLabel":"enum\u003cstring> | null"},"occupation":{"oneOf":[{"type":"string","title":"Occupation","uniqueKey":"person_snapshot.occupation.oneOf.0","typeLabel":"string"},{"type":"null","title":"Occupation","uniqueKey":"person_snapshot.occupation.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.occupation","typeLabel":"string | null"},"snapshot_version":{"default":"2","enum":["1","2"],"title":"Snapshot Version","type":"string","uniqueKey":"person_snapshot.snapshot_version","typeLabel":"enum\u003cstring>"},"timezone":{"oneOf":[{"type":"string","title":"Timezone","uniqueKey":"person_snapshot.timezone.oneOf.0","typeLabel":"string"},{"type":"null","title":"Timezone","uniqueKey":"person_snapshot.timezone.oneOf.1","typeLabel":"null"}],"uniqueKey":"person_snapshot.timezone","typeLabel":"string | null"}},"required":["id","name","type","snapshotted_at"],"title":"PersonSnapshot","type":"object","isRequired":true,"uniqueKey":"person_snapshot","typeLabel":"PersonSnapshot · object"},"reasoning_effort":{"description":"Deliberation budget the session was opened with: `low`, `medium` or `high`. Open union: new values may be added over time; clients must tolerate unknown values rather than failing on them.","title":"Reasoning Effort","type":"string","isRequired":true,"uniqueKey":"reasoning_effort","typeLabel":"string"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string","isRequired":true,"uniqueKey":"workspace_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"","typeLabel":"SessionResponse · object"},"examples":{"Example":{"title":"Example","value":{"accrued_credits":123,"created_at":"2023-11-07T05:31:56Z","created_by_api_key_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","decision_mode":"direct","ended_at":"2023-11-07T05:31:56Z","ended_reason":"\u003cstring>","environment":{"kind":"\u003cstring>","name":"\u003cstring>"},"environment_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","environment_revision":123,"environment_version_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","environment_version_label":"\u003cstring>","id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","max_turns":123,"status":"open","task":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","instructions":"\u003cstring>","name":"\u003cstring>","revision":123},"turn_count":123,"updated_at":"2023-11-07T05:31:56Z","observation_retention":"\u003cstring>","pacing":"pause_on_decide","person_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","person_snapshot":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","snapshotted_at":"2023-11-07T05:31:56Z","type":"ai","avatar_url":"\u003cstring>","bio":"\u003cstring>","city":"\u003cstring>","country":"\u003cstring>","date_of_birth":"2023-12-25","education_level":"less_than_secondary","employment_status":"employed_full_time","gender":"male","household":"single","income_level":"lower","interests":["\u003cstring>"],"languages":["\u003cstring>"],"locale_type":"urban","occupation":"\u003cstring>","snapshot_version":"2","timezone":"\u003cstring>"},"reasoning_effort":"\u003cstring>","workspace_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"description":"Successful Response","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"4085f43e-1e0f-410e-b365-5a018ab2f6ce":{"content":{"application/json":{"schema":{"description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"docs_url","typeLabel":"string"}},"required":["detail","request_id"],"title":"Error","type":"object","uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","request_id":"\u003cstring>","docs_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"The bearer token is missing, malformed, unknown, or revoked (`detail.error_kind = 'invalid_api_key'`). One kind covers all four deliberately: distinguishing them would confirm which guesses are real keys.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"757f3c29-cbb7-491a-8b4f-fbbca4152021":{"content":{"application/json":{"schema":{"description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"docs_url","typeLabel":"string"}},"required":["detail","request_id"],"title":"Error","type":"object","uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","request_id":"\u003cstring>","docs_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Either the API key lacks the `sessions:run` scope (`detail.error_kind = 'insufficient_scope'`, with `detail.required_scope`), or the person is out of scope for this lane (`person_out_of_scope`): a session can only be opened for a person the workspace owns or one published in the platform library.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"7f832577-5b00-41c4-aea7-a8dfaf6e25e0":{"content":{"application/json":{"schema":{"description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"docs_url","typeLabel":"string"}},"required":["detail","request_id"],"title":"Error","type":"object","uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","request_id":"\u003cstring>","docs_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"The workspace, person, environment, or task (`workspace_id`, `person_id`, `environment_id`, `task.id`) was not found, or is not reachable with this credential. `detail.error_kind` is `workspace_not_found`, `person_not_found`, `environment_not_found` or `task_not_found`. A `person_id` that names a real person who participates in ish under consent also answers `person_not_found`: this lane runs simulated people only, and the answer is deliberately identical to the one a nonexistent id earns.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"69d6f8c7-c965-4fe4-89d5-220c33e56581":{"content":{"application/json":{"schema":{"description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"docs_url","typeLabel":"string"}},"required":["detail","request_id"],"title":"Error","type":"object","uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","request_id":"\u003cstring>","docs_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"The create was refused and no session was opened BY THIS REQUEST. `detail.error_kind` says which: `idempotency_conflict` (the Idempotency-Key was reused with a different request body; a key maps to one create request), `environment_archived` (the environment resolves but is retired and cannot accept new sessions; register a new environment, or pass an inline environment descriptor), or `task_archived` (the task resolves but is retired; register a new task, or pass the instructions inline). An environment or task that does not exist, or belongs to another tenant, is a 404 instead.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"dce1f3e9-cf38-4cbc-a4c0-426d792ccfd2":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"ValidationError","description":"Request body / parameter validation failure (HTTP 422). A field-level envelope so callers can pinpoint the offending field, value, and allowed values without parsing prose.","required":["error","error_code","status","retryable","detail","errors"],"properties":{"detail":{"title":"Detail","type":"string","isRequired":true,"uniqueKey":"oneOf.0.detail","typeLabel":"string"},"error":{"title":"Error","type":"string","isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"string"},"error_code":{"description":"Stable machine code, e.g. `validation_error`.","title":"Error Code","type":"string","isRequired":true,"uniqueKey":"oneOf.0.error_code","typeLabel":"string"},"errors":{"items":{"description":"One field-level entry in a ValidationError envelope.","properties":{"loc":{"description":"Path to the offending field.","items":{"oneOf":[{"type":"string","uniqueKey":"oneOf.0.errors.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"oneOf.0.errors.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"oneOf.0.errors.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"title":"Location","type":"array","isRequired":true,"uniqueKey":"oneOf.0.errors.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"title":"Message","type":"string","isRequired":true,"uniqueKey":"oneOf.0.errors.items.[INDEX].msg","typeLabel":"string"},"type":{"title":"Error Type","type":"string","isRequired":true,"uniqueKey":"oneOf.0.errors.items.[INDEX].type","typeLabel":"string"},"allowed_values":{"description":"For enum/literal failures, the accepted values.","items":{"oneOf":[{}],"uniqueKey":"oneOf.0.errors.items.[INDEX].allowed_values.items.[INDEX]","typeLabel":"any"},"title":"Allowed Values","type":"array","uniqueKey":"oneOf.0.errors.items.[INDEX].allowed_values","typeLabel":"any[]"},"input":{"oneOf":[{"type":"string","title":"Input","description":"Offending value (truncated); omitted for containers.","uniqueKey":"oneOf.0.errors.items.[INDEX].input.oneOf.0","typeLabel":"string"},{"type":"number","title":"Input","description":"Offending value (truncated); omitted for containers.","uniqueKey":"oneOf.0.errors.items.[INDEX].input.oneOf.1","typeLabel":"number"},{"type":"boolean","title":"Input","description":"Offending value (truncated); omitted for containers.","uniqueKey":"oneOf.0.errors.items.[INDEX].input.oneOf.2","typeLabel":"boolean"},{"type":"null","title":"Input","description":"Offending value (truncated); omitted for containers.","uniqueKey":"oneOf.0.errors.items.[INDEX].input.oneOf.3","typeLabel":"null"}],"uniqueKey":"oneOf.0.errors.items.[INDEX].input","typeLabel":"string | number | boolean | null"}},"required":["loc","msg","type"],"title":"FieldError","type":"object","uniqueKey":"oneOf.0.errors.items.[INDEX]","typeLabel":"FieldError · object"},"title":"Errors","type":"array","isRequired":true,"uniqueKey":"oneOf.0.errors","typeLabel":"FieldError · object[]"},"retryable":{"title":"Retryable","type":"boolean","isRequired":true,"uniqueKey":"oneOf.0.retryable","typeLabel":"boolean"},"status":{"title":"Status","type":"integer","isRequired":true,"uniqueKey":"oneOf.0.status","typeLabel":"integer"},"suggestions":{"items":{"type":"string","uniqueKey":"oneOf.0.suggestions.items.[INDEX]","typeLabel":"string"},"title":"Suggestions","type":"array","uniqueKey":"oneOf.0.suggestions","typeLabel":"string[]"}},"uniqueKey":"oneOf.0","typeLabel":"ValidationError · object"},{"type":"object","title":"Error","description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","required":["detail","request_id"],"properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"oneOf.1.detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"oneOf.1.detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"oneOf.1.detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"oneOf.1.request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"oneOf.1.docs_url","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"Error · object"}],"uniqueKey":"","typeLabel":"ValidationError · object | Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","error":"\u003cstring>","error_code":"\u003cstring>","errors":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>","allowed_values":["\u003cunknown>"],"input":"\u003cstring>"}],"retryable":true,"status":123,"suggestions":["\u003cstring>"]}}},"exampleType":"generated"}},"description":"Validation error. A request-shape failure uses the `ValidationError` envelope; a handler-raised domain-validation refusal uses the `Error` envelope.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"92aaa291-0ef9-4246-8f0f-c13ac981e0a0":{"content":{"application/json":{"schema":{"description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"docs_url","typeLabel":"string"}},"required":["detail","request_id"],"title":"Error","type":"object","uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","request_id":"\u003cstring>","docs_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Either the API key's request rate limit is exceeded (`detail.error_kind = 'rate_limited'`) or its daily session-create quota is used up (`session_quota_exceeded`). Both are transient and carry `Retry-After`, but they reset on different clocks: the first within the minute, the second on a day boundary. Existing sessions are unaffected by either. Not applied to user access tokens.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"},"a668d522-f23f-4d7f-bfcd-a66720a444b5":{"content":{"application/json":{"schema":{"description":"Generic error envelope for 4xx/5xx responses other than request-shape validation.","properties":{"detail":{"oneOf":[{"type":"string","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","isRequired":true,"uniqueKey":"detail.oneOf.0","typeLabel":"string"},{"type":"object","title":"Detail","description":"A human-readable message, OR a structured object carrying a machine-readable `error_kind` (e.g. `idempotency_conflict`, `turn_index_mismatch`, `decision_invalid`).","additionalProperties":true,"isRequired":true,"uniqueKey":"detail.oneOf.1","typeLabel":"Detail · object"}],"isRequired":true,"uniqueKey":"detail","typeLabel":"string | Detail · object"},"request_id":{"description":"Correlation id; identical to the `X-Request-Id` response header. Quote it in support requests.","title":"Request Id","type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"docs_url":{"description":"Link to this error's entry in the error catalog. Present whenever `detail` carries a registered `error_kind`; absent on unclassified errors.","title":"Docs Url","type":"string","uniqueKey":"docs_url","typeLabel":"string"}},"required":["detail","request_id"],"title":"Error","type":"object","uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>","request_id":"\u003cstring>","docs_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"An unexpected server-side failure. `detail.error_kind` is `environment_unresolved` or `session_actor_missing`. Not a state to handle: quote `request_id` and the kind in a bug report.","headers":{"X-Request-Id":{"description":"Per-response correlation id, present on EVERY response (success and error). Error bodies echo it as `request_id`.","schema":{"type":"string"}},"x-ratelimit-limit":{"description":"Ceiling for the rate-limit window this request charged. Present on responses made with an API key against a rate-limited operation, including the `429` itself; absent for user access tokens (which carry no per-key budget) and when the rate-limit backend could not be read.","schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Requests left in that window AFTER this one was counted. Pace off this rather than waiting for a `429`.","schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"**Seconds from now** until that window resets (a delta, NOT a Unix timestamp). Measured when the response is written. Omitted on the rare occasion the reset instant could not be read, while `limit` and `remaining` are still published.","schema":{"type":"integer"}}},"exampleType":"generated"}},"security":{"8390d5c6-dc87-4242-b27a-502382a41072":{"bearerAuth":{"description":"Workspace API key as a bearer token: `Authorization: Bearer ish_sk_live_...`. Keys are workspace-scoped machine principals minted in Settings > Developers (shown once at mint). Scopes: `sessions:run` (create a session, submit turns, close), `sessions:read` (read the session and its decision trace), `environments:read` and `environments:write` (manage the workspace's registered environments), `tasks:read` and `tasks:write` (manage the workspace's registered tasks), `people:read` and `people:write` (the people the workspace can run a session for), and `usage:read` (the workspace's own consumption, spend limits and rate-limit budgets). A key is minted with `sessions:run`, `sessions:read`, and `tasks:read` by default; every other scope must be requested, `people:read` and `usage:read` included. An ish user access token also works on the same header for personal scripts.","scheme":"bearer","type":"http","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"22c3a961-b6d9-4922-b5aa-d0aac292aa39":{"description":"Production","url":"https://api.ishlabs.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"Workspace API key as a bearer token: `Authorization: Bearer ish_sk_live_...`. Keys are workspace-scoped machine principals minted in Settings > Developers (shown once at mint). Scopes: `sessions:run` (create a session, submit turns, close), `sessions:read` (read the session and its decision trace), `environments:read` and `environments:write` (manage the workspace's registered environments), `tasks:read` and `tasks:write` (manage the workspace's registered tasks), `people:read` and `people:write` (the people the workspace can run a session for), and `usage:read` (the workspace's own consumption, spend limits and rate-limit budgets). A key is minted with `sessions:run`, `sessions:read`, and `tasks:read` by default; every other scope must be requested, `people:read` and `usage:read` included. An ish user access token also works on the same header for personal scripts.","scheme":"bearer","type":"http","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Workspace API key as a bearer token: `Authorization: Bearer ish_sk_live_...`. Keys are workspace-scoped machine principals minted in Settings > Developers (shown once at mint). Scopes: `sessions:run` (create a session, submit turns, close), `sessions:read` (read the session and its decision trace), `environments:read` and `environments:write` (manage the workspace's registered environments), `tasks:read` and `tasks:write` (manage the workspace's registered tasks), `people:read` and `people:write` (the people the workspace can run a session for), and `usage:read` (the workspace's own consumption, spend limits and rate-limit budgets). A key is minted with `sessions:run`, `sessions:read`, and `tasks:read` by default; every other scope must be requested, `people:read` and `usage:read` included. An ish user access token also works on the same header for personal scripts.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api/openapi.public.json"},"subdomain":"ish","siteName":"ish","title":"Create Session - ish","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-08T15:42:21.101Z","originalFileLocation":"api/reference/sessions/create-session.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Open a session: one of your people, working toward one task, inside your environment. The TASK is required and is exactly one of two shapes: {\u0026quot;instructions\u0026quot;: \u0026quot;...\u0026quot;} describes the intent inline, or {\u0026quot;id\u0026quot;: \u0026quot;...\u0026quot;} binds a task you registered. A bound task\u0026#x27;s instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409. The ENVIRONMENT is also exactly one of two shapes: environment_id names one you registered, or environment describes an ad-hoc one inline. A registered environment\u0026#x27;s name, kind and configuration are snapshot onto the session for the same reason. Send an Idempotency-Key header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ish\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Session - ish\">\u003cmeta data-mint-head property=\"og:description\" content=\"Open a session: one of your people, working toward one task, inside your environment. The TASK is required and is exactly one of two shapes: {\u0026quot;instructions\u0026quot;: \u0026quot;...\u0026quot;} describes the intent inline, or {\u0026quot;id\u0026quot;: \u0026quot;...\u0026quot;} binds a task you registered. A bound task\u0026#x27;s instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409. The ENVIRONMENT is also exactly one of two shapes: environment_id names one you registered, or environment describes an ad-hoc one inline. A registered environment\u0026#x27;s name, kind and configuration are snapshot onto the session for the same reason. Send an Idempotency-Key header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ish\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ishlabs.io/api/reference/sessions/create-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ish.mintlify.site/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Create+Session\u0026amp;description=Open+a+session%3A+one+of+your+people%2C+working+toward+one+task%2C+inside+your+environment.%0A%0AThe+TASK+is+required+and+is+exactly+one+of+two+shapes%3A+%60%7B%22instructions%22%3A+\u0026amp;theme=e052e8dabadef59794361480\u0026amp;signature=4403235d4b173b2325c7112a332677120f6a7329ebe5bff2971dab65b7636cb5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Session - ish\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Open a session: one of your people, working toward one task, inside your environment. The TASK is required and is exactly one of two shapes: {\u0026quot;instructions\u0026quot;: \u0026quot;...\u0026quot;} describes the intent inline, or {\u0026quot;id\u0026quot;: \u0026quot;...\u0026quot;} binds a task you registered. A bound task\u0026#x27;s instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409. The ENVIRONMENT is also exactly one of two shapes: environment_id names one you registered, or environment describes an ad-hoc one inline. A registered environment\u0026#x27;s name, kind and configuration are snapshot onto the session for the same reason. Send an Idempotency-Key header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ish.mintlify.site/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Create+Session\u0026amp;description=Open+a+session%3A+one+of+your+people%2C+working+toward+one+task%2C+inside+your+environment.%0A%0AThe+TASK+is+required+and+is+exactly+one+of+two+shapes%3A+%60%7B%22instructions%22%3A+\u0026amp;theme=e052e8dabadef59794361480\u0026amp;signature=4403235d4b173b2325c7112a332677120f6a7329ebe5bff2971dab65b7636cb5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ish/pQaVEm2sa1ahpXnl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ish\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#C8623F\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ishlabs.io/api/reference/sessions/create-session\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/reference/sessions/create-session.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ishlabs.io/#organization\",\"name\":\"ish\",\"url\":\"https://docs.ishlabs.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ish/4MaJn6-B7_NnPAml/logo/light.svg?fit=max\u0026auto=format\u0026n=4MaJn6-B7_NnPAml\u0026q=85\u0026s=f0edab6b74c19bec95794ee94d7270c2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ishlabs.io#website\",\"name\":\"ish\",\"url\":\"https://docs.ishlabs.io\",\"publisher\":{\"@id\":\"https://docs.ishlabs.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ishlabs.io/api/reference/sessions/create-session#webpage\",\"url\":\"https://docs.ishlabs.io/api/reference/sessions/create-session\",\"name\":\"Create Session\",\"description\":\"Open a session: one of your people, working toward one task, inside your environment. The TASK is required and is exactly one of two shapes: {\\\"instructions\\\": \\\"...\\\"} describes the intent inline, or {\\\"id\\\": \\\"...\\\"} binds a task you registered. A bound task's instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409. The ENVIRONMENT is also exactly one of two shapes: environment_id names one you registered, or environment describes an ad-hoc one inline. A registered environment's name, kind and configuration are snapshot onto the session for the same reason. Send an Idempotency-Key header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.\",\"dateModified\":\"2026-10-08T15:42:21.101Z\",\"isPartOf\":{\"@id\":\"https://docs.ishlabs.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ishlabs.io/api/reference/sessions/create-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ishlabs.io/api/reference/sessions/create-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.ishlabs.io/api/reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Session\",\"item\":\"https://docs.ishlabs.io/api/reference/sessions/create-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.ishlabs.io/api/reference/sessions/create-session#apireference\",\"headline\":\"Create Session\",\"name\":\"Create Session\",\"description\":\"Open a session: one of your people, working toward one task, inside your environment. The TASK is required and is exactly one of two shapes: {\\\"instructions\\\": \\\"...\\\"} describes the intent inline, or {\\\"id\\\": \\\"...\\\"} binds a task you registered. A bound task's instructions are frozen onto the session, so later edits to the registry never change a run that already happened. An id that does not resolve is a 404; one that resolves but is retired is a 409. The ENVIRONMENT is also exactly one of two shapes: environment_id names one you registered, or environment describes an ad-hoc one inline. A registered environment's name, kind and configuration are snapshot onto the session for the same reason. Send an Idempotency-Key header to make retries safe: the same key with the same body replays the original session as a 200, and the same key with a different body is a 409.\",\"url\":\"https://docs.ishlabs.io/api/reference/sessions/create-session\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ishlabs.io/api/reference/sessions/create-session#webpage\"},\"dateModified\":\"2026-10-08T15:42:21.101Z\",\"publisher\":{\"@id\":\"https://docs.ishlabs.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ishlabs.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ish\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ish","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/ishlabs"},{"anchor":"ishlabs.io","icon":"globe","href":"https://ishlabs.io"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"CLI Reference","pages":[{"title":"CLI Reference","href":"/cli/overview"}]},{"tab":"MCP Reference","pages":[{"title":"MCP Reference","href":"/mcp/overview"}]},{"tab":"API","groups":[{"group":"Get started","pages":[{"title":"The ish API","mode":"explanation","href":"/api/overview"},{"title":"Quickstart","mode":"tutorial","href":"/api/quickstart"},{"title":"Authentication","mode":"how-to","href":"/api/authentication"}]},{"group":"Core concepts","pages":[{"title":"Sessions and turns","mode":"explanation","href":"/api/concepts/sessions-and-turns"},{"title":"Observations","mode":"explanation","href":"/api/concepts/observations"},{"title":"The decide-only loop","mode":"explanation","href":"/api/concepts/decide-only-loop"},{"title":"Intent and resolution","mode":"explanation","href":"/api/concepts/intent-and-resolution"},{"title":"People","mode":"explanation","href":"/api/concepts/people"}]},{"group":"Guides","pages":[{"title":"Run the session loop","mode":"how-to","href":"/api/guides/session-loop"},{"title":"Author your environment","mode":"how-to","href":"/api/guides/environment-authoring"},{"title":"Score outcomes","mode":"how-to","href":"/api/guides/scoring-outcomes"},{"title":"Search people","mode":"how-to","href":"/api/guides/people-search"}]},{"group":"API reference","pages":[{"title":"API reference","mode":"reference","href":"/api/reference/introduction"},{"title":"Errors","description":"Every error kind the API returns, what each one means, and what to do about it.","mode":"reference","href":"/api/errors"},{"title":"Create Session","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/workspaces/{workspace_id}/sessions","href":"/api/reference/sessions/create-session"},{"title":"List Sessions","description":"List a workspace's sessions, newest first (keyset-paginated).\n\nOrdered `created_at DESC, id DESC`. Page forward with `after` set to the\nprior response's `next_cursor`; `has_more` signals another page. Each row\nis a summary (status, instructions, environment, person, turn counts, key\nattribution, accrued credits, timestamps). The per-turn decision trace lives\non the detail GET.","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/sessions","href":"/api/reference/sessions/list-sessions"},{"title":"Submit Turn","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/sessions/{session_id}/turns","href":"/api/reference/sessions/submit-turn"},{"title":"Get Session","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/sessions/{session_id}","href":"/api/reference/sessions/get-session"},{"title":"Close Session","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/sessions/{session_id}/close","href":"/api/reference/sessions/close-session"},{"title":"Create Environment","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/workspaces/{workspace_id}/environments","href":"/api/reference/environments/create-environment"},{"title":"List Environments","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/environments","href":"/api/reference/environments/list-environments"},{"title":"Get Environment","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/environments/{environment_id}","href":"/api/reference/environments/get-environment"},{"title":"Update Environment","deprecated":null,"version":null,"openapi":"/api/openapi.public.json patch /api/v1/environments/{environment_id}","href":"/api/reference/environments/update-environment"},{"title":"Delete Environment","deprecated":null,"version":null,"openapi":"/api/openapi.public.json delete /api/v1/environments/{environment_id}","href":"/api/reference/environments/delete-environment"},{"title":"Create Environment Version","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/environments/{environment_id}/versions","href":"/api/reference/environments/create-environment-version"},{"title":"List Environment Versions","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/environments/{environment_id}/versions","href":"/api/reference/environments/list-environment-versions"},{"title":"Get Environment Version","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/environment-versions/{version_id}","href":"/api/reference/environments/get-environment-version"},{"title":"Update Environment Version","deprecated":null,"version":null,"openapi":"/api/openapi.public.json patch /api/v1/environment-versions/{version_id}","href":"/api/reference/environments/update-environment-version"},{"title":"Delete Environment Version","deprecated":null,"version":null,"openapi":"/api/openapi.public.json delete /api/v1/environment-versions/{version_id}","href":"/api/reference/environments/delete-environment-version"},{"title":"Set Default Environment Version","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/environment-versions/{version_id}/set-default","href":"/api/reference/environments/set-default-environment-version"},{"title":"Create Task","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/workspaces/{workspace_id}/tasks","href":"/api/reference/tasks/create-task"},{"title":"List Tasks","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/tasks","href":"/api/reference/tasks/list-tasks"},{"title":"Get Task","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/tasks/{task_id}","href":"/api/reference/tasks/get-task"},{"title":"Update Task","deprecated":null,"version":null,"openapi":"/api/openapi.public.json patch /api/v1/tasks/{task_id}","href":"/api/reference/tasks/update-task"},{"title":"Delete Task","deprecated":null,"version":null,"openapi":"/api/openapi.public.json delete /api/v1/tasks/{task_id}","href":"/api/reference/tasks/delete-task"},{"title":"List People","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/people","href":"/api/reference/people/list-people"},{"title":"Search People","deprecated":null,"version":null,"openapi":"/api/openapi.public.json post /api/v1/workspaces/{workspace_id}/people/search","href":"/api/reference/people/search-people"},{"title":"Get Person","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/people/{person_id}","href":"/api/reference/people/get-person"},{"title":"Get People Counts","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/people/counts","href":"/api/reference/people/get-people-counts"},{"title":"Get People Schema","deprecated":null,"version":null,"openapi":"/api/openapi.public.json get /api/v1/workspaces/{workspace_id}/people/schema","href":"/api/reference/people/get-people-schema"}]},{"group":"Versioning and changes","pages":[{"title":"Versioning and deprecation","mode":"reference","href":"/api/versioning"},{"title":"Changelog","mode":"reference","href":"/api/changelog"}]}]},{"tab":"Help","pages":[{"title":"Help","href":"/help/troubleshooting"}]}]},"basePath":"","title":"Create Session - ish","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}