Skip to main content
Lesson 3 of 25 · Building OpenAI Agents

After Agent Builder: Agents SDK, Workspace Agents, and the Agents API

Lesson 3 of 25 Updated November 2, 2026 Developer
On this page
  1. What’s closing, what remains
  2. Path 1: The Agents SDK, for building in code
  3. Path 2: ChatGPT Workspace Agents
  4. Path 3: The Agents API, when OpenAI orchestrates for you
  5. How to choose
  6. Key takeaways

So far, this lesson has covered Agent Builder, OpenAI’s no-code visual tool for creating agents. OpenAI announced its end of life on June 3, 2026, with shutdown scheduled for November 30, 2026. Instead of learning a tool that is disappearing, let’s look at what replaces it. You have three paths depending on your goals: writing code, building in natural language for a team, or handing orchestration over to OpenAI.

What’s closing, what remains

Agent Builder is closing; ChatKit, the interface component you will see later in this course, remains available. If you already have a workflow in Agent Builder, OpenAI lets you export it before shutdown: open the workflow, choose Code in the top bar, then Agents SDK, select TypeScript or Python, and copy the full export. The migration guide honestly warns that this export does not convert the workflow graph and does not guarantee every behavior will be replicated exactly: plan for a testing phase.

Path 1: The Agents SDK, for building in code

This is the path this course takes starting with the next lesson. The Agents SDK gives you full control: you declare the agent, its instructions, its model, and its tools within your application, run it in your own environment, and deploy it like the rest of your code. The Agent Builder export plugs directly into it; you then install the corresponding SDK, configure the application, and validate behavior before deploying.

from agents import Agent, Runner, WebSearchTool

agent = Agent(
    name="Technical Support",
    instructions=(
        "You are a technical support agent for a SaaS company. "
        "Respond in English. Identify the problem before proposing solutions."
    ),
    model="gpt-6.1-sol",
    tools=[WebSearchTool()],
)

result = Runner.run_sync(agent, "My CSV export has been empty since this morning.")
print(result.final_output)

Path 2: ChatGPT Workspace Agents

If you used Agent Builder to avoid coding, the equivalent now lives in ChatGPT. Workspace agents are created in natural language and shared with a team; they require a ChatGPT Business, Enterprise, or Edu plan, access to workspace agents, and permission to create them. To migrate, OpenAI suggests a simple method: create a new agent in ChatGPT and paste your workflow export with the prompt “help me convert this workflow into an agent.” Before finalizing, review the generated instructions, configure the necessary apps, skills, authentications, and permissions, then use Preview to replay cases representative of the original workflow. One limitation to note: a workflow whose core relies on a strictly deterministic sequence may not translate faithfully into an agent.

Path 3: The Agents API, when OpenAI orchestrates for you

Since September 10, 2026, a third path has existed in public beta: the Agents API. It gives your application access to the Codex harness via an API managed by OpenAI. Your application provides the tools and chooses the execution environment; OpenAI handles sessions, orchestration, context compaction, and recovery from incidents. The agent can work in a sandbox where it executes code, modifies files, connects to MCP servers, and produces documents.

The API revolves around four concepts: the agent (model, instructions, tools, and MCP servers), the environment (a sandbox or computer, optional, hosted by OpenAI or by you), the session (a durable instance of the agent that receives tasks and responds to them), and events (what you send and what the agent produces). A session unfolds in four stages: you create it, assign it a task, monitor its progress via stream or webhook, and then restart or redirect it mid-course.

from openai import OpenAI

client = OpenAI()

session = client.beta.agents.sessions.create(
    agent={
        "model": "gpt-6-astra",
        "instructions": "Answer technical questions precisely, relying on web search.",
        "tools": [{"type": "web_search"}],
    },
    input=[{
        "role": "user",
        "content": [{"type": "input_text", "text": "Summarize the recommended steps to connect an MCP server to an OpenAI agent."}],
    }],
)
print(session.id)

Two constraints must be verified before choosing this path for sensitive data: the Agents API currently offers data residency only in the United States, and it is not eligible for zero data retention, even with a sandbox you host yourself. Billing follows the API rate for the chosen model, the rate for OpenAI tools, and the rate for containers for hosted sandboxes.

How to choose

If your team knows how to develop and wants to keep control over execution, choose the Agents SDK. If the goal is to put an agent in the hands of non-developer colleagues within ChatGPT, choose workspace agents. If you want an agent that works for long durations, with code execution and sub-agents, without maintaining the orchestration yourself, look at the Agents API, keeping in mind its beta status and data constraints.

Official sources: Migrate from Agent Builder · Agents API · Deprecations

Key takeaways

  • Agent Builder closes on November 30, 2026; ChatKit remains available; export your workflows to Agents SDK code before the date
  • Agents SDK: build in code and deploy in your application—this is the path for this course
  • Workspace agents: build in natural language in ChatGPT (Business, Enterprise, Edu plans)
  • Agents API (public beta): OpenAI manages sessions, orchestration, and compaction; data residency in the United States only, no zero data retention