{
"success": false,
"error": {
"code": "AGENT_QUEUE_NOT_FOUND",
"message": "Agent queue not found: 'agent_queue_123'. Verify the queueId is correct."
}
}
Agents
Get session
Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.
When the session last changed status, as an ISO 8601 timestamp
⌘I
{"docsConfig":{"theme":"linden","$schema":"https://mintlify.com/docs.json","name":"Kaizen","colors":{"primary":"#ffcc00","light":"#ffcc00","dark":"#f8c806"},"logo":{"light":"https://mintcdn.com/kaizenautomation/Wx0TyKIp-iSVxHVM/logo/light.svg?fit=max\u0026auto=format\u0026n=Wx0TyKIp-iSVxHVM\u0026q=85\u0026s=f3e4d00ffe0f3d46f58a68a433349b22","dark":"https://mintcdn.com/kaizenautomation/Wx0TyKIp-iSVxHVM/logo/dark.svg?fit=max\u0026auto=format\u0026n=Wx0TyKIp-iSVxHVM\u0026q=85\u0026s=c9e7c7a28d2d044f4ae76f7d7ba5a895"},"favicon":"https://mintcdn.com/kaizenautomation/Wx0TyKIp-iSVxHVM/favicon.svg?fit=max\u0026auto=format\u0026n=Wx0TyKIp-iSVxHVM\u0026q=85\u0026s=38fa31b283b9dce54a99fa12128c17c9","styling":{"latex":false},"background":{"color":{"light":"#fffdf7","dark":"#100f0b"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"kaizenautomation","hasAudioNarration":false,"actualSubdomain":"kaizenautomation","customDomains":["docs.kaizenautomation.com"],"gitSource":{"type":"github","owner":"kaizen-automation","repo":"kaizen","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeae68c1dc8750e81171b30","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API Reference","count":24},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"Agents","count":5},{"language":"default","tag":"Logins","count":5},{"language":"default","tag":"Workflows","count":4},{"language":"default","tag":"Cookbook","count":4},{"language":"default","tag":"Executions","count":3},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Authentication","count":2},{"language":"default","tag":"Files","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":[],"page":{"pagePath":"api-reference/agents/get-session","slug":"/api-reference/agents/get-session","pageMetadata":{"openapi":"post /agents/sessions/get","title":"Get session","description":"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.","href":"/api-reference/agents/get-session"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.\"\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":{"openapi":"post /agents/sessions/get","title":"Get session","description":"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.","href":"/api-reference/agents/get-session"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/kaizenautomation/306b5f73ebd5ade6/scripts/generate-docs.js"],"openApiReferenceData":{"operation":{"summary":"Get session","description":"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.","tags":["Agents"],"x-codeSamples":[{"lang":"cURL","source":"curl -X POST https://api.kaizenautomation.com/agents/sessions/get \\\n -H \"Authorization: Bearer YOUR_KAIZEN_API_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"sessionId\": \"YOUR_SESSION_ID_HERE\"\n }'"}],"requestBody":"2318c86c-1480-4efd-8642-65afa188d219","responses":{"200":"ff095518-8c61-4488-8c14-ccde2f53f56c","400":"3a719b1a-342b-4682-954f-ec1afadef6b4","401":"82f3e2a3-34b7-4ced-a35e-249cdf4a6937","404":"bd6adf03-11b7-466a-abcc-1e549c853fe3","500":"483fbd9e-ef96-411b-bb0a-74b1c0b9b4d9"},"method":"post","type":"path","servers":["9a402b36-c691-4e99-be7b-195e4566257b"],"security":[],"path":"/agents/sessions/get","baseUrlOptions":["https://api.kaizenautomation.com"],"title":"Get session","codeSamples":[{"lang":"cURL","source":"curl -X POST https://api.kaizenautomation.com/agents/sessions/get \\\n -H \"Authorization: Bearer YOUR_KAIZEN_API_KEY_HERE\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"sessionId\": \"YOUR_SESSION_ID_HERE\"\n }'"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","description":"The ID of the session, as returned by POST /agents/execute","example":"agent_conversation_thread_01k1v4m0000000000000000000","isRequired":true,"uniqueKey":"sessionId","typeLabel":"string"}},"required":["sessionId"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"sessionId":"agent_conversation_thread_01k1v4m0000000000000000000"}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"ff095518-8c61-4488-8c14-ccde2f53f56c":{"description":"The session","content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","description":"The ID of the session, as returned by POST /agents/execute","example":"agent_conversation_thread_01k1v4m0000000000000000000","isRequired":true,"uniqueKey":"sessionId","typeLabel":"string"},"agentId":{"type":"string","description":"The ID of the agent running the session","isRequired":true,"uniqueKey":"agentId","typeLabel":"string"},"status":{"type":"string","enum":["Pending","InProgress","Completed","Failed","Paused","WaitingInLine","Sleeping"],"description":"Lifecycle status of the session","example":"WaitingInLine","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"queuePositionInLine":{"oneOf":[{"type":"integer","description":"Place in the waiting line while the status is WaitingInLine (1 = next to run). Null once the session has started, and for sessions that never waited","isRequired":true,"uniqueKey":"queuePositionInLine.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Place in the waiting line while the status is WaitingInLine (1 = next to run). Null once the session has started, and for sessions that never waited","isRequired":true,"uniqueKey":"queuePositionInLine.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"queuePositionInLine","typeLabel":"integer | null"},"queue":{"oneOf":[{"type":"object","properties":{"queueId":{"type":"string","description":"The ID of the queue the session was enqueued onto","isRequired":true,"uniqueKey":"queue.oneOf.0.queueId","typeLabel":"string"},"name":{"type":"string","description":"Name of the queue","isRequired":true,"uniqueKey":"queue.oneOf.0.name","typeLabel":"string"},"status":{"type":"string","enum":["active","paused"],"description":"Whether the queue dispatches work. A paused queue holds waiting threads until resumed.","isRequired":true,"uniqueKey":"queue.oneOf.0.status","typeLabel":"enum\u003cstring>"},"waitingCount":{"type":"integer","description":"How many of the queue’s sessions are waiting in line to start","isRequired":true,"uniqueKey":"queue.oneOf.0.waitingCount","typeLabel":"integer"},"inProgressCount":{"type":"integer","description":"How many of the queue’s sessions are running right now","isRequired":true,"uniqueKey":"queue.oneOf.0.inProgressCount","typeLabel":"integer"},"oldestWaitingEnqueuedAt":{"oneOf":[{"type":"string","description":"When the session that has been waiting longest was enqueued, or null when nothing is waiting","isRequired":true,"uniqueKey":"queue.oneOf.0.oldestWaitingEnqueuedAt.oneOf.0","typeLabel":"string"},{"type":"null","description":"When the session that has been waiting longest was enqueued, or null when nothing is waiting","isRequired":true,"uniqueKey":"queue.oneOf.0.oldestWaitingEnqueuedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"queue.oneOf.0.oldestWaitingEnqueuedAt","typeLabel":"string | null"}},"required":["queueId","name","status","waitingCount","inProgressCount","oldestWaitingEnqueuedAt"],"description":"The queue gating the session, if any","isRequired":true,"uniqueKey":"queue.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"queueId":{"type":"string","description":"The ID of the queue the session was enqueued onto"},"name":{"type":"string","description":"Name of the queue"},"status":{"type":"string","enum":["active","paused"],"description":"Whether the queue dispatches work. A paused queue holds waiting threads until resumed."},"waitingCount":{"type":"integer","description":"How many of the queue’s sessions are waiting in line to start"},"inProgressCount":{"type":"integer","description":"How many of the queue’s sessions are running right now"},"oldestWaitingEnqueuedAt":{"oneOf":[{"type":"string","description":"When the session that has been waiting longest was enqueued, or null when nothing is waiting"},{"type":"null","description":"When the session that has been waiting longest was enqueued, or null when nothing is waiting"}]}},"required":["queueId","name","status","waitingCount","inProgressCount","oldestWaitingEnqueuedAt"],"description":"The queue gating the session, if any","isRequired":true,"uniqueKey":"queue.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"queue","typeLabel":"object | null"},"createdAt":{"type":"string","description":"When the session was created, as an ISO 8601 timestamp","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string"},"statusLastUpdatedAt":{"type":"string","description":"When the session last changed status, as an ISO 8601 timestamp","isRequired":true,"uniqueKey":"statusLastUpdatedAt","typeLabel":"string"}},"required":["sessionId","agentId","status","queuePositionInLine","queue","createdAt","statusLastUpdatedAt"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"sessionId":"agent_conversation_thread_01k1v4m0000000000000000000","agentId":"\u003cstring>","status":"WaitingInLine","queuePositionInLine":123,"queue":{"queueId":"\u003cstring>","name":"\u003cstring>","status":"active","waitingCount":123,"inProgressCount":123,"oldestWaitingEnqueuedAt":"\u003cstring>"},"createdAt":"\u003cstring>","statusLastUpdatedAt":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"3a719b1a-342b-4682-954f-ec1afadef6b4":{"description":"Bad request","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"82f3e2a3-34b7-4ced-a35e-249cdf4a6937":{"description":"Unauthorized","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"bd6adf03-11b7-466a-abcc-1e549c853fe3":{"description":"The session does not exist. Code: AGENT_SESSION_NOT_FOUND.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":false,"description":"Always false for an error response.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["AGENT_QUEUE_NOT_FOUND","QUEUE_AGENT_NOT_FOUND","QUEUE_HAS_NO_RESOLVABLE_AGENT","AGENT_SESSION_NOT_FOUND","AGENT_SESSION_NOT_PAUSABLE"],"description":"Machine-readable error code. `AGENT_QUEUE_NOT_FOUND`: the queueId does not exist. `QUEUE_AGENT_NOT_FOUND`: the supplied agentId does not exist. `QUEUE_HAS_NO_RESOLVABLE_AGENT`: no agentId was supplied and no agent could be resolved for the queue. `AGENT_SESSION_NOT_FOUND`: the sessionId does not exist. `AGENT_SESSION_NOT_PAUSABLE`: the session has already finished, so there is nothing to pause.","example":"AGENT_QUEUE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable description of what went wrong.","example":"Agent queue not found: 'agent_queue_123'. Verify the queueId is correct.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"description":"Error details.","isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["success","error"],"description":"Error response returned by agent-queue endpoints.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"AGENT_QUEUE_NOT_FOUND","message":"Agent queue not found: 'agent_queue_123'. Verify the queueId is correct."}}}},"exampleType":"generated"}},"exampleType":"generated"},"483fbd9e-ef96-411b-bb0a-74b1c0b9b4d9":{"description":"Internal server error","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{},"servers":{"9a402b36-c691-4e99-be7b-195e4566257b":{"url":"https://api.kaizenautomation.com","description":"Production server"}}},"originalFileLocation":"openapi.json"},"subdomain":"kaizenautomation","siteName":"Kaizen","title":"Get session - Kaizen","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T08:02:33.352Z","originalFileLocation":"api-reference/agents/get-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=\"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Kaizen\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_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/kaizenautomation/4hld95ZurNmtSFvg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get session - Kaizen\">\u003cmeta data-mint-head property=\"og:description\" content=\"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Kaizen\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.kaizenautomation.com/api-reference/agents/get-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://kaizenautomation.mintlify.site/_mintlify/api/og/v2?division=Agents\u0026amp;title=Get+session\u0026amp;description=Reads+the+state+of+a+session+started+by+POST+%2Fagents%2Fexecute%3A+whether+it+is+running%2C+waiting+in+line%2C+or+finished%2C+where+it+sits+in+its+queue%2C+and+how+much+work\u0026amp;theme=f37fa918ce4d41d4e022ce89\u0026amp;signature=d99b1317dbcd3bf0123a7a92ddf8b1b84b6a0b212d9d6f1170218c3fd3147865\">\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=\"Get session - Kaizen\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://kaizenautomation.mintlify.site/_mintlify/api/og/v2?division=Agents\u0026amp;title=Get+session\u0026amp;description=Reads+the+state+of+a+session+started+by+POST+%2Fagents%2Fexecute%3A+whether+it+is+running%2C+waiting+in+line%2C+or+finished%2C+where+it+sits+in+its+queue%2C+and+how+much+work\u0026amp;theme=f37fa918ce4d41d4e022ce89\u0026amp;signature=d99b1317dbcd3bf0123a7a92ddf8b1b84b6a0b212d9d6f1170218c3fd3147865\">\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/kaizenautomation/4hld95ZurNmtSFvg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Kaizen\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ffcc00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.kaizenautomation.com/api-reference/agents/get-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/agents/get-session.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.kaizenautomation.com/#organization\",\"name\":\"Kaizen\",\"url\":\"https://docs.kaizenautomation.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/kaizenautomation/Wx0TyKIp-iSVxHVM/logo/light.svg?fit=max\u0026auto=format\u0026n=Wx0TyKIp-iSVxHVM\u0026q=85\u0026s=f3e4d00ffe0f3d46f58a68a433349b22\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.kaizenautomation.com#website\",\"name\":\"Kaizen\",\"url\":\"https://docs.kaizenautomation.com\",\"publisher\":{\"@id\":\"https://docs.kaizenautomation.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session#webpage\",\"url\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session\",\"name\":\"Get session\",\"description\":\"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.\",\"dateModified\":\"2026-11-04T08:02:33.352Z\",\"isPartOf\":{\"@id\":\"https://docs.kaizenautomation.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agents\",\"item\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session-archive-download-url\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get session\",\"item\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session#apireference\",\"headline\":\"Get session\",\"name\":\"Get session\",\"description\":\"Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.\",\"url\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session\",\"mainEntityOfPage\":{\"@id\":\"https://docs.kaizenautomation.com/api-reference/agents/get-session#webpage\"},\"dateModified\":\"2026-11-04T08:02:33.352Z\",\"publisher\":{\"@id\":\"https://docs.kaizenautomation.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.kaizenautomation.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Kaizen\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Kaizen","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Authentication","pages":[{"openapi":"post /authentication/submitTwoFactorAuthCode","title":"Submit 2FA code","href":"/api-reference/authentication/submit-2fa-code"},{"openapi":"post /authentication/completeLogin","title":"Complete login authentication","href":"/api-reference/authentication/complete-login-authentication"}]},{"group":"Logins","pages":[{"openapi":"post /logins/create","title":"Create a login","href":"/api-reference/logins/create-a-login"},{"openapi":"post /logins/update","title":"Update a login","href":"/api-reference/logins/update-a-login"},{"openapi":"post /logins/delete","title":"Delete a login","href":"/api-reference/logins/delete-a-login"},{"openapi":"post /logins/list","title":"List logins","href":"/api-reference/logins/list-logins"},{"openapi":"post /logins/getPassword","title":"Get login password","href":"/api-reference/logins/get-login-password"}]},{"group":"Executions","pages":[{"openapi":"post /executions/list","title":"List executions","href":"/api-reference/executions/list-executions"},{"openapi":"post /executions/get","title":"Get execution","href":"/api-reference/executions/get-execution"},{"openapi":"post /executions/retry","title":"Retry execution","href":"/api-reference/executions/retry-execution"}]},{"group":"Browser Sessions","pages":[{"openapi":"post /browsers/getSessionRecording","title":"Get browser session recording","href":"/api-reference/browser-sessions/get-browser-session-recording"}]},{"group":"Workflows","pages":[{"openapi":"post /workflows/execute","title":"Execute a workflow","href":"/api-reference/workflows/execute-a-workflow"},{"openapi":"post /workflows/executeSync","title":"Execute a workflow synchronously","href":"/api-reference/workflows/execute-a-workflow-synchronously"},{"openapi":"post /workflows/update","title":"Update a workflow","href":"/api-reference/workflows/update-a-workflow"},{"openapi":"post /workflows/executeBatch","title":"Execute multiple workflows in a batch","href":"/api-reference/workflows/execute-multiple-workflows-in-a-batch"}]},{"group":"Instructor","pages":[{"openapi":"post /instructor/executions/runBlock","title":"Run single block","href":"/api-reference/instructor/run-single-block"}]},{"group":"Files","pages":[{"openapi":"post /files/get","title":"Get file","href":"/api-reference/files/get-file"},{"openapi":"post /files/create","title":"Create a file","href":"/api-reference/files/create-a-file"}]},{"group":"Agents","pages":[{"openapi":"post /agents/session/getFileArchiveUrl","title":"Get session archive download URL","href":"/api-reference/agents/get-session-archive-download-url"},{"openapi":"post /agents/execute","title":"Execute agent","description":"Executes an agent with optional content.","href":"/api-reference/agents/execute-agent"},{"openapi":"post /agents/sessions/get","title":"Get session","href":"/api-reference/agents/get-session"},{"openapi":"post /agents/sessions/pause","title":"Pause session","description":"Pauses a session, whether it has started or not. A session that is running stops where it is and hands back the slot it was holding, so the next session in line can start; a session still waiting in line leaves the line. Either way it ends up Paused, and can be picked back up by sending it another message. Pausing a session that is already paused does nothing.","href":"/api-reference/agents/pause-session"},{"openapi":"post /agents/session/messages/list","title":"List agent messages","href":"/api-reference/agents/list-agent-messages"}]},{"group":"Webhooks","pages":[{"openapi":"webhook events","title":"Event","href":"/api-reference/webhooks/event"}]}]}]},"basePath":"","title":"Get session - Kaizen","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"]}