Skip to content
Easy AI How-To

AdvancedChatGPTBuilding

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
Tools
OpenAI: Migrate from Agent Builder, OpenAI Agents SDK quickstart, OpenAI deprecations page, ChatKit advanced integration

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

  1. 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/prompts API and prompt objects) shut down

    ChatKit 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.

  2. 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.

  3. Save what you'll need to compare against

    Do this first, while everything still opens:

    1. 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.
    2. Take a screenshot of the canvas, and note each node's settings: instructions, model, tools, vector store IDs, MCP servers, and any conditions.
    3. 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.
  4. Export the workflow as code

    1. Open your workflow in Agent Builder.
    2. Select Code in the top navigation.
    3. Select Agents SDK in the code dialog.
    4. Select Python or TypeScript, then copy the complete export.

    Save it in a new folder as workflow.py (or workflow.ts). Read it top to bottom once. Find where each agent is defined and where the workflow is run with the user's input.

  5. 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 zod instead.

    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.

  6. 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 HostedMCPTool or an MCP server connection
    Guardrails A guardrail check, like the SDK's @input_guardrail
    If/else, While Plain if and while logic. 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.

  7. 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 to chatkit/sessions mean you embed ChatKit hosted by Agent Builder. Switch to OpenAI's advanced ChatKit integration: install openai-chatkit, run your own ChatKitServer, and have its respond method run your exported agent with Runner.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.
  8. Test before you switch over

    1. Run each saved input through the new code and compare with your "before" answers. Check anything your app parses, like JSON fields.
    2. 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.
    3. Try one input that should trip each guardrail and one that needs approval.
    4. 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.
    5. Deploy, point your app at it, and keep Agent Builder untouched until the new version has handled real traffic.

Tips

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.

Free newsletter

Learn AI by doing, one how-to at a time

New how-tos across all of AI: everyday tools, RAG, agents, local models, and taking a proof of concept to production. Each one is something you can try yourself, because the best way to learn AI is by doing it. Free, and you can unsubscribe in one click.

Subscribe free

Opens our sign-up page on beehiiv. Privacy