Drop-in code-execution tool for OpenAI Agents SDK.
Install
pip install podflare openai-agents
Use
from agents import Agent, Runnerfrom podflare.integrations.openai_agents import podflare_code_interpretertool = podflare_code_interpreter()agent = Agent( name="assistant", instructions="Use the run_code tool to answer computational questions.", tools=[tool],)result = await Runner.run(agent, "What is the sum of squares from 1 to 100?")print(result.final_output)# Cleanup the lazily-created Podflare sandboxtool.close_podflare_sandbox()
What the tool does
On the first call, lazily creates a Podflare sandbox.
On each invocation, calls sandbox.run_code(code, language).
Returns a dict with keys stdout, stderr, exit_code.
The same sandbox is reused across invocations — Python REPL state
persists, so the agent can build up state over a conversation.
The returned tool exposes a close_podflare_sandbox() method. Call it
after the agent run completes to destroy the VM.
For many short-lived agent runs, creating a new sandbox per run is fine
(pool hits are ~10 ms). For long-running conversations, reuse the same
tool across turns to keep REPL state alive.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Podflare","colors":{"primary":"#EF4444","light":"#FB923C","dark":"#991B1B"},"logo":{"light":"https://podflare.ai/logo/light.png","dark":"https://podflare.ai/logo/dark.png","href":"https://podflare.ai"},"favicon":"https://podflare.ai/favicon.png","navbar":{"links":[{"href":"https://dashboard.podflare.ai","label":"Dashboard"},{"href":"https://podflare.ai/status","label":"Status"}],"primary":{"type":"github","href":"https://github.com/PodFlare-ai"}},"footer":{"socials":{"github":"https://github.com/PodFlare-ai","website":"https://podflare.ai"}},"search":{"prompt":"Search or ask AI..."},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"podflare","hasAudioNarration":false,"actualSubdomain":"podflare","customDomains":["docs.podflare.ai"],"gitSource":{"type":"github","owner":"podflare-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10e3399ffae5051c4123ef"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae9555a7c27206474c7a538:success","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"Documentation","count":22},{"language":"default","tag":"Concepts","count":7},{"language":"default","tag":"API Reference","count":6},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"Examples","count":5},{"language":"default","tag":"Integrations","count":5},{"language":"default","tag":"Performance","count":4},{"language":"default","tag":"SDKs","count":3},{"language":"default","tag":"Get Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"integrations/openai-agents","slug":"/integrations/openai-agents","pageMetadata":{"title":"OpenAI Agents SDK","description":"Drop-in code-execution tool for OpenAI Agents SDK.","href":"/integrations/openai-agents"},"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: \"Drop-in code-execution tool for OpenAI Agents SDK.\"\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={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`install`,children:`Install`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` podflare`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openai-agents`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`use`,children:`Use`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,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:`16`,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:` agents `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Agent, Runner`})]}),`\n`,_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:` podflare.integrations.openai_agents `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` podflare_code_interpreter`})]}),`\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:` podflare_code_interpreter()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:` Agent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_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:`\"assistant\"`}),_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:` instructions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Use the run_code tool to answer computational questions.\"`}),_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:` tools`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[tool],`})]}),`\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:`result `}),_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\":`#D4D4D4`},children:` Runner.run(agent, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is the sum of squares from 1 to 100?\"`}),_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:`(result.final_output)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Cleanup the lazily-created Podflare sandbox`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`tool.close_podflare_sandbox()`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`what-the-tool-does`,children:`What the tool does`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`On the first call, lazily creates a Podflare sandbox.`}),`\n`,_jsxs(_components.li,{children:[`On each invocation, calls `,_jsx(_components.code,{children:`sandbox.run_code(code, language)`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Returns a dict with keys `,_jsx(_components.code,{children:`stdout`}),`, `,_jsx(_components.code,{children:`stderr`}),`, `,_jsx(_components.code,{children:`exit_code`}),`.`]}),`\n`,_jsx(_components.li,{children:`The same sandbox is reused across invocations — Python REPL state\npersists, so the agent can build up state over a conversation.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`options`,children:`Options`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,children:[_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:` podflare_code_interpreter(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` host`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.podflare.ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# default: PODFLARE_HOSTD_URL env`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` template`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"python-datasci\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# default: the primary pool`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`cleanup`,children:`Cleanup`}),`\n`,_jsxs(_components.p,{children:[`The returned tool exposes a `,_jsx(_components.code,{children:`close_podflare_sandbox()`}),` method. Call it\nafter the agent run completes to destroy the VM.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`For many short-lived agent runs, creating a new sandbox per run is fine\n(pool hits are ~10 ms). For long-running conversations, reuse the same\ntool across turns to keep REPL state alive.`})})]})}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":"OpenAI Agents SDK","description":"Drop-in code-execution tool for OpenAI Agents SDK.","href":"/integrations/openai-agents"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Install","slug":"install","depth":2,"children":[]},{"title":"Use","slug":"use","depth":2,"children":[]},{"title":"What the tool does","slug":"what-the-tool-does","depth":2,"children":[]},{"title":"Options","slug":"options","depth":2,"children":[]},{"title":"Cleanup","slug":"cleanup","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"podflare","siteName":"Podflare","title":"OpenAI Agents SDK - Podflare","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-19T21:37:43.137Z","originalFileLocation":"integrations/openai-agents.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=\"Drop-in code-execution tool for OpenAI Agents SDK.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Podflare\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://podflare.ai/favicon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://podflare.ai/favicon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://podflare.ai/favicon.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://podflare.ai/favicon.png\">\u003cmeta data-mint-head property=\"og:title\" content=\"OpenAI Agents SDK - Podflare\">\u003cmeta data-mint-head property=\"og:description\" content=\"Drop-in code-execution tool for OpenAI Agents SDK.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Podflare\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.podflare.ai/integrations/openai-agents\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://podflare.mintlify.site/_mintlify/api/og/v2?division=Integrations\u0026amp;title=OpenAI+Agents+SDK\u0026amp;description=Drop-in+code-execution+tool+for+OpenAI+Agents+SDK.\u0026amp;theme=85c0ead13df7c18a6484ab5d\u0026amp;signature=5b07cd86a4f1348d815715bb2112315d74b65253fd68bb479a3c7fca00ac6b6e\">\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=\"OpenAI Agents SDK - Podflare\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Drop-in code-execution tool for OpenAI Agents SDK.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://podflare.mintlify.site/_mintlify/api/og/v2?division=Integrations\u0026amp;title=OpenAI+Agents+SDK\u0026amp;description=Drop-in+code-execution+tool+for+OpenAI+Agents+SDK.\u0026amp;theme=85c0ead13df7c18a6484ab5d\u0026amp;signature=5b07cd86a4f1348d815715bb2112315d74b65253fd68bb479a3c7fca00ac6b6e\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/podflare/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Podflare\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EF4444\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.podflare.ai/integrations/openai-agents\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/openai-agents.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.podflare.ai/#organization\",\"name\":\"Podflare\",\"url\":\"https://docs.podflare.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://podflare.ai/logo/light.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.podflare.ai#website\",\"name\":\"Podflare\",\"url\":\"https://docs.podflare.ai\",\"publisher\":{\"@id\":\"https://docs.podflare.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.podflare.ai/integrations/openai-agents#webpage\",\"url\":\"https://docs.podflare.ai/integrations/openai-agents\",\"name\":\"OpenAI Agents SDK\",\"description\":\"Drop-in code-execution tool for OpenAI Agents SDK.\",\"dateModified\":\"2026-04-19T21:37:43.137Z\",\"isPartOf\":{\"@id\":\"https://docs.podflare.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.podflare.ai/integrations/openai-agents#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.podflare.ai/integrations/openai-agents#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Podflare\",\"item\":\"https://docs.podflare.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OpenAI Agents SDK\",\"item\":\"https://docs.podflare.ai/integrations/openai-agents\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.podflare.ai/integrations/openai-agents#article\",\"headline\":\"OpenAI Agents SDK\",\"name\":\"OpenAI Agents SDK\",\"description\":\"Drop-in code-execution tool for OpenAI Agents SDK.\",\"url\":\"https://docs.podflare.ai/integrations/openai-agents\",\"mainEntityOfPage\":{\"@id\":\"https://docs.podflare.ai/integrations/openai-agents#webpage\"},\"dateModified\":\"2026-04-19T21:37:43.137Z\",\"publisher\":{\"@id\":\"https://docs.podflare.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.podflare.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Podflare\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Podflare\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/integrations/openai-agents.md","siteName":"Podflare","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Concepts","pages":[{"title":"What is a Podflare sandbox?","href":"/concepts/sandboxes"},{"title":"Fork","href":"/concepts/fork"},{"title":"Warm Pool","href":"/concepts/warm-pool"},{"title":"Persistent REPL","href":"/concepts/repl"},{"title":"Observability","href":"/concepts/observability"},{"title":"Authentication","href":"/concepts/auth"},{"title":"Egress policy","href":"/concepts/egress"}]},{"group":"SDKs","pages":[{"title":"Python SDK","href":"/sdks/python"},{"title":"TypeScript SDK","href":"/sdks/typescript"},{"title":"MCP server","href":"/sdks/mcp"}]},{"group":"Examples","pages":[{"title":"Examples","href":"/examples/overview"},{"title":"Code-interpreter agents","href":"/examples/code-interpreter"},{"title":"Data analysis","href":"/examples/data-analysis"},{"title":"Database work","href":"/examples/database"},{"title":"Web automation","href":"/examples/web-automation"},{"title":"Dev environments","description":"Clone a git branch, run tests, return results. The pattern behind PR-review bots and 'test my code' agents.","href":"/examples/dev-environments"}]},{"group":"Integrations","pages":[{"title":"OpenAI Agents SDK","href":"/integrations/openai-agents"},{"title":"Vercel AI SDK","description":"Code-execution tool for `tool({...})` + `generateText` / `streamText`.","href":"/integrations/vercel-ai-sdk"},{"title":"Anthropic Messages API","href":"/integrations/anthropic"},{"title":"Claude Desktop","href":"/integrations/claude-desktop"},{"title":"OpenClaw + ClawHub","href":"/integrations/openclaw"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Performance","pages":[{"title":"Performance","href":"/architecture/performance"}]}]},"basePath":"","title":"OpenAI Agents SDK - Podflare","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":[],"chunks":[]}