Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to POST /chat for single-message integrations.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TeamAI Docs","colors":{"primary":"#000000","light":"#FFFFFF","dark":"#0D001D"},"logo":{"light":"https://mintcdn.com/teamai/lhHWH0zUY4wlbttv/logos/wordmark.svg?fit=max\u0026auto=format\u0026n=lhHWH0zUY4wlbttv\u0026q=85\u0026s=578f75fc8a84b08823c6dba2c1ff281e","dark":"https://mintcdn.com/teamai/lhHWH0zUY4wlbttv/logos/wordmark-dark.svg?fit=max\u0026auto=format\u0026n=lhHWH0zUY4wlbttv\u0026q=85\u0026s=1bf26a05347b8d7161c27875acaf01a8","href":"https://teamai.com"},"favicon":"https://mintcdn.com/teamai/FUwfXyttac9Mm-Zw/logos/favicon-V2.png?fit=max\u0026auto=format\u0026n=FUwfXyttac9Mm-Zw\u0026q=85\u0026s=558f7f6c0559a2da3174c0e3d90ab8c7","background":{"color":{"dark":"#090014"}},"navbar":{"links":[{"href":"mailto:support@teamai.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.teamai.com"}},"footer":{"socials":{"github":"https://github.com/TAI-App","linkedin":"https://www.linkedin.com/products/webfxinc-teamai","website":"https://teamai.com"}},"integrations":{"ga4":{"measurementId":"G-S6238N6JDN"},"intercom":{"appId":"slb2j39i"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Help Center","icon":{"style":"sharp-solid","name":"circle-info"},"href":"https://help.teamai.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"teamai","hasAudioNarration":false,"actualSubdomain":"teamai","customDomains":["docs.teamai.com"],"gitSource":{"type":"github","owner":"tai-app","repo":"docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ada684b10f58d729c687115","collectionId":"f00857cb-e401-4423-8632-e9b860565b33","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ada684b10f58d729c687115"},"feedback":{"thumbs":true,"edits":true},"entitlements":{},"buildId":"6ada684b10f58d729c687115","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":16},{"language":"default","tag":"Projects","count":7},{"language":"default","tag":"SDKs","count":7},{"language":"default","tag":"Embed SDK","count":7},{"language":"default","tag":"Chat","count":4},{"language":"default","tag":"Agents","count":2},{"language":"default","tag":"Getting Started","count":2},{"language":"default","tag":"Skills","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/agents/run-agent","slug":"/api-reference/agents/run-agent","pageMetadata":{"title":"Run agent","openapi":"POST /agents/{agentId}/runs","description":"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to `POST /chat` for single-message integrations.\n","href":"/api-reference/agents/run-agent"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to \", _jsx(_components.code, {\n children: \"POST /chat\"\n }), \" for single-message integrations.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Run agent","openapi":"POST /agents/{agentId}/runs","description":"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to `POST /chat` for single-message integrations.\n","href":"/api-reference/agents/run-agent"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Agents"],"summary":"Run agent","description":"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to `POST /chat` for single-message integrations.\n","parameters":["b27c53eb-0407-4bbd-bb3b-3d154d57a9a9"],"requestBody":"9e9480bd-0ce9-4774-b307-de0c876842fd","responses":{"200":"cbf563d5-7d91-46cf-b782-808918a8f108","400":"3c27754b-ade3-4c32-a93d-a922f01c73eb","401":"140843e3-1986-43dd-8f2f-4d7f092b1118","404":"337ac593-3a9d-4ab5-b620-e8ccc231eb95","500":"0039ee47-2ebb-4637-98e5-0377a4417259"},"method":"post","type":"path","servers":["c3aeea90-83a0-402e-82b0-72971e2c170f"],"security":["26cf9262-bb3e-4c57-a0bd-06058512efa2"],"path":"/agents/{agentId}/runs","baseUrlOptions":["https://app.teamai.com/api/v1"],"title":"Run agent","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"b27c53eb-0407-4bbd-bb3b-3d154d57a9a9":{"name":"agentId","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"Agent to run.","uniqueKey":"","typeLabel":"string"},"description":"Agent to run."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"description":"User message text.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"chatId":{"type":"string","description":"Existing chat to continue.","uniqueKey":"chatId","typeLabel":"string"},"projectId":{"type":"string","description":"Project context to include.","uniqueKey":"projectId","typeLabel":"string"},"variables":{"type":"object","additionalProperties":true,"uniqueKey":"variables","typeLabel":"object"},"systemVariables":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"systemVariables.user.id","typeLabel":"string"},"name":{"type":"string","uniqueKey":"systemVariables.user.name","typeLabel":"string"},"email":{"type":"string","uniqueKey":"systemVariables.user.email","typeLabel":"string"}},"uniqueKey":"systemVariables.user","typeLabel":"object"}},"uniqueKey":"systemVariables","typeLabel":"object"},"temperature":{"type":"number","minimum":0,"maximum":2,"uniqueKey":"temperature","typeLabel":"number"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","chatId":"\u003cstring>","projectId":"\u003cstring>","variables":{},"systemVariables":{"user":{"id":"\u003cstring>","name":"\u003cstring>","email":"\u003cstring>"}},"temperature":1,"model":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"cbf563d5-7d91-46cf-b782-808918a8f108":{"description":"Completed agent run.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Agent run ID.","uniqueKey":"data.id","typeLabel":"string"},"status":{"type":"string","example":"completed","uniqueKey":"data.status","typeLabel":"string"},"agentId":{"type":"string","uniqueKey":"data.agentId","typeLabel":"string"},"agentName":{"type":"string","uniqueKey":"data.agentName","typeLabel":"string"},"agentResponse":{"type":"string","description":"Assistant reply text.","uniqueKey":"data.agentResponse","typeLabel":"string"},"chatId":{"type":"string","uniqueKey":"data.chatId","typeLabel":"string"},"input":{"type":"string","description":"Echo of the request message.","uniqueKey":"data.input","typeLabel":"string"},"executionTime":{"type":"number","description":"Execution time in whole seconds.","uniqueKey":"data.executionTime","typeLabel":"number"},"createdAt":{"type":"string","format":"date-time","uniqueKey":"data.createdAt","typeLabel":"string\u003cdate-time>"},"completedAt":{"type":"string","format":"date-time","uniqueKey":"data.completedAt","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"id":"\u003cstring>","status":"completed","agentId":"\u003cstring>","agentName":"\u003cstring>","agentResponse":"\u003cstring>","chatId":"\u003cstring>","input":"\u003cstring>","executionTime":123,"createdAt":"2023-11-07T05:31:56Z","completedAt":"2023-11-07T05:31:56Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"3c27754b-ade3-4c32-a93d-a922f01c73eb":{"description":"Request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"bad_request","uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description.","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Additional error context.","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"bad_request","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"140843e3-1986-43dd-8f2f-4d7f092b1118":{"description":"API key missing or invalid (`not_authenticated`), or valid but not permitted to access this resource (`unauthorized`).\n","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"bad_request","uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description.","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Additional error context.","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"bad_request","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"337ac593-3a9d-4ab5-b620-e8ccc231eb95":{"description":"Requested resource does not exist or is not visible to this key.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"bad_request","uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description.","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Additional error context.","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"bad_request","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"0039ee47-2ebb-4637-98e5-0377a4417259":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"bad_request","uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description.","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","additionalProperties":true,"description":"Additional error context.","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"bad_request","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"26cf9262-bb3e-4c57-a0bd-06058512efa2":{"apiKey":{"type":"apiKey","in":"header","name":"x-teamai-api-key","description":"Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).\n","scopes":[],"schemeName":"apiKey"}}},"servers":{"c3aeea90-83a0-402e-82b0-72971e2c170f":{"url":"https://app.teamai.com/api/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-teamai-api-key","description":"Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).\n","scopes":[],"schemeName":"apiKey"},"schema":{"title":"x-teamai-api-key","type":"string","description":"Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).\n","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"x-teamai-api-key"}],"title":"apiKey"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"teamai","siteName":"TeamAI Docs","title":"Run agent - TeamAI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-03T19:54:49.092Z","originalFileLocation":"api-reference/agents/run-agent.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to POST /chat for single-message integrations.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TeamAI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_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/teamai/lLFWyrorN5Bt_2CK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run agent - TeamAI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to POST /chat for single-message integrations.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TeamAI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.teamai.com/api-reference/agents/run-agent\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://teamai.mintlify.app/_mintlify/api/og/v2?division=Agents\u0026amp;title=Run+agent\u0026amp;description=Executes+an+agent+with+a+single+text+message+and+waits+for+the+response.+Creates+a+chat+%28or+continues+an+existing+one%29+and+records+an+agent+run.+Simpler+alterna\u0026amp;theme=3ecc1ad1139b15d1c46a3316\u0026amp;signature=5005f2fce8dcafee9cfd0f26db8f806187f30dfbc2944f7ae5913c43e69fa9f9\">\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=\"Run agent - TeamAI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to POST /chat for single-message integrations.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://teamai.mintlify.app/_mintlify/api/og/v2?division=Agents\u0026amp;title=Run+agent\u0026amp;description=Executes+an+agent+with+a+single+text+message+and+waits+for+the+response.+Creates+a+chat+%28or+continues+an+existing+one%29+and+records+an+agent+run.+Simpler+alterna\u0026amp;theme=3ecc1ad1139b15d1c46a3316\u0026amp;signature=5005f2fce8dcafee9cfd0f26db8f806187f30dfbc2944f7ae5913c43e69fa9f9\">\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/teamai/lLFWyrorN5Bt_2CK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TeamAI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.teamai.com/api-reference/agents/run-agent\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/agents/run-agent.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.teamai.com/#organization\",\"name\":\"TeamAI Docs\",\"url\":\"https://docs.teamai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/teamai/lhHWH0zUY4wlbttv/logos/wordmark.svg?fit=max\u0026auto=format\u0026n=lhHWH0zUY4wlbttv\u0026q=85\u0026s=578f75fc8a84b08823c6dba2c1ff281e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.teamai.com#website\",\"name\":\"TeamAI Docs\",\"url\":\"https://docs.teamai.com\",\"publisher\":{\"@id\":\"https://docs.teamai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.teamai.com/api-reference/agents/run-agent#webpage\",\"url\":\"https://docs.teamai.com/api-reference/agents/run-agent\",\"name\":\"Run agent\",\"description\":\"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to POST /chat for single-message integrations.\",\"dateModified\":\"2026-08-03T19:54:49.092Z\",\"isPartOf\":{\"@id\":\"https://docs.teamai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.teamai.com/api-reference/agents/run-agent#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.teamai.com/api-reference/agents/run-agent#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"TeamAI Docs\",\"item\":\"https://docs.teamai.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run agent\",\"item\":\"https://docs.teamai.com/api-reference/agents/run-agent\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.teamai.com/api-reference/agents/run-agent#apireference\",\"headline\":\"Run agent\",\"name\":\"Run agent\",\"description\":\"Executes an agent with a single text message and waits for the response. Creates a chat (or continues an existing one) and records an agent run. Simpler alternative to POST /chat for single-message integrations.\",\"url\":\"https://docs.teamai.com/api-reference/agents/run-agent\",\"mainEntityOfPage\":{\"@id\":\"https://docs.teamai.com/api-reference/agents/run-agent#webpage\"},\"dateModified\":\"2026-08-03T19:54:49.092Z\",\"publisher\":{\"@id\":\"https://docs.teamai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.teamai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TeamAI Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"TeamAI Docs","nav":{"global":{"anchors":[{"anchor":"Help Center","icon":{"style":"sharp-solid","name":"circle-info"},"href":"https://help.teamai.com"}]},"tabs":[{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"rocket","href":"/api-reference/introduction"},{"title":"Authentication","icon":"key","href":"/api-reference/authentication"}]},{"group":"Chat","pages":[{"title":"Create chat completion","openapi":"POST /chat","href":"/api-reference/chat/create-chat-completion"},{"title":"Get chat share link","openapi":"GET /chats/{chatId}/share","href":"/api-reference/chat/get-chat-share"},{"title":"Create or refresh chat share link","openapi":"POST /chats/{chatId}/share","href":"/api-reference/chat/create-chat-share"},{"title":"Revoke chat share link","openapi":"DELETE /chats/{chatId}/share","description":"Permanently revokes the chat's share link. The URL stops working for good. Sharing the chat again creates a new link with a new URL. To turn a link off and back on without changing its URL, use the share dialog in the app.\n\nThe API key acts as its user: the chat must be in the key's workspace and that user must have access to it.\n\nDeleting a chat also permanently deletes its share links.\n","href":"/api-reference/chat/revoke-chat-share"}]},{"group":"Agents","pages":[{"title":"Run agent","openapi":"POST /agents/{agentId}/runs","href":"/api-reference/agents/run-agent"},{"title":"List agents","openapi":"GET /workspace/{workspaceId}/agents","description":"Lists non-deleted agents in a workspace with `workspace` or `organization` visibility, sorted by title. Private agents are excluded.\n","href":"/api-reference/agents/list-agents"}]},{"group":"Projects","pages":[{"title":"List projects","openapi":"GET /projects","href":"/api-reference/projects/list-projects"},{"title":"Create project","openapi":"POST /projects","href":"/api-reference/projects/create-project"},{"title":"List project files","openapi":"GET /projects/{projectId}/files","href":"/api-reference/projects/list-project-files"},{"title":"Request file upload URL","openapi":"POST /projects/{projectId}/files/upload","href":"/api-reference/projects/request-file-upload"},{"title":"Sync project files","openapi":"POST /projects/{projectId}/files/sync","href":"/api-reference/projects/sync-project-files"},{"title":"Delete project file","openapi":"DELETE /projects/{projectId}/files/{fileId}","href":"/api-reference/projects/delete-project-file"},{"title":"Get file download URL","openapi":"GET /projects/{projectId}/files/{fileId}/download","href":"/api-reference/projects/get-file-download-url"}]},{"group":"Skills","pages":[{"title":"Bulk upload skills","openapi":"POST /workspace/{workspaceId}/skills/bulk-upload","href":"/api-reference/tools/bulk-upload-skills"}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/embed-sdk/overview"}]}]},"basePath":"","title":"Run agent - TeamAI Docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}