curl -X POST "https://app.runtm.com/api/v0/sessions/launch" \ -H "Authorization: Bearer runtm_xxx" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Build a REST API with FastAPI that manages TODO items", "agent": "claude-code", "template": "backend-service", "on_complete": "pause", "ttl_minutes": 60 }'
import requestsimport time# Launch the agentresponse = requests.post( "https://app.runtm.com/api/v0/sessions/launch", headers={"Authorization": "Bearer runtm_xxx"}, json={ "prompt": "Build a REST API with FastAPI that manages TODO items", "agent": "claude-code", "template": "backend-service", "on_complete": "pause", },)session_id = response.json()["id"]# Poll for completionwhile True: status = requests.get( f"https://app.runtm.com/api/v0/sessions/{session_id}", headers={"Authorization": "Bearer runtm_xxx"}, ).json() prompt_status = (status.get("last_prompt") or {}).get("status", "idle") if prompt_status in ("completed", "error", "timed_out"): print(f"Done: {prompt_status}") break time.sleep(5)
const response = await fetch( "https://app.runtm.com/api/v0/sessions/launch", { method: "POST", headers: { "Authorization": "Bearer runtm_xxx", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "Build a REST API with FastAPI that manages TODO items", agent: "claude-code", template: "backend-service", on_complete: "pause", }), });const { id } = await response.json();console.log(`Launched session: ${id}. Poll GET /api/v0/sessions/${id} for status.`);
{ "id": "86e11104-cdbb-42c9-bdc3-5212024ddb7b", "state": "creating", "message": "Agent launched. Poll GET /api/v0/sessions/{id} for status."}
Launch Agent (v0)
Create a session and fire a prompt in one call
POST
/
api
/
v0
/
sessions
/
launch
curl -X POST "https://app.runtm.com/api/v0/sessions/launch" \ -H "Authorization: Bearer runtm_xxx" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Build a REST API with FastAPI that manages TODO items", "agent": "claude-code", "template": "backend-service", "on_complete": "pause", "ttl_minutes": 60 }'
import requestsimport time# Launch the agentresponse = requests.post( "https://app.runtm.com/api/v0/sessions/launch", headers={"Authorization": "Bearer runtm_xxx"}, json={ "prompt": "Build a REST API with FastAPI that manages TODO items", "agent": "claude-code", "template": "backend-service", "on_complete": "pause", },)session_id = response.json()["id"]# Poll for completionwhile True: status = requests.get( f"https://app.runtm.com/api/v0/sessions/{session_id}", headers={"Authorization": "Bearer runtm_xxx"}, ).json() prompt_status = (status.get("last_prompt") or {}).get("status", "idle") if prompt_status in ("completed", "error", "timed_out"): print(f"Done: {prompt_status}") break time.sleep(5)
const response = await fetch( "https://app.runtm.com/api/v0/sessions/launch", { method: "POST", headers: { "Authorization": "Bearer runtm_xxx", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "Build a REST API with FastAPI that manages TODO items", agent: "claude-code", template: "backend-service", on_complete: "pause", }), });const { id } = await response.json();console.log(`Launched session: ${id}. Poll GET /api/v0/sessions/${id} for status.`);
{ "id": "86e11104-cdbb-42c9-bdc3-5212024ddb7b", "state": "creating", "message": "Agent launched. Poll GET /api/v0/sessions/{id} for status."}
Creates a new cloud session, configures lifecycle policy, and fires the prompt as a background task. Returns immediately with the session ID - poll GET /api/v0/sessions/{id} for status via the last_prompt field.This is the core “fire and forget” endpoint for programmatic agent workflows. It’s the recommended entry point for Slack triggers, Linear automations, GitHub Actions, MCP servers, and any other webhook-driven integration.Required scopes:sessions:writeandsessions:prompt
The task/prompt for the agent (1–100,000 characters).
string
default:"claude-code"
Coding agent: claude-code, codex, github-copilot, or opencode.
string
Roster agent UUID to run the session as — the subagent entry point. The run
takes that agent’s system instructions, identity and defaults, and is graded
against its rubric. Subject to the agent’s callable_by allowlist; see
Trigger a subagent.
string
An approved approval on the calling session, when the callee’s caller
edge requires one. Resolved within the last 10 minutes.
Model to use. Claude Code takes sonnet, opus-5, opus, haiku or fable (or the model id an alias points to, such as claude-sonnet-5-5, which runs as that alias); Codex takes gpt-6-astra, gpt-5.6-sol, gpt-5.5, gpt-5.4 or gpt-5.4-mini. For those two harnesses an unknown model is a 422 that lists the valid ones. With agent_id and no model, the session runs the model set on that agent’s triggers, if any.
string
default:"autopilot"
Session mode: autopilot or interactive.
boolean
default:false
Enable plan mode (read-only analysis without making changes).
string
default:"pause"
Lifecycle action when the prompt completes: pause, destroy, or keep_alive.
integer
Max session lifetime in minutes (1–1440, default 60).
integer
default:15
Max minutes for prompt execution before timeout (1–120).
Returns 201 with the session ID and initial state.
string
Session ID. Use this to poll status.
string
Initial state (creating).
string
Human-readable status message.
curl -X POST "https://app.runtm.com/api/v0/sessions/launch" \ -H "Authorization: Bearer runtm_xxx" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Build a REST API with FastAPI that manages TODO items", "agent": "claude-code", "template": "backend-service", "on_complete": "pause", "ttl_minutes": 60 }'
import requestsimport time# Launch the agentresponse = requests.post( "https://app.runtm.com/api/v0/sessions/launch", headers={"Authorization": "Bearer runtm_xxx"}, json={ "prompt": "Build a REST API with FastAPI that manages TODO items", "agent": "claude-code", "template": "backend-service", "on_complete": "pause", },)session_id = response.json()["id"]# Poll for completionwhile True: status = requests.get( f"https://app.runtm.com/api/v0/sessions/{session_id}", headers={"Authorization": "Bearer runtm_xxx"}, ).json() prompt_status = (status.get("last_prompt") or {}).get("status", "idle") if prompt_status in ("completed", "error", "timed_out"): print(f"Done: {prompt_status}") break time.sleep(5)
const response = await fetch( "https://app.runtm.com/api/v0/sessions/launch", { method: "POST", headers: { "Authorization": "Bearer runtm_xxx", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "Build a REST API with FastAPI that manages TODO items", agent: "claude-code", template: "backend-service", on_complete: "pause", }), });const { id } = await response.json();console.log(`Launched session: ${id}. Poll GET /api/v0/sessions/${id} for status.`);
{ "id": "86e11104-cdbb-42c9-bdc3-5212024ddb7b", "state": "creating", "message": "Agent launched. Poll GET /api/v0/sessions/{id} for status."}
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Runtime","colors":{"primary":"#18181b","light":"#71717a","dark":"#18181b"},"favicon":"https://mintcdn.com/runtm/5BRbZxh1joq_9si2/images/favicon.svg?fit=max\u0026auto=format\u0026n=5BRbZxh1joq_9si2\u0026q=85\u0026s=957716cbd1f84c5995ece94d6ac63ffd","logo":{"light":"https://mintcdn.com/runtm/5BRbZxh1joq_9si2/images/logo-light.svg?fit=max\u0026auto=format\u0026n=5BRbZxh1joq_9si2\u0026q=85\u0026s=dd91f6d3dfa4840b854b016d7add405d","dark":"https://mintcdn.com/runtm/5BRbZxh1joq_9si2/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=5BRbZxh1joq_9si2\u0026q=85\u0026s=996520fef61624cf8b0b4583342e3300"},"api":{"mdx":{"server":"https://app.runtm.com/api/cloud","auth":{"method":"bearer","name":null}}},"appearance":{"default":"light","strict":null},"background":{"decoration":null,"color":{"light":"#fafafa","dark":"#18181b"}},"footer":{"socials":{"github":"https://github.com/runtm-ai/runtm","x":"https://twitter.com/runtm_ai"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","href":"https://github.com/runtm-ai/runtm","icon":"github"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"runtm","hasAudioNarration":false,"actualSubdomain":"runtm","customDomains":["docs.runtm.com"],"gitSource":{"type":"github","owner":"runtm-ai","repo":"runtm","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af27c8e399662742a2f39e1","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API Reference","count":222},{"language":"default","tag":"Open Source","count":49},{"language":"default","tag":"Sessions","count":47},{"language":"default","tag":"Documentation","count":29},{"language":"default","tag":"Templates","count":22},{"language":"default","tag":"Context","count":21},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"CLI Reference","count":17},{"language":"default","tag":"Linear","count":16},{"language":"default","tag":"Skills","count":14}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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":"custom-rbac-roles","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cloud-api/sessions/launch","slug":"/cloud-api/sessions/launch","pageMetadata":{"title":"Launch Agent (v0)","api":"POST /api/v0/sessions/launch","description":"Create a session and fire a prompt in one call","href":"/cloud-api/sessions/launch"},"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: \"Create a session and fire a prompt in one call\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading,ParamField,ResponseField,Tip}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a new cloud session, configures lifecycle policy, and fires the prompt as a background task. Returns immediately with the session ID - poll `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-get`,children:_jsx(_components.code,{children:`GET /api/v0/sessions/{id}`})}),` for status via the `,_jsx(_components.code,{children:`last_prompt`}),` field.`]}),`\n`,_jsx(_components.p,{children:`This is the core “fire and forget” endpoint for programmatic agent workflows. It’s the recommended entry point for Slack triggers, Linear automations, GitHub Actions, MCP servers, and any other webhook-driven integration.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Required scopes:`}),` `,_jsx(_components.code,{children:`sessions:write`}),` `,_jsx(_components.strong,{children:`and`}),` `,_jsx(_components.code,{children:`sessions:prompt`})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Need to follow up after launch? Use `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-prompt`,children:_jsx(_components.code,{children:`POST /api/v0/sessions/{id}/prompt`})}),` to send another prompt (SSE stream), `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-git`,children:_jsx(_components.code,{children:`POST /api/v0/sessions/{id}/git`})}),` to commit/push/open a PR, and `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-delete`,children:_jsx(_components.code,{children:`DELETE /api/v0/sessions/{id}`})}),` to clean up.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Bearer token. Example: `,_jsx(_components.code,{children:`Bearer runtm_xxx`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The task/prompt for the agent (1–100,000 characters).`})}),`\n`,_jsx(ParamField,{body:`agent`,type:`string`,default:`claude-code`,id:`param-agent`,children:_jsxs(_components.p,{children:[`Coding agent: `,_jsx(_components.code,{children:`claude-code`}),`, `,_jsx(_components.code,{children:`codex`}),`, `,_jsx(_components.code,{children:`github-copilot`}),`, or `,_jsx(_components.code,{children:`opencode`}),`.`]})}),`\n`,_jsx(ParamField,{body:`agent_id`,type:`string`,id:`param-agent-id`,children:_jsxs(_components.p,{children:[`Roster agent UUID to run the session as — the subagent entry point. The run\ntakes that agent’s system instructions, identity and defaults, and is graded\nagainst its rubric. Subject to the agent’s `,_jsx(_components.code,{children:`callable_by`}),` allowlist; see\n`,_jsx(_components.a,{href:`/cloud-api/patterns/subagents`,children:`Trigger a subagent`}),`.`]})}),`\n`,_jsx(ParamField,{body:`approval_id`,type:`string`,id:`param-approval-id`,children:_jsxs(_components.p,{children:[`An approved approval on the `,_jsx(_components.strong,{children:`calling`}),` session, when the callee’s caller\nedge requires one. Resolved within the last 10 minutes.`]})}),`\n`,_jsx(ParamField,{body:`template`,type:`string`,id:`param-template`,children:_jsxs(_components.p,{children:[`Project template: `,_jsx(_components.code,{children:`web-app`}),`, `,_jsx(_components.code,{children:`backend-service`}),`, `,_jsx(_components.code,{children:`static-site`}),`.`]})}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,id:`param-model`,children:_jsxs(_components.p,{children:[`Model to use. Claude Code takes `,_jsx(_components.code,{children:`sonnet`}),`, `,_jsx(_components.code,{children:`opus-5`}),`, `,_jsx(_components.code,{children:`opus`}),`, `,_jsx(_components.code,{children:`haiku`}),` or `,_jsx(_components.code,{children:`fable`}),` (or the model id an alias points to, such as `,_jsx(_components.code,{children:`claude-sonnet-5-5`}),`, which runs as that alias); Codex takes `,_jsx(_components.code,{children:`gpt-6-astra`}),`, `,_jsx(_components.code,{children:`gpt-5.6-sol`}),`, `,_jsx(_components.code,{children:`gpt-5.5`}),`, `,_jsx(_components.code,{children:`gpt-5.4`}),` or `,_jsx(_components.code,{children:`gpt-5.4-mini`}),`. For those two harnesses an unknown model is a 422 that lists the valid ones. With `,_jsx(_components.code,{children:`agent_id`}),` and no `,_jsx(_components.code,{children:`model`}),`, the session runs the model set on that agent’s triggers, if any.`]})}),`\n`,_jsx(ParamField,{body:`mode`,type:`string`,default:`autopilot`,id:`param-mode`,children:_jsxs(_components.p,{children:[`Session mode: `,_jsx(_components.code,{children:`autopilot`}),` or `,_jsx(_components.code,{children:`interactive`}),`.`]})}),`\n`,_jsx(ParamField,{body:`plan_mode`,type:`boolean`,default:false,id:`param-plan-mode`,children:_jsx(_components.p,{children:`Enable plan mode (read-only analysis without making changes).`})}),`\n`,_jsx(ParamField,{body:`on_complete`,type:`string`,default:`pause`,id:`param-on-complete`,children:_jsxs(_components.p,{children:[`Lifecycle action when the prompt completes: `,_jsx(_components.code,{children:`pause`}),`, `,_jsx(_components.code,{children:`destroy`}),`, or `,_jsx(_components.code,{children:`keep_alive`}),`.`]})}),`\n`,_jsx(ParamField,{body:`ttl_minutes`,type:`integer`,id:`param-ttl-minutes`,children:_jsx(_components.p,{children:`Max session lifetime in minutes (1–1440, default 60).`})}),`\n`,_jsx(ParamField,{body:`prompt_timeout_minutes`,type:`integer`,default:15,id:`param-prompt-timeout-minutes`,children:_jsx(_components.p,{children:`Max minutes for prompt execution before timeout (1–120).`})}),`\n`,_jsx(ParamField,{body:`github_repo`,type:`object`,id:`param-github-repo`,children:_jsxs(_components.p,{children:[`GitHub repo metadata: `,_jsx(_components.code,{children:`{\"full_name\": \"owner/repo\", \"size_kb\": 1024}`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`201`}),` with the session ID and initial state.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Session ID. Use this to poll status.`})}),`\n`,_jsx(ResponseField,{name:`state`,type:`string`,id:`param-state`,children:_jsxs(_components.p,{children:[`Initial state (`,_jsx(_components.code,{children:`creating`}),`).`]})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Human-readable status message.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Launch Agent (v0)","api":"POST /api/v0/sessions/launch","description":"Create a session and fire a prompt in one call","href":"/cloud-api/sessions/launch"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a new cloud session, configures lifecycle policy, and fires the prompt as a background task. Returns immediately with the session ID - poll `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-get`,children:_jsx(_components.code,{children:`GET /api/v0/sessions/{id}`})}),` for status via the `,_jsx(_components.code,{children:`last_prompt`}),` field.`]}),`\n`,_jsx(_components.p,{children:`This is the core “fire and forget” endpoint for programmatic agent workflows. It’s the recommended entry point for Slack triggers, Linear automations, GitHub Actions, MCP servers, and any other webhook-driven integration.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Required scopes:`}),` `,_jsx(_components.code,{children:`sessions:write`}),` `,_jsx(_components.strong,{children:`and`}),` `,_jsx(_components.code,{children:`sessions:prompt`})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Need to follow up after launch? Use `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-prompt`,children:_jsx(_components.code,{children:`POST /api/v0/sessions/{id}/prompt`})}),` to send another prompt (SSE stream), `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-git`,children:_jsx(_components.code,{children:`POST /api/v0/sessions/{id}/git`})}),` to commit/push/open a PR, and `,_jsx(_components.a,{href:`/cloud-api/sessions/v0-delete`,children:_jsx(_components.code,{children:`DELETE /api/v0/sessions/{id}`})}),` to clean up.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Bearer token. Example: `,_jsx(_components.code,{children:`Bearer runtm_xxx`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The task/prompt for the agent (1–100,000 characters).`})}),`\n`,_jsx(ParamField,{body:`agent`,type:`string`,default:`claude-code`,id:`param-agent`,children:_jsxs(_components.p,{children:[`Coding agent: `,_jsx(_components.code,{children:`claude-code`}),`, `,_jsx(_components.code,{children:`codex`}),`, `,_jsx(_components.code,{children:`github-copilot`}),`, or `,_jsx(_components.code,{children:`opencode`}),`.`]})}),`\n`,_jsx(ParamField,{body:`agent_id`,type:`string`,id:`param-agent-id`,children:_jsxs(_components.p,{children:[`Roster agent UUID to run the session as — the subagent entry point. The run\ntakes that agent’s system instructions, identity and defaults, and is graded\nagainst its rubric. Subject to the agent’s `,_jsx(_components.code,{children:`callable_by`}),` allowlist; see\n`,_jsx(_components.a,{href:`/cloud-api/patterns/subagents`,children:`Trigger a subagent`}),`.`]})}),`\n`,_jsx(ParamField,{body:`approval_id`,type:`string`,id:`param-approval-id`,children:_jsxs(_components.p,{children:[`An approved approval on the `,_jsx(_components.strong,{children:`calling`}),` session, when the callee’s caller\nedge requires one. Resolved within the last 10 minutes.`]})}),`\n`,_jsx(ParamField,{body:`template`,type:`string`,id:`param-template`,children:_jsxs(_components.p,{children:[`Project template: `,_jsx(_components.code,{children:`web-app`}),`, `,_jsx(_components.code,{children:`backend-service`}),`, `,_jsx(_components.code,{children:`static-site`}),`.`]})}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,id:`param-model`,children:_jsxs(_components.p,{children:[`Model to use. Claude Code takes `,_jsx(_components.code,{children:`sonnet`}),`, `,_jsx(_components.code,{children:`opus-5`}),`, `,_jsx(_components.code,{children:`opus`}),`, `,_jsx(_components.code,{children:`haiku`}),` or `,_jsx(_components.code,{children:`fable`}),` (or the model id an alias points to, such as `,_jsx(_components.code,{children:`claude-sonnet-5-5`}),`, which runs as that alias); Codex takes `,_jsx(_components.code,{children:`gpt-6-astra`}),`, `,_jsx(_components.code,{children:`gpt-5.6-sol`}),`, `,_jsx(_components.code,{children:`gpt-5.5`}),`, `,_jsx(_components.code,{children:`gpt-5.4`}),` or `,_jsx(_components.code,{children:`gpt-5.4-mini`}),`. For those two harnesses an unknown model is a 422 that lists the valid ones. With `,_jsx(_components.code,{children:`agent_id`}),` and no `,_jsx(_components.code,{children:`model`}),`, the session runs the model set on that agent’s triggers, if any.`]})}),`\n`,_jsx(ParamField,{body:`mode`,type:`string`,default:`autopilot`,id:`param-mode`,children:_jsxs(_components.p,{children:[`Session mode: `,_jsx(_components.code,{children:`autopilot`}),` or `,_jsx(_components.code,{children:`interactive`}),`.`]})}),`\n`,_jsx(ParamField,{body:`plan_mode`,type:`boolean`,default:false,id:`param-plan-mode`,children:_jsx(_components.p,{children:`Enable plan mode (read-only analysis without making changes).`})}),`\n`,_jsx(ParamField,{body:`on_complete`,type:`string`,default:`pause`,id:`param-on-complete`,children:_jsxs(_components.p,{children:[`Lifecycle action when the prompt completes: `,_jsx(_components.code,{children:`pause`}),`, `,_jsx(_components.code,{children:`destroy`}),`, or `,_jsx(_components.code,{children:`keep_alive`}),`.`]})}),`\n`,_jsx(ParamField,{body:`ttl_minutes`,type:`integer`,id:`param-ttl-minutes`,children:_jsx(_components.p,{children:`Max session lifetime in minutes (1–1440, default 60).`})}),`\n`,_jsx(ParamField,{body:`prompt_timeout_minutes`,type:`integer`,default:15,id:`param-prompt-timeout-minutes`,children:_jsx(_components.p,{children:`Max minutes for prompt execution before timeout (1–120).`})}),`\n`,_jsx(ParamField,{body:`github_repo`,type:`object`,id:`param-github-repo`,children:_jsxs(_components.p,{children:[`GitHub repo metadata: `,_jsx(_components.code,{children:`{\"full_name\": \"owner/repo\", \"size_kb\": 1024}`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`201`}),` with the session ID and initial state.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Session ID. Use this to poll status.`})}),`\n`,_jsx(ResponseField,{name:`state`,type:`string`,id:`param-state`,children:_jsxs(_components.p,{children:[`Initial state (`,_jsx(_components.code,{children:`creating`}),`).`]})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Human-readable status message.`})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.runtm.com/api/v0/sessions/launch\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer runtm_xxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Build a REST API with FastAPI that manages TODO items\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"agent\": \"claude-code\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"template\": \"backend-service\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"on_complete\": \"pause\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ttl_minutes\": 60`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Launch the agent`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.runtm.com/api/v0/sessions/launch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer runtm_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Build a REST API with FastAPI that manages TODO items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"claude-code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"template\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"backend-service\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"on_complete\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pause\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Poll for completion`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` status `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.runtm.com/api/v0/sessions/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer runtm_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ).json()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt_status `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (status.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"last_prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {}).get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idle\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt_status `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"timed_out\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Done: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`prompt_status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`19`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.runtm.com/api/v0/sessions/launch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer runtm_xxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Build a REST API with FastAPI that manages TODO items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` agent:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"claude-code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` template:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"backend-service\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` on_complete:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pause\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Launched session: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`. Poll GET /api/v0/sessions/`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" for status.`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`201`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"86e11104-cdbb-42c9-bdc3-5212024ddb7b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"creating\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Agent launched. Poll GET /api/v0/sessions/{id} for status.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Launch Agent (v0)","api":"POST /api/v0/sessions/launch","description":"Create a session and fire a prompt in one call","href":"/cloud-api/sessions/launch"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://app.runtm.com/api/v0/sessions/launch\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer runtm_xxx\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\": \"Build a REST API with FastAPI that manages TODO items\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"agent\": \"claude-code\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"template\": \"backend-service\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"on_complete\": \"pause\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"ttl_minutes\": 60\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"30\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> time\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Launch the agent\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://app.runtm.com/api/v0/sessions/launch\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer runtm_xxx\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Build a REST API with FastAPI that manages TODO items\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"agent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"claude-code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"template\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"backend-service\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"on_complete\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pause\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">session_id \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> response.json()[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Poll for completion\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">while\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> True\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> status \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.get(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://app.runtm.com/api/v0/sessions/\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">session_id\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer runtm_xxx\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ).json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> prompt_status \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (status.get(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"last_prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">or\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {}).get(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"idle\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> if\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> prompt_status \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">in\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"completed\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"timed_out\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">):\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Done: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">prompt_status\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> break\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> time.sleep(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"19\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://app.runtm.com/api/v0/sessions/launch\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Bearer runtm_xxx\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> prompt:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Build a REST API with FastAPI that manages TODO items\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> agent:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"claude-code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> template:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"backend-service\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> on_complete:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"pause\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">id\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`Launched session: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">id\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">. Poll GET /api/v0/sessions/\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">id\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> for status.`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"201","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"86e11104-cdbb-42c9-bdc3-5212024ddb7b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"state\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"creating\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Agent launched. Poll GET /api/v0/sessions/{id} for status.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Launch Agent (v0)","path":"/api/v0/sessions/launch","servers":[{"url":"https://app.runtm.com/api/cloud"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Bearer token. Example: `Bearer runtm_xxx`","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"prompt":[{"type":"string","description":"The task/prompt for the agent (1–100,000 characters).","required":true}],"agent":[{"type":"string","description":"Coding agent: `claude-code` , `codex` , `github-copilot` , or `opencode` ."}],"agent_id":[{"type":"string","description":"Roster agent UUID to run the session as — the subagent entry point. The run takes that agent’s system instructions, identity and defaults, and is graded against its rubric. Subject to the agent’s `callable_by` allowlist; see Trigger a subagent ."}],"approval_id":[{"type":"string","description":"An approved approval on the calling session, when the callee’s caller edge requires one. Resolved within the last 10 minutes."}],"template":[{"type":"string","description":"Project template: `web-app` , `backend-service` , `static-site` ."}],"model":[{"type":"string","description":"Model to use. Claude Code takes `sonnet` , `opus-5` , `opus` , `haiku` or `fable` (or the model id an alias points to, such as `claude-sonnet-5-5` , which runs as that alias); Codex takes `gpt-6-astra` , `gpt-5.6-sol` , `gpt-5.5` , `gpt-5.4` or `gpt-5.4-mini` . For those two harnesses an unknown model is a 422 that lists the valid ones. With `agent_id` and no `model` , the session runs the model set on that agent’s triggers, if any."}],"mode":[{"type":"string","description":"Session mode: `autopilot` or `interactive` ."}],"plan_mode":[{"type":"boolean","description":"Enable plan mode (read-only analysis without making changes)."}],"on_complete":[{"type":"string","description":"Lifecycle action when the prompt completes: `pause` , `destroy` , or `keep_alive` ."}],"ttl_minutes":[{"type":"integer","description":"Max session lifetime in minutes (1–1440, default 60)."}],"prompt_timeout_minutes":[{"type":"integer","description":"Max minutes for prompt execution before timeout (1–120)."}],"github_repo":[{"type":"object","properties":{},"description":"GitHub repo metadata: `{\"full_name\": \"owner/repo\", \"size_kb\": 1024}` ."}]}}],"examples":{"example":{"value":{"prompt":"\u003cstring>","agent":"\u003cstring>","agent_id":"\u003cstring>","approval_id":"\u003cstring>","template":"\u003cstring>","model":"\u003cstring>","mode":"\u003cstring>","plan_mode":true,"on_complete":"\u003cstring>","ttl_minutes":123,"prompt_timeout_minutes":123,"github_repo":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"Session ID. Use this to poll status."}],"state":[{"type":"string","description":"Initial state ( `creating` )."}],"message":[{"type":"string","description":"Human-readable status message."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","state":"\u003cstring>","message":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"runtm","siteName":"Runtime","title":"Launch Agent (v0) - Runtime","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T20:52:51.321Z","originalFileLocation":"cloud-api/sessions/launch.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=\"light\"}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=\"Create a session and fire a prompt in one call\">\u003cmeta data-mint-head name=\"application-name\" content=\"Runtime\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_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/runtm/FI6B-a_qdEC-_rSp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Launch Agent (v0) - Runtime\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a session and fire a prompt in one call\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Runtime\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.runtm.com/cloud-api/sessions/launch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://runtm.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Launch+Agent+%28v0%29\u0026amp;description=Create+a+session+and+fire+a+prompt+in+one+call\u0026amp;theme=c3f3fd5d057757bded6a5252\u0026amp;signature=4f3ca93a3926cb6b9632132e6411fab75d07041e0cdf0ea9e86764d0ece91c19\">\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=\"Launch Agent (v0) - Runtime\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a session and fire a prompt in one call\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://runtm.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Launch+Agent+%28v0%29\u0026amp;description=Create+a+session+and+fire+a+prompt+in+one+call\u0026amp;theme=c3f3fd5d057757bded6a5252\u0026amp;signature=4f3ca93a3926cb6b9632132e6411fab75d07041e0cdf0ea9e86764d0ece91c19\">\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/runtm/FI6B-a_qdEC-_rSp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Runtime\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#18181b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.runtm.com/cloud-api/sessions/launch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cloud-api/sessions/launch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Runtime\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Runtime\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/cloud-api/sessions/launch.md","siteName":"Runtime","nav":{"global":{"anchors":[{"anchor":"GitHub","href":"https://github.com/runtm-ai/runtm","icon":"github"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart: build your first agent","href":"/quickstart"}]},{"group":"Runtime MCP server","pages":[{"title":"MCP server","href":"/mcp/overview"},{"title":"MCP authentication","href":"/mcp/authentication"},{"title":"MCP tools","href":"/mcp/tools"},{"title":"Okta and the MCP server","href":"/mcp/okta"},{"title":"MCP troubleshooting","href":"/mcp/troubleshooting"}]},{"group":"Build an agent","pages":[{"title":"Build an agent","href":"/build/overview"},{"title":"1. Define the job","href":"/build/define-the-job"},{"title":"2. Measure success","href":"/build/measure-success"},{"title":"3. Give it tools","href":"/build/give-it-tools"},{"group":"4. Define how it works","pages":[{"title":"4. Define how it works","href":"/build/how-it-works/overview"},{"title":"Skills and runbooks","href":"/build/how-it-works/skills"},{"title":"Instructions","href":"/build/how-it-works/instructions"},{"title":"Triggers","href":"/build/how-it-works/triggers"}]},{"title":"5. Prove it works and iterate","href":"/build/launch-and-iterate"},{"title":"6. Add guardrails and approvals","href":"/build/guardrails-and-approvals"}]},{"group":"Platform reference","pages":[{"title":"Sessions","href":"/concepts/sessions"},{"title":"Coding Agents","href":"/concepts/coding-agents"},{"title":"Templates","href":"/concepts/templates"},{"title":"Context","href":"/concepts/context"},{"title":"Skills","href":"/concepts/skills"},{"title":"Guardrails","href":"/concepts/guardrails"},{"title":"Deployments","href":"/concepts/deployments"},{"title":"Integrations","href":"/concepts/integrations"},{"title":"Tools and connections","href":"/concepts/tools"},{"title":"Organizations","href":"/concepts/organizations"},{"title":"Observability","href":"/concepts/observability"},{"title":"Real-time","href":"/concepts/real-time"}]}]},{"tab":"Guides","groups":[{"group":"Guides","pages":[{"title":"Guides","href":"/guides/overview"}]},{"group":"Payments operations","pages":[{"title":"Payment support agent","href":"/guides/payments/support-agent"},{"title":"Fraud and risk review agent","href":"/guides/payments/fraud-risk-agent"},{"title":"Merchant underwriting agent","href":"/guides/payments/underwriting-agent"},{"title":"Multi-agent: underwriting re-review with two approval gates","href":"/guides/payments/multi-agent-underwriting"}]},{"group":"Recipes","pages":[{"title":"Connect Stripe with a restricted read-only key","href":"/guides/recipes/connect-stripe-read-only"},{"title":"Add a KYB provider as a custom tool provider","href":"/guides/recipes/add-kyb-provider"},{"title":"Add an MCP server with an API-token connection","href":"/guides/recipes/add-mcp-server-with-token"},{"title":"Route one Linear team to a different template","href":"/guides/recipes/route-linear-team-to-template"},{"title":"Test a scheduled agent before enabling it","href":"/guides/recipes/test-scheduled-agent-before-enabling"},{"title":"Request an approval from inside a run","href":"/guides/recipes/request-approval-from-a-run"},{"title":"Delegate work to another agent","href":"/guides/recipes/delegate-to-another-agent"},{"title":"Give an agent persistent memory in Notion or Confluence","sidebarTitle":"Persistent memory in Notion or Confluence","href":"/guides/recipes/agent-memory-in-notion-or-confluence"},{"title":"Share an app's data across sessions","sidebarTitle":"Share data across sessions","href":"/guides/recipes/share-data-across-sessions"},{"title":"Agent that opens a PR on your GitHub repo","sidebarTitle":"Agent that opens PRs on GitHub","href":"/guides/recipes/repo-agent-opens-prs"}]}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Overview","href":"/cloud-api/overview"},{"title":"Agent CLI (runtm-api)","href":"/cloud-api/agent-cli"},{"title":"Authentication","href":"/cloud-api/authentication"},{"title":"Verify API Key","api":"GET /auth/verify","href":"/cloud-api/authentication/verify"},{"title":"Scopes \u0026 Permissions","href":"/cloud-api/scopes"},{"title":"Errors","href":"/cloud-api/errors"},{"title":"Rate Limits","href":"/cloud-api/rate-limits"},{"title":"Conventions","href":"/cloud-api/conventions"}]},{"group":"Patterns","pages":[{"title":"Authenticate and manage API keys","href":"/cloud-api/patterns/authentication"},{"title":"Manage sessions at scale","href":"/cloud-api/patterns/sessions-at-scale"},{"title":"Stream prompts over WebSockets","href":"/cloud-api/patterns/streaming-prompts"},{"title":"Work with session files","href":"/cloud-api/patterns/session-files"},{"title":"Handle long-running prompts","href":"/cloud-api/patterns/long-running-prompts"},{"title":"Pull activity and telemetry","href":"/cloud-api/patterns/activity-and-telemetry"},{"title":"Outbound webhooks","href":"/cloud-api/patterns/outbound-webhooks"},{"title":"Work a session from the CLI","href":"/cloud-api/patterns/session-cli-recipes"},{"title":"Trigger a subagent","href":"/cloud-api/patterns/subagents"},{"title":"Debug a session","href":"/cloud-api/patterns/debug-a-session"},{"title":"Template lifecycle from the CLI","href":"/cloud-api/patterns/template-lifecycle"}]},{"group":"Sessions","pages":[{"title":"List Sessions","api":"GET /api/sessions","href":"/cloud-api/sessions/list"},{"title":"Search Sessions","api":"GET /api/sessions:search","href":"/cloud-api/sessions/search"},{"title":"Create Session","api":"POST /api/sessions","href":"/cloud-api/sessions/create"},{"title":"Get Session","api":"GET /api/sessions/{session_id}","href":"/cloud-api/sessions/get"},{"title":"Delete Session","api":"DELETE /api/sessions/{session_id}","href":"/cloud-api/sessions/delete"},{"title":"Rename Session","api":"PATCH /api/sessions/{session_id}/name","href":"/cloud-api/sessions/rename"},{"title":"Update Visibility","api":"POST /api/sessions/{session_id}/visibility","href":"/cloud-api/sessions/visibility"},{"group":"Sharing","pages":[{"title":"Share a Preview","api":"POST /api/sessions/{session_id}/preview-shares","href":"/cloud-api/sessions/preview-shares-create"},{"title":"List Preview Shares","api":"GET /api/sessions/{session_id}/preview-shares","href":"/cloud-api/sessions/preview-shares-list"},{"title":"Revoke a Preview Share","api":"DELETE /api/sessions/{session_id}/preview-shares/{share_id}","href":"/cloud-api/sessions/preview-shares-revoke"}]},{"group":"Lifecycle","pages":[{"title":"Pause Session","api":"POST /api/sessions/{session_id}/pause","href":"/cloud-api/sessions/pause"},{"title":"Resume Session","api":"POST /api/sessions/{session_id}/resume","href":"/cloud-api/sessions/resume"},{"title":"Start Session (legacy)","api":"POST /api/sessions/{session_id}/start","href":"/cloud-api/sessions/start"},{"title":"Heartbeat (legacy)","api":"POST /api/sessions/{session_id}/heartbeat","href":"/cloud-api/sessions/heartbeat"},{"title":"Get Workspace State","api":"GET /api/sessions/{session_id}/workspace-state","href":"/cloud-api/sessions/workspace-state"},{"title":"List Collaborators","api":"GET /api/sessions/{session_id}/collaborators","href":"/cloud-api/sessions/collaborators"}]},{"group":"Prompts","pages":[{"title":"Send Prompt","api":"POST /api/sessions/{session_id}/prompt","href":"/cloud-api/sessions/prompt"},{"title":"Cancel Prompt","api":"POST /api/sessions/{session_id}/prompt/cancel","href":"/cloud-api/sessions/prompt-cancel"},{"title":"Rewind Prompt","api":"POST /api/sessions/{session_id}/prompt/rewind","href":"/cloud-api/sessions/prompt-rewind"},{"title":"Get History","api":"GET /api/sessions/{session_id}/history","href":"/cloud-api/sessions/history"},{"title":"Session Events","api":"GET /api/sessions/{session_id}/events","href":"/cloud-api/sessions/events"}]},{"group":"Files","pages":[{"title":"List Files","api":"GET /api/sessions/{session_id}/files","href":"/cloud-api/sessions/files-list"},{"title":"Read File","api":"GET /api/sessions/{session_id}/file","href":"/cloud-api/sessions/files-read"},{"title":"Write File","api":"POST /api/sessions/{session_id}/file","href":"/cloud-api/sessions/files-write"},{"title":"Delete File","api":"DELETE /api/sessions/{session_id}/file","href":"/cloud-api/sessions/files-delete"},{"title":"Rename File","api":"POST /api/sessions/{session_id}/file/rename","href":"/cloud-api/sessions/files-rename"},{"title":"Create Directory","api":"POST /api/sessions/{session_id}/file/mkdir","href":"/cloud-api/sessions/files-mkdir"},{"title":"Search Files","api":"GET /api/sessions/{session_id}/files/search","href":"/cloud-api/sessions/files-search"},{"title":"Upload File","api":"POST /api/sessions/{session_id}/file/upload","href":"/cloud-api/sessions/files-upload"},{"title":"Download File","api":"GET /api/sessions/{session_id}/file/download","href":"/cloud-api/sessions/files-download"},{"title":"Run Server","api":"POST /api/sessions/{session_id}/run-server","href":"/cloud-api/sessions/run-server"}]},{"group":"Env Vars","pages":[{"title":"Get Env Vars","api":"GET /api/sessions/{session_id}/env-vars","href":"/cloud-api/sessions/env-vars-get"},{"title":"Set Env Vars","api":"PUT /api/sessions/{session_id}/env-vars","href":"/cloud-api/sessions/env-vars-set"},{"title":"Delete Env Var","api":"DELETE /api/sessions/{session_id}/env-vars/{key}","href":"/cloud-api/sessions/env-vars-delete"},{"title":"Get Detected Env Vars","api":"GET /api/sessions/{session_id}/detected-env-vars","href":"/cloud-api/sessions/detected-env-vars"},{"title":"Detect Env Vars","api":"POST /api/sessions/{session_id}/detect-env-vars","href":"/cloud-api/sessions/detect-env-vars"}]},{"group":"Instructions","pages":[{"title":"Get Session Instructions","api":"GET /api/sessions/{session_id}/instructions","href":"/cloud-api/sessions/instructions-get"},{"title":"Set Session Instructions","api":"PUT /api/sessions/{session_id}/instructions","href":"/cloud-api/sessions/instructions-set"}]},{"group":"Git","pages":[{"title":"Clone Repository","api":"POST /api/sessions/{session_id}/clone-repo","href":"/cloud-api/sessions/git-clone"},{"title":"Git Operation","api":"POST /api/sessions/{session_id}/git","href":"/cloud-api/sessions/git-operation"},{"title":"Git Sync","api":"POST /api/sessions/{session_id}/sync-git","href":"/cloud-api/sessions/git-sync"}]},{"group":"Approvals","pages":[{"title":"List Approvals","api":"GET /api/sessions/{session_id}/approvals","href":"/cloud-api/sessions/approvals-list"},{"title":"Resolve Approval","api":"POST /api/sessions/{session_id}/approvals/{approval_id}/resolve","href":"/cloud-api/sessions/approvals-resolve"}]},{"group":"Capabilities","pages":[{"title":"Load Skills","api":"POST /api/sessions/{session_id}/skills","href":"/cloud-api/sessions/load-skills"},{"title":"Load MCP Servers","api":"POST /api/sessions/{session_id}/mcps","href":"/cloud-api/sessions/load-mcps"},{"title":"List Session Tools","api":"GET /api/sessions/{session_id}/tools","href":"/cloud-api/sessions/tools-list"},{"title":"Load Tools","api":"POST /api/sessions/{session_id}/tools","href":"/cloud-api/sessions/load-tools"}]}]},{"group":"Deploy","pages":[{"title":"Deploy Info","api":"GET /api/sessions/{session_id}/deploy/info","href":"/cloud-api/deploy/info"},{"title":"Scaffold Deploy","api":"POST /api/sessions/{session_id}/deploy/scaffold","href":"/cloud-api/deploy/scaffold"},{"title":"Validate Deploy","api":"POST /api/sessions/{session_id}/deploy/validate","href":"/cloud-api/deploy/validate"},{"title":"Deploy Preflight","api":"POST /api/sessions/{session_id}/deploy/preflight","href":"/cloud-api/deploy/preflight"},{"title":"Run Deploy","api":"POST /api/sessions/{session_id}/deploy/run","href":"/cloud-api/deploy/run"},{"title":"Get Volumes","api":"GET /api/sessions/{session_id}/deploy/volumes","href":"/cloud-api/deploy/volumes-get"},{"title":"Update Volumes","api":"PATCH /api/sessions/{session_id}/deploy/volumes","href":"/cloud-api/deploy/volumes-update"}]},{"group":"Templates","pages":[{"title":"List Templates","api":"GET /api/org-templates","href":"/cloud-api/templates/list"},{"title":"Template Repos","api":"GET /api/org-templates/repos","href":"/cloud-api/templates/repos"},{"title":"Get Template","api":"GET /api/org-templates/{template_id}","href":"/cloud-api/templates/get"},{"title":"Create Template","api":"POST /api/org-templates","href":"/cloud-api/templates/create"},{"title":"Update Template Config","api":"PATCH /api/org-templates/{template_id}","href":"/cloud-api/templates/update-config"},{"title":"Delete Template","api":"DELETE /api/org-templates/{template_id}","href":"/cloud-api/templates/delete"},{"group":"Builds","pages":[{"title":"Build Template","api":"POST /api/org-templates/{template_id}/build","href":"/cloud-api/templates/build"},{"title":"Build Logs","api":"GET /api/org-templates/{template_id}/build-logs","href":"/cloud-api/templates/build-logs"},{"title":"Build Logs History","api":"GET /api/org-templates/{template_id}/build-logs-history","href":"/cloud-api/templates/build-logs-history"},{"title":"Fix Session","api":"POST /api/org-templates/{template_id}/fix-session","href":"/cloud-api/templates/fix-session"},{"title":"Save Snapshot","api":"POST /api/org-templates/{template_id}/save-snapshot","href":"/cloud-api/templates/save-snapshot"}]},{"group":"Secrets","pages":[{"title":"List Template Secrets","api":"GET /api/org-templates/{template_id}/secrets","href":"/cloud-api/templates/secrets-list"},{"title":"Update Template Secrets","api":"PUT /api/org-templates/{template_id}/secrets","href":"/cloud-api/templates/secrets-update"},{"title":"Delete Template Secret","api":"DELETE /api/org-templates/{template_id}/secrets/{secret_key}","href":"/cloud-api/templates/secret-delete"}]},{"group":"Context","pages":[{"title":"Get Template Context","api":"GET /api/org-templates/{template_id}/context","href":"/cloud-api/templates/context-get"},{"title":"Set Template Context","api":"PUT /api/org-templates/{template_id}/context","href":"/cloud-api/templates/context-set"},{"title":"Resolve Template Context","api":"GET /api/org-templates/{template_id}/context:resolve","href":"/cloud-api/templates/context-resolve"}]},{"group":"Guardrails","pages":[{"title":"List Template Guardrails","api":"GET /api/org-templates/{template_id}/guardrails","href":"/cloud-api/templates/guardrails-list"},{"title":"Create Template Guardrail","api":"POST /api/org-templates/{template_id}/guardrails","href":"/cloud-api/templates/guardrails-create"},{"title":"Update Template Guardrail","api":"PATCH /api/org-templates/{template_id}/guardrails/{guardrail_id}","href":"/cloud-api/templates/guardrails-update"},{"title":"Delete Template Guardrail","api":"DELETE /api/org-templates/{template_id}/guardrails/{guardrail_id}","href":"/cloud-api/templates/guardrails-delete"},{"title":"Resolve Template Guardrails","api":"GET /api/org-templates/{template_id}/guardrails:resolve","href":"/cloud-api/templates/guardrails-resolve"}]}]},{"group":"Scheduled Agents","pages":[{"title":"Scheduled Agents","href":"/cloud-api/scheduled-agents/overview"},{"title":"List Scheduled Agents","api":"GET /api/v1/scheduled-agents","href":"/cloud-api/scheduled-agents/list"},{"title":"Get Scheduled Agent","api":"GET /api/v1/scheduled-agents/{agent_id}","href":"/cloud-api/scheduled-agents/get"},{"title":"Create Scheduled Agent","api":"POST /api/v1/scheduled-agents","href":"/cloud-api/scheduled-agents/create"},{"title":"Update Scheduled Agent","api":"PATCH /api/v1/scheduled-agents/{agent_id}","href":"/cloud-api/scheduled-agents/update"},{"title":"Run Scheduled Agent Now","api":"POST /api/v1/scheduled-agents/{agent_id}:run","href":"/cloud-api/scheduled-agents/run"},{"title":"Delete Scheduled Agent","api":"DELETE /api/v1/scheduled-agents/{agent_id}","href":"/cloud-api/scheduled-agents/delete"}]},{"group":"Agents","pages":[{"title":"Agents","href":"/cloud-api/agents/overview"},{"title":"List Agents","api":"GET /api/v1/agents","href":"/cloud-api/agents/list"},{"title":"Get Agent","api":"GET /api/v1/agents/{agent_id}","href":"/cloud-api/agents/get"},{"title":"Create Agent","api":"POST /api/v1/agents","href":"/cloud-api/agents/create"},{"title":"Update Agent","api":"PATCH /api/v1/agents/{agent_id}","href":"/cloud-api/agents/update"},{"title":"Delete Agent","api":"DELETE /api/v1/agents/{agent_id}","href":"/cloud-api/agents/delete"},{"title":"List Trigger Credentials","api":"GET /api/v1/agents/trigger-credentials","href":"/cloud-api/agents/trigger-credentials"}]},{"group":"Groups","pages":[{"title":"Group Usage","api":"GET /api/groups/{team_id}/usage","href":"/cloud-api/groups/usage"}]},{"group":"Deployments","pages":[{"title":"List Deployments","api":"GET /api/v0/deployments","href":"/cloud-api/deployments/list"},{"title":"Get Deployment","api":"GET /api/v0/deployments/{deployment_id}","href":"/cloud-api/deployments/get"},{"title":"Deployment Logs","api":"GET /api/v0/deployments/{deployment_id}/logs","href":"/cloud-api/deployments/logs"},{"title":"Destroy Deployment","api":"DELETE /api/v0/deployments/{deployment_id}","href":"/cloud-api/deployments/destroy"}]},{"group":"Secrets","pages":[{"title":"Resolved Secrets","api":"GET /api/secrets/resolved","href":"/cloud-api/secrets/resolved"},{"group":"Personal","pages":[{"title":"List Personal Secrets","api":"GET /api/secrets/personal","href":"/cloud-api/secrets/personal-list"},{"title":"Set Personal Secret","api":"PUT /api/secrets/personal","href":"/cloud-api/secrets/personal-set"},{"title":"Delete Personal Secret","api":"DELETE /api/secrets/personal/{name}","href":"/cloud-api/secrets/personal-delete"}]},{"group":"Team","pages":[{"title":"List Team Secrets","api":"GET /api/secrets/team","href":"/cloud-api/secrets/team-list"},{"title":"Set Team Secret","api":"PUT /api/secrets/team","href":"/cloud-api/secrets/team-set"},{"title":"Delete Team Secret","api":"DELETE /api/secrets/team/{name}","href":"/cloud-api/secrets/team-delete"}]}]},{"group":"Context","pages":[{"title":"Get User Instructions","api":"GET /api/user/instructions","href":"/cloud-api/context/user-instructions-get"},{"title":"Set User Instructions","api":"PUT /api/user/instructions","href":"/cloud-api/context/user-instructions-set"},{"title":"Get Org Instructions","api":"GET /api/organizations/{org_id}/instructions","href":"/cloud-api/context/org-instructions-get"},{"title":"Set Org Instructions","api":"PUT /api/organizations/{org_id}/instructions","href":"/cloud-api/context/org-instructions-set"},{"group":"Skills","pages":[{"title":"List Skills","api":"GET /api/agent-directives","href":"/cloud-api/context/skills/list"},{"title":"Create Skill","api":"POST /api/agent-directives","href":"/cloud-api/context/skills/create"},{"title":"Get Skill","api":"GET /api/agent-directives/{directive_id}","href":"/cloud-api/context/skills/get"},{"title":"Update Skill","api":"PATCH /api/agent-directives/{directive_id}","href":"/cloud-api/context/skills/patch"},{"title":"Delete Skill","api":"DELETE /api/agent-directives/{directive_id}","href":"/cloud-api/context/skills/delete"},{"title":"Resync Skill","api":"POST /api/agent-directives/{directive_id}:resync","href":"/cloud-api/context/skills/resync"},{"title":"Presign Upload","api":"POST /api/agent-directives/{directive_id}/files:presign-upload","href":"/cloud-api/context/skills/presign-upload"},{"title":"Discover Skills in Repo","api":"POST /api/agent-directives:discover-in-repo","href":"/cloud-api/context/skills/discover-in-repo"},{"title":"Import Skill","api":"POST /api/agent-directives:import","href":"/cloud-api/context/skills/import"},{"title":"List Attachments","api":"GET /api/agent-directives/{directive_id}/attachments","href":"/cloud-api/context/skills/attachments-list"},{"title":"Replace Attachments","api":"PUT /api/agent-directives/{directive_id}/attachments","href":"/cloud-api/context/skills/attachments-replace"},{"title":"Lock Directive","api":"POST /api/agent-directives/{directive_id}:lock","href":"/cloud-api/context/skills/lock"},{"title":"Unlock Directive","api":"POST /api/agent-directives/{directive_id}:unlock","href":"/cloud-api/context/skills/unlock"},{"title":"Directive Facets","api":"GET /api/agent-directives:facets","href":"/cloud-api/context/skills/facets"}]}]},{"group":"Knowledge","pages":[{"title":"Knowledge Catalog","api":"GET /api/knowledge/catalog","href":"/cloud-api/context/knowledge/catalog"},{"title":"List Knowledge Integrations","api":"GET /api/knowledge/integrations","href":"/cloud-api/context/knowledge/list"},{"title":"Create Knowledge Integration","api":"POST /api/knowledge/integrations","href":"/cloud-api/context/knowledge/create"},{"title":"Get Knowledge Integration","api":"GET /api/knowledge/integrations/{integration_id}","href":"/cloud-api/context/knowledge/get"},{"title":"Update Knowledge Integration","api":"PATCH /api/knowledge/integrations/{integration_id}","href":"/cloud-api/context/knowledge/patch"},{"title":"Rotate Credentials","api":"POST /api/knowledge/integrations/{integration_id}:rotate","href":"/cloud-api/context/knowledge/rotate"},{"title":"Test Knowledge Integration","api":"POST /api/knowledge/integrations/{integration_id}:test","href":"/cloud-api/context/knowledge/test"},{"title":"Delete Knowledge Integration","api":"DELETE /api/knowledge/integrations/{integration_id}","href":"/cloud-api/context/knowledge/delete"},{"title":"OAuth Install","api":"POST /api/knowledge/oauth/{provider_id}/{auth_method_id}/install","href":"/cloud-api/context/knowledge/oauth-install"}]},{"group":"Guardrails","pages":[{"title":"Get Allowlist Policy","api":"GET /api/organizations/{org_id}/allowlist-policy","href":"/cloud-api/guardrails/allowlist-policy-get"},{"title":"Set Allowlist Policy","api":"PUT /api/organizations/{org_id}/allowlist-policy","href":"/cloud-api/guardrails/allowlist-policy-set"},{"title":"Get Org Limits","api":"GET /api/organizations/{org_id}/limits","href":"/cloud-api/guardrails/org-limits-get"},{"title":"Set Org Limits","api":"PUT /api/organizations/{org_id}/limits","href":"/cloud-api/guardrails/org-limits-set"},{"title":"Org Cleanup","api":"DELETE /api/organizations/{org_id}/cleanup","href":"/cloud-api/guardrails/org-cleanup"},{"title":"Deploy Permission","api":"GET /api/organizations/{org_id}/can-deploy","href":"/cloud-api/guardrails/deploy-permission"},{"title":"Deploy Limits","api":"GET /api/deploy/limits","href":"/cloud-api/guardrails/deploy-limits"}]},{"group":"Provider Keys","pages":[{"title":"Resolved Key","api":"GET /api/user/provider-keys/{provider}/resolved","href":"/cloud-api/provider-keys/resolved"},{"title":"Current Plan","api":"GET /api/user/current-plan","href":"/cloud-api/provider-keys/current-plan"},{"group":"User Keys","pages":[{"title":"Get User Provider Key","api":"GET /api/user/provider-keys/{provider}","href":"/cloud-api/provider-keys/user-get"},{"title":"Set User Provider Key","api":"PUT /api/user/provider-keys/{provider}","href":"/cloud-api/provider-keys/user-set"},{"title":"Delete User Provider Key","api":"DELETE /api/user/provider-keys/{provider}","href":"/cloud-api/provider-keys/user-delete"}]},{"group":"Org Keys","pages":[{"title":"Get Org Provider Key","api":"GET /api/organizations/{org_id}/provider-keys/{provider}","href":"/cloud-api/provider-keys/org-get"},{"title":"Set Org Provider Key","api":"PUT /api/organizations/{org_id}/provider-keys/{provider}","href":"/cloud-api/provider-keys/org-set"},{"title":"Delete Org Provider Key","api":"DELETE /api/organizations/{org_id}/provider-keys/{provider}","href":"/cloud-api/provider-keys/org-delete"}]}]},{"group":"Activity","pages":[{"title":"Agent Scorecard","api":"GET /api/sessions/telemetry/agents","href":"/cloud-api/activity/agent-scorecard"},{"title":"Session Grade","api":"GET /api/sessions/{session_id}/grade","href":"/cloud-api/activity/session-grade"},{"group":"Personal","pages":[{"title":"Personal Activity","api":"GET /api/sessions/telemetry/activity","href":"/cloud-api/activity/personal-activity"},{"title":"Personal Summary","api":"GET /api/sessions/telemetry/summary","href":"/cloud-api/activity/personal-summary"},{"title":"Recent Prompts","api":"GET /api/sessions/telemetry/prompts","href":"/cloud-api/activity/recent-prompts"},{"title":"Session Usage","api":"GET /api/sessions/{session_id}/usage","href":"/cloud-api/activity/session-usage"}]},{"group":"Team","pages":[{"title":"Team Summary","api":"GET /api/sessions/telemetry/team/summary","href":"/cloud-api/activity/team-summary"},{"title":"Team Activity","api":"GET /api/sessions/telemetry/team/activity","href":"/cloud-api/activity/team-activity"},{"title":"Team Members","api":"GET /api/sessions/telemetry/team/members","href":"/cloud-api/activity/team-members"},{"title":"Team Deploy Metrics","api":"GET /api/v0/telemetry/team/metrics/summary","href":"/cloud-api/activity/team-deploy-metrics"},{"title":"Team Events","api":"GET /api/v0/telemetry/team/events","href":"/cloud-api/activity/team-events"},{"title":"Team Traces","api":"GET /api/v0/telemetry/team/traces","href":"/cloud-api/activity/team-traces"}]}]},{"group":"GitHub App","pages":[{"title":"List Installations","api":"GET /api/github-app/installations","href":"/cloud-api/integrations/github-app/installations-list"},{"title":"List Repos","api":"GET /api/github-app/repos","href":"/cloud-api/integrations/github-app/repos-list"},{"title":"Installation Repos","api":"GET /api/github-app/installations/{installation_id}/repos","href":"/cloud-api/integrations/github-app/installation-repos"},{"title":"Installation Token","api":"GET /api/github-app/installations/{installation_id}/token","href":"/cloud-api/integrations/github-app/installation-token"},{"title":"Add Repo to Installation","api":"POST /api/github-app/installations/{installation_id}/add-repo","href":"/cloud-api/integrations/github-app/installation-add-repo"},{"title":"Delete Installation","api":"DELETE /api/github-app/installations/{installation_id}","href":"/cloud-api/integrations/github-app/installation-delete"},{"title":"Token for Repo","api":"GET /api/github-app/token-for-repo","href":"/cloud-api/integrations/github-app/token-for-repo"}]},{"group":"GitHub User Tokens","pages":[{"title":"Authorize","api":"POST /api/github-app/authorize","href":"/cloud-api/integrations/github-user-tokens/authorize"},{"title":"Get User Token","api":"GET /api/github-app/user-token","href":"/cloud-api/integrations/github-user-tokens/user-token"},{"title":"Token Status","api":"GET /api/github-app/user-token-status","href":"/cloud-api/integrations/github-user-tokens/user-token-status"},{"title":"Validate Token","api":"GET /api/github-app/user-token/validate","href":"/cloud-api/integrations/github-user-tokens/user-token-validate"},{"title":"Delete Token","api":"DELETE /api/github-app/user-token","href":"/cloud-api/integrations/github-user-tokens/user-token-delete"}]},{"group":"Linear","pages":[{"title":"OAuth Install URL","api":"GET /api/v1/linear/oauth/install-url","href":"/cloud-api/integrations/linear/oauth-install"},{"title":"Get Integration","api":"GET /api/v1/linear/integration","href":"/cloud-api/integrations/linear/integration-get"},{"title":"Update Integration","api":"POST /api/v1/linear/integration","href":"/cloud-api/integrations/linear/integration-update"},{"title":"Delete Integration","api":"DELETE /api/v1/linear/integration","href":"/cloud-api/integrations/linear/integration-delete"},{"title":"List Projects","api":"GET /api/v1/linear/projects","href":"/cloud-api/integrations/linear/projects"},{"title":"Get User Connection","api":"GET /api/v1/linear/user-connection","href":"/cloud-api/integrations/linear/user-connection-get"},{"title":"Delete User Connection","api":"DELETE /api/v1/linear/user-connection","href":"/cloud-api/integrations/linear/user-connection-delete"},{"title":"List Linear Integrations","api":"GET /api/v1/linear/integrations","href":"/cloud-api/integrations/linear/integrations-list"},{"title":"Create Manual Linear Bot","api":"POST /api/v1/linear/integrations/manual","href":"/cloud-api/integrations/linear/integrations-manual"},{"title":"Get Linear Integration by ID","api":"GET /api/v1/linear/integrations/{integration_id}","href":"/cloud-api/integrations/linear/integrations-item"},{"title":"List Linear Teams","api":"GET /api/v1/linear/teams","href":"/cloud-api/integrations/linear/teams"},{"group":"Email","pages":[{"title":"Email Availability","api":"GET /api/v1/email/status","href":"/cloud-api/integrations/email/status"},{"title":"List Email Integrations","api":"GET /api/v1/email/integrations","href":"/cloud-api/integrations/email/list"},{"title":"Provision Email Integration","api":"POST /api/v1/email/integration","href":"/cloud-api/integrations/email/provision"},{"title":"Update Email Integration","api":"PUT /api/v1/email/integration/{integration_id}","href":"/cloud-api/integrations/email/update"},{"title":"Delete Email Integration","api":"DELETE /api/v1/email/integration/{integration_id}","href":"/cloud-api/integrations/email/delete"}]}]},{"group":"Slack","pages":[{"title":"OAuth Install URL","api":"GET /api/v1/slack/oauth/install-url","href":"/cloud-api/integrations/slack/oauth-install"},{"title":"App Manifest","api":"GET /api/v1/slack/manifest","href":"/cloud-api/integrations/slack/manifest"},{"title":"Get Integration","api":"GET /api/v1/slack/integration","href":"/cloud-api/integrations/slack/integration-get"},{"title":"Save Integration","api":"POST /api/v1/slack/integration","href":"/cloud-api/integrations/slack/integration-save"},{"title":"Test Integration","api":"POST /api/v1/slack/integration/test","href":"/cloud-api/integrations/slack/integration-test"},{"title":"Delete Integration","api":"DELETE /api/v1/slack/integration","href":"/cloud-api/integrations/slack/integration-delete"}]},{"group":"WebSockets","pages":[{"title":"WebSockets Overview","href":"/cloud-api/websockets/overview"},{"title":"Token Exchange","api":"POST /api/sessions/{session_id}/ws-token","href":"/cloud-api/websockets/token-exchange"},{"title":"Terminal WebSocket","href":"/cloud-api/websockets/terminal"},{"title":"Prompt WebSocket","href":"/cloud-api/websockets/prompt"},{"title":"Collaboration WebSocket","href":"/cloud-api/websockets/collaboration"}]}]},{"tab":"Open Source","groups":[{"group":"Open Source","pages":[{"title":"Open Source","href":"/open-source/overview"}]},{"group":"Guides","pages":[{"title":"Agent Workflow","href":"/open-source/guides/agent-workflow"},{"title":"Discovery Metadata","href":"/open-source/guides/discovery"},{"title":"Logs \u0026 Debugging","href":"/open-source/guides/logs-debugging"},{"title":"Troubleshooting","href":"/open-source/guides/troubleshooting"}]},{"group":"Features","pages":[{"title":"Machine Tiers","href":"/open-source/features/machine-tiers"},{"title":"Secrets \u0026 Environment Variables","href":"/open-source/features/secrets"},{"title":"Database","href":"/open-source/features/database"},{"title":"Authentication","href":"/open-source/features/auth"},{"title":"Custom Domains","href":"/open-source/features/custom-domains"}]},{"group":"OSS Templates","pages":[{"title":"Templates","href":"/open-source/templates/overview"},{"title":"backend-service","href":"/open-source/templates/backend-service"},{"title":"static-site","href":"/open-source/templates/static-site"},{"title":"web-app","href":"/open-source/templates/web-app"},{"title":"Docker Template","href":"/open-source/templates/docker"}]},{"group":"CLI Reference","pages":[{"title":"CLI Overview","href":"/open-source/cli/overview"},{"title":"Sandbox Sessions","href":"/open-source/cli/session"},{"title":"Authentication","href":"/open-source/cli/auth"},{"title":"init","href":"/open-source/cli/init"},{"title":"run","href":"/open-source/cli/run"},{"title":"deploy","href":"/open-source/cli/deploy"},{"title":"validate","href":"/open-source/cli/validate"},{"title":"fix","href":"/open-source/cli/fix"},{"title":"status","href":"/open-source/cli/status"},{"title":"logs","href":"/open-source/cli/logs"},{"title":"list","href":"/open-source/cli/list"},{"title":"search","href":"/open-source/cli/search"},{"title":"destroy","href":"/open-source/cli/destroy"},{"title":"secrets","href":"/open-source/cli/secrets"},{"title":"domain","href":"/open-source/cli/domain"},{"title":"config","href":"/open-source/cli/config"},{"title":"approve","href":"/open-source/cli/approve"}]},{"group":"Self-Hosting","pages":[{"title":"Self-Hosting","href":"/open-source/self-hosting/overview"},{"title":"Requirements","href":"/open-source/self-hosting/requirements"},{"title":"Docker Compose Setup","href":"/open-source/self-hosting/docker-compose"},{"title":"Configuration","href":"/open-source/self-hosting/configuration"},{"title":"Admin Commands","href":"/open-source/self-hosting/admin-commands"}]},{"group":"OSS API","pages":[{"title":"API Overview","href":"/open-source/api/overview"}]},{"group":"Deployments","pages":[{"title":"List Deployments","api":"GET /v0/deployments","href":"/open-source/api/deployments/list"},{"title":"Create Deployment","api":"POST /v0/deployments","href":"/open-source/api/deployments/create"},{"title":"Get Deployment","api":"GET /v0/deployments/{deployment_id}","href":"/open-source/api/deployments/get"},{"title":"Delete Deployment","api":"DELETE /v0/deployments/{deployment_id}","href":"/open-source/api/deployments/delete"},{"title":"Search Deployments","api":"GET /v0/deployments/search","href":"/open-source/api/deployments/search"}]},{"group":"Logs","pages":[{"title":"Get Logs","api":"GET /v0/deployments/{deployment_id}/logs","href":"/open-source/api/logs"}]},{"group":"Domains","pages":[{"title":"Add Domain","api":"POST /v0/deployments/{deployment_id}/domains","href":"/open-source/api/domains/add"},{"title":"Get Domain Status","api":"GET /v0/deployments/{deployment_id}/domains/{hostname}","href":"/open-source/api/domains/get"},{"title":"Remove Domain","api":"DELETE /v0/deployments/{deployment_id}/domains/{hostname}","href":"/open-source/api/domains/remove"}]},{"group":"User","pages":[{"title":"Get Current User","api":"GET /v1/me","href":"/open-source/api/user/me"}]}]},{"tab":"Release notes","groups":[{"group":"Release notes","pages":[{"title":"Release notes","href":"/release-notes"}]}]}]},"basePath":"","title":"Launch Agent (v0) - Runtime","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js"]}