Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.
For tools that take significant time (deployments, data processing), use LongRunningFunctionTool. It instructs the LLM not to re-invoke the tool while pending:
from orxhestra.tools import LongRunningFunctionToolasync def deploy_service(env: str) -> str: """Deploy the service to the given environment.""" await some_long_operation(env) return f"Deployed to {env}"tool = LongRunningFunctionTool(deploy_service)agent = LlmAgent(name="deployer", model=model, tools=[tool.as_tool()])
The tool description is automatically appended with:
NOTE: This is a long-running operation. Do not call this tool again if it has already returned some intermediate or pending status.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"orxhestra","colors":{"primary":"#3FE0A8","light":"#3FE0A8","dark":"#3FE0A8"},"logo":{"light":"https://mintcdn.com/nicolailassen/BLzoHu8_fBYisItF/images/lockup.svg?fit=max\u0026auto=format\u0026n=BLzoHu8_fBYisItF\u0026q=85\u0026s=d2f4ea72af6e386e7e5cd2cc09868e1f","dark":"https://mintcdn.com/nicolailassen/BLzoHu8_fBYisItF/images/lockup.svg?fit=max\u0026auto=format\u0026n=BLzoHu8_fBYisItF\u0026q=85\u0026s=d2f4ea72af6e386e7e5cd2cc09868e1f"},"favicon":"https://mintcdn.com/nicolailassen/BLzoHu8_fBYisItF/images/favicon.svg?fit=max\u0026auto=format\u0026n=BLzoHu8_fBYisItF\u0026q=85\u0026s=cc617ebfbca26b0b565b3495a3093650","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://github.com/NicolaiLassen/orxhestra-code","label":"orxhestra-code"},{"href":"https://pypi.org/project/orxhestra/","label":"PyPI"},{"href":"https://github.com/NicolaiLassen/orxhestra","type":"github"}],"primary":{"type":"button","label":"Get Started","href":"/getting-started/quickstart"}},"footer":{"socials":{"github":"https://github.com/NicolaiLassen/orxhestra","x":"https://x.com/orxhestra"}},"seo":{"metatags":{"og:site_name":"orxhestra","og:description":"Open-source Python framework for orchestrating multi-agent AI systems. Async streaming, composable agent hierarchies, and first-class MCP \u0026 A2A integration.","og:image":"/images/lockup.svg","twitter:card":"summary_large_image","twitter:image":"/images/lockup.svg"},"indexing":"all"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nicolailassen","hasAudioNarration":false,"actualSubdomain":"nicolailassen","customDomains":["docs.orxhestra.com"],"gitSource":{"type":"github","owner":"nicolailassen","repo":"orxhestra","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae94a8c851e4a4bc8cfef0b:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Documentation","count":32},{"language":"default","tag":"Runtime","count":6},{"language":"default","tag":"Tools","count":6},{"language":"default","tag":"CLI","count":4},{"language":"default","tag":"Core Concepts","count":4},{"language":"default","tag":"Orchestration","count":4},{"language":"default","tag":"Composer","count":3},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Integrations","count":2},{"language":"default","tag":"Architecture","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"tools/long-running","slug":"/tools/long-running","pageMetadata":{"title":"Long-Running Tools","description":"Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.","keywords":["long-running tools","LongRunningFunctionTool","async tools","deployment"],"href":"/tools/long-running"},"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: \"Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.\"\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={blockquote:`blockquote`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`For tools that take significant time (deployments, data processing), use `,_jsx(_components.code,{children:`LongRunningFunctionTool`}),`. It instructs the LLM not to re-invoke the tool while pending:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` orxhestra.tools `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LongRunningFunctionTool`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` deploy_service`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Deploy the service to the given environment.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` some_long_operation(env)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Deployed to `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`env`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`tool `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LongRunningFunctionTool(deploy_service)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`agent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LlmAgent(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"deployer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`model, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`tools`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[tool.as_tool()])`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The tool description is automatically appended with:`}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`NOTE: This is a long-running operation. Do not call this tool again if it has already returned some intermediate or pending status.`}),`\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":"Long-Running Tools","description":"Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.","keywords":["long-running tools","LongRunningFunctionTool","async tools","deployment"],"href":"/tools/long-running"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"nicolailassen","siteName":"orxhestra","title":"Long-Running Tools - orxhestra","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-12T12:11:54.533Z","originalFileLocation":"tools/long-running.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=\"dark\"}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=\"Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.\">\u003cmeta data-mint-head name=\"application-name\" content=\"orxhestra\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_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/nicolailassen/Xvf_3zyveCmxidK6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Long-Running Tools - orxhestra\">\u003cmeta data-mint-head property=\"og:description\" content=\"Open-source Python framework for orchestrating multi-agent AI systems. Async streaming, composable agent hierarchies, and first-class MCP \u0026amp; A2A integration.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"orxhestra\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.orxhestra.com/tools/long-running\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nicolailassen.mintlify.site/images/lockup.svg\">\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=\"Long-Running Tools - orxhestra\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Open-source Python framework for orchestrating multi-agent AI systems. Async streaming, composable agent hierarchies, and first-class MCP \u0026amp; A2A integration.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nicolailassen.mintlify.site/images/lockup.svg\">\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/nicolailassen/Xvf_3zyveCmxidK6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"orxhestra\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3FE0A8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.orxhestra.com/tools/long-running\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/tools/long-running.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.orxhestra.com/#organization\",\"name\":\"orxhestra\",\"url\":\"https://docs.orxhestra.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nicolailassen/BLzoHu8_fBYisItF/images/lockup.svg?fit=max\u0026auto=format\u0026n=BLzoHu8_fBYisItF\u0026q=85\u0026s=d2f4ea72af6e386e7e5cd2cc09868e1f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.orxhestra.com#website\",\"name\":\"orxhestra\",\"url\":\"https://docs.orxhestra.com\",\"publisher\":{\"@id\":\"https://docs.orxhestra.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.orxhestra.com/tools/long-running#webpage\",\"url\":\"https://docs.orxhestra.com/tools/long-running\",\"name\":\"Long-Running Tools\",\"description\":\"Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.\",\"dateModified\":\"2026-04-12T12:11:54.533Z\",\"isPartOf\":{\"@id\":\"https://docs.orxhestra.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.orxhestra.com/tools/long-running#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.orxhestra.com/tools/long-running#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tools\",\"item\":\"https://docs.orxhestra.com/tools/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Long-Running Tools\",\"item\":\"https://docs.orxhestra.com/tools/long-running\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.orxhestra.com/tools/long-running#article\",\"headline\":\"Long-Running Tools\",\"name\":\"Long-Running Tools\",\"description\":\"Handle slow tools like deployments and data processing with LongRunningFunctionTool, preventing the LLM from re-invoking while pending.\",\"url\":\"https://docs.orxhestra.com/tools/long-running\",\"mainEntityOfPage\":{\"@id\":\"https://docs.orxhestra.com/tools/long-running#webpage\"},\"image\":\"https://docs.orxhestra.com/images/lockup.svg\",\"dateModified\":\"2026-04-12T12:11:54.533Z\",\"keywords\":\"long-running tools, LongRunningFunctionTool, async tools, deployment\",\"publisher\":{\"@id\":\"https://docs.orxhestra.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.orxhestra.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"orxhestra\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"orxhestra\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/tools/long-running.md","siteName":"orxhestra","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","icon":"play","pages":[{"title":"orxhestra","href":""},{"title":"Installation","href":"/getting-started/installation"},{"title":"Quick Start","href":"/getting-started/quickstart"}]},{"group":"Composer","icon":"wand-magic-sparkles","pages":[{"title":"Composer","href":"/composer/overview"},{"title":"YAML schema reference","href":"/composer/schema-reference"},{"title":"Extending the composer","href":"/composer/extending"}]},{"group":"Core Concepts","icon":"book","pages":[{"title":"Agents","href":"/concepts/agents"},{"title":"Events","href":"/concepts/events"},{"title":"Runner \u0026 Sessions","href":"/concepts/runner-sessions"},{"title":"InvocationContext","href":"/concepts/invocation-context"}]},{"group":"Tools","icon":"wrench","pages":[{"title":"Tools","href":"/tools/overview"},{"title":"Filesystem Tools","href":"/tools/filesystem"},{"title":"Artifact Tools","href":"/tools/artifacts"},{"title":"Todo Tool","description":"Structured task tracking with write_todos. Agents create, update, and complete task lists that integrate with the TaskPlanner for per-turn status injection.","href":"/tools/todo"},{"title":"Long-Running Tools","href":"/tools/long-running"},{"title":"Tool Confirmation","description":"Gate dangerous tool executions with CallContext.request_confirmation(). Pause and require approval before delete, drop, or other risky operations.","href":"/tools/confirmation"}]},{"group":"Orchestration","icon":"sitemap","pages":[{"title":"Composite Agents","href":"/orchestration/composite-agents"},{"title":"Planners","href":"/orchestration/planners"},{"title":"Skills","href":"/orchestration/skills"},{"title":"Prompts","href":"/orchestration/prompts"}]},{"group":"Runtime","icon":"bolt","pages":[{"title":"Streaming","href":"/runtime/streaming"},{"title":"LLM Providers","href":"/runtime/providers"},{"title":"Callbacks","href":"/runtime/callbacks"},{"title":"Tracing","href":"/runtime/tracing"},{"title":"Structured Output","href":"/runtime/structured-output"},{"title":"Human-in-the-Loop","href":"/runtime/human-in-the-loop"}]},{"group":"CLI","icon":"terminal","pages":[{"title":"Orx CLI","href":"/cli/overview"},{"title":"Commands","href":"/cli/commands"},{"title":"Auto-Memory","href":"/cli/memory"},{"title":"Themes","href":"/cli/themes"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"A2A Protocol","href":"/integrations/a2a"},{"title":"MCP Integration","href":"/integrations/mcp"}]}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/examples"}]},{"tab":"Architecture","pages":[{"title":"Architecture","href":"/architecture"}]}]},"basePath":"","title":"Long-Running Tools - orxhestra","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}