Move your OpenAI Agent Builder workflow to the Agents SDK before Nov 30
OpenAI is shutting down Agent Builder, its drag-and-drop canvas for agent workflows, on November 30, 2026. Reusable prompts and the Evals platform shut down the same day, and Evals go read-only on October 31. If an app or website depends on a workflow you built there, this guide walks you through exporting it as Agents SDK code, running it yourself, checking each node made it across, and testing it before the deadline.
Prefer to watch? Catch the quick video on YouTube.
New to agents in code? Start with Build your first AI agent with tool use, which explains the agent loop.
- Time
- About 45 minutes
- Checked
If a button name on the screen does not match this guide, follow the action. These products rename buttons often. This is an advanced guide: it uses code, and each technical term is explained the first time it appears. Model names and prices change, so check the linked docs before you ship.
Steps
Know what's shutting down, and when
Agent Builder is OpenAI's drag-and-drop canvas for building agent workflows. OpenAI is retiring it. Here are the dates from OpenAI's deprecations page:
Date What happens Oct 31, 2026 Existing Evals become read-only Nov 30, 2026 Agent Builder shuts down Nov 30, 2026 The Evals dashboard and API shut down Nov 30, 2026 Reusable prompts (the v1/promptsAPI and prompt objects) shut downChatKit stays. That's OpenAI's embeddable chat window. But if your ChatKit chat points at an Agent Builder workflow ID, that hosted setup only works during the transition window. You'll need your own server behind it (step 7).
Terms: a workflow is the set of agents, tools, and logic you connected on the canvas. The Agents SDK is OpenAI's open-source code library (Python and TypeScript) for building the same thing in code, which you run on your own server.
Pick your path
OpenAI offers two ways out:
- Agents SDK (this guide). Your workflow becomes code that you run and deploy. Choose this if an app or website calls your workflow.
- ChatGPT workspace agent. You paste the exported code into ChatGPT and it helps rebuild it as an agent your team uses inside ChatGPT. This needs a ChatGPT Business, Enterprise, or Edu workspace with permission to create agents. See the FAQ below.
Either way, OpenAI says the export doesn't convert your canvas or promise every behavior transfers. Plan to test.
Save what you'll need to compare against
Do this first, while everything still opens:
- In Agent Builder, select Preview and run your 5 to 10 example inputs. Copy each input and the final answer into a text file. These are your "before" results.
- Take a screenshot of the canvas, and note each node's settings: instructions, model, tools, vector store IDs, MCP servers, and any conditions.
- If you use Evals, copy your test cases out now. After Oct 31 you can only view them, and after Nov 30 they're gone.
Export the workflow as code
- Open your workflow in Agent Builder.
- Select Code in the top navigation.
- Select Agents SDK in the code dialog.
- Select Python or TypeScript, then copy the complete export.
Save it in a new folder as
workflow.py(orworkflow.ts). Read it top to bottom once. Find where each agent is defined and where the workflow is run with the user's input.Install the SDK and run it once
For Python, make a virtual environment (a private folder of packages for this project), then install the SDK:
cd my-workflow python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install openai-agents export OPENAI_API_KEY="your-key-here"For TypeScript, use
npm install @openai/agents zodinstead.If the export imports other packages, install those too. Then run it with one of your saved inputs. If the export has no "run this file" block at the bottom, ask a coding assistant to add one with the prompt below. Don't let it change anything else yet.
Also check the model names in the export. If one is on OpenAI's retirement list, swap it. Our retiring OpenAI models guide has a script that finds them.
Prompt to paste
This file is my OpenAI Agent Builder workflow, exported as Agents SDK code. [paste workflow.py] Please: 1. Add a small `if __name__ == "__main__":` block that runs the workflow once with text I pass on the command line and prints the final output. 2. Don't change the agents, instructions, models, tools, or logic. 3. List every package the file imports that isn't part of `openai-agents`, so I can install it. 4. List any IDs in the file (vector stores, MCP servers, prompts) I need to check still exist.
Check that every node made it across
Go through your canvas notes and find each node in the code. This table shows what each Agent Builder node corresponds to in the Agents SDK:
Node on the canvas What to look for in the code Start ( input_as_text)The text you pass in when you run the workflow Agent Agent(name=..., instructions=..., model=..., tools=[...])File search FileSearchTool(vector_store_ids=[...])MCP HostedMCPToolor an MCP server connectionGuardrails A guardrail check, like the SDK's @input_guardrailIf/else, While Plain ifandwhilelogic. Your canvas conditions were written in CEL (Common Expression Language)Human approval A tool marked needs_approval=True(see below)Transform, Set state Ordinary variables and code that reshapes data OpenAI's migration guide says to pay special attention to control flow, triggers, tools, and permissions. Logins for connected apps don't come with the export, so set those up again.
Human approval is the one that's easiest to lose. In the SDK, the run pauses instead of calling the tool, and your app approves or rejects it. This is OpenAI's pattern:
from agents import Agent, Runner, function_tool @function_tool(needs_approval=True) async def cancel_order(order_id: int) -> str: return f"Cancelled order {order_id}" agent = Agent(name="Support agent", instructions="Handle support requests.", tools=[cancel_order]) async def main(): result = await Runner.run(agent, "Cancel order 123.") if result.interruptions: # the run paused for review state = result.to_state() for item in result.interruptions: state.approve(item) # or state.reject(item) result = await Runner.run(agent, state) # resume the same run print(result.final_output)In a real app, show the pending action to a person before you call
approve.Move off hosted ChatKit and reusable prompts
Search your app's code for two kinds of ID that stop working on Nov 30:
grep -rn -E "wf_|pmpt_" --exclude-dir=node_modules --exclude-dir=.venv .- Workflow IDs (OpenAI's examples use
wf_...) passed tochatkit/sessionsmean you embed ChatKit hosted by Agent Builder. Switch to OpenAI's advanced ChatKit integration: installopenai-chatkit, run your ownChatKitServer, and have itsrespondmethod run your exported agent withRunner.run_streamed. Your existing chat window stays; only the backend changes. - Prompt IDs (
pmpt_...) are reusable prompt objects. Copy each prompt's text into your code, as OpenAI's "Migrate from prompt objects" guide shows.
- Workflow IDs (OpenAI's examples use
Test before you switch over
- Run each saved input through the new code and compare with your "before" answers. Check anything your app parses, like JSON fields.
- Open the Traces dashboard on platform.openai.com. The SDK sends a trace of each run by default, so you can see every model call, tool call, handoff, and guardrail.
- Try one input that should trip each guardrail and one that needs approval.
- Replace Evals with your own tests. Our Move your OpenAI Evals to Promptfoo guide walks through it, and our Write evals for an LLM app guide shows a simple version.
- Deploy, point your app at it, and keep Agent Builder untouched until the new version has handled real traffic.
Tips
Don't leave this to the last week. Export now, even if you migrate later. Once Agent Builder shuts down on Nov 30, you can't open the workflow to export it.
Don't paste your API key into a chat or commit it to Git. Set it in your terminal as shown, or in your host's secret settings.
If your workflow is mostly fixed steps (always do A, then B, then C), OpenAI warns it may not move faithfully to a workspace agent. The Agents SDK gives you exact control in code.
Traces can contain your users' messages. Check who on your team can see them before real customer data flows through.
Part of the Before it retires series: Move your custom GPT to a ChatGPT plugin, Find and replace retiring OpenAI models in your code, Turn your Gemini Gems into skills before Nov 17, Move your OpenAI Evals to Promptfoo before Nov 30, and Upgrade to Claude SDK 2.0: fix the new 400 errors, Switch from GPT Image 1.5 to GPT Image 2.6 (Dec 1).
Common questions
Can I just keep using Agent Builder?
Only until Nov 30, 2026, when OpenAI plans to shut it down. Check the deprecations page for the current timeline.
What about ChatGPT workspace agents?
If your team uses ChatGPT Business, Enterprise, or Edu and has permission to create agents, start a new workspace agent in ChatGPT and paste your export with OpenAI's prompt: "Please help me convert this workflow into an agent:" followed by the code. Review what it flags, set up apps and permissions, select Preview to test your saved inputs, and select Create only once it behaves like the original.
Do I have to use Python?
No. The export comes in Python or TypeScript, and the Agents SDK exists for both (openai-agents on pip, @openai/agents on npm).
Does this affect my vector stores or files?
The deprecations page doesn't list vector stores among the shutdowns, and the Agents SDK's FileSearchTool searches them by ID. Check that the IDs in your export still exist in your project.
Is ChatKit going away too?
No. OpenAI says ChatKit remains available. Only the setup where ChatKit points at a workflow hosted in Agent Builder ends. Run your own ChatKit server with the Agents SDK behind it instead.
More guides
BeginnerChatGPTEveryday
Plan a week of meals
Give free ChatGPT your people, your time, and foods to skip. Get a 7-day plan and a shopping list you can edit.
About 10 minutes using ChatGPT
BeginnerChatGPTWriting
Write a social media caption
Ask free ChatGPT for three short captions from what really happened, then post one yourself.
About 6 minutes using ChatGPT
BeginnerChatGPTWriting
Make a message sound kinder
Paste a blunt draft into free ChatGPT and get a kinder version that does not add apologies or new facts.
About 6 minutes using ChatGPT