Agent Builder shutdown: move your website chat assistant

OpenAI's Agent Builder shutdown is set for November 30, 2026. Which website chat assistants are affected, how to move a ChatKit widget to your own server with the Agents SDK, copy-ready code, and fixes for common problems.

Crest Design
A guide to moving a website chat assistant off OpenAI Agent Builder onto a self-hosted ChatKit server.

If your website has an AI chat assistant built with OpenAI's Agent Builder, it needs a new home. OpenAI told developers on June 3, 2026 that Agent Builder was deprecated, with a scheduled shutdown on November 30, 2026. This guide is for business owners and marketing leads who have a chat assistant on their site and want to know what the Agent Builder shutdown means for it, what the move involves, and what to ask the developer or agency doing the work.

The short version: the chat window your visitors see can stay the same. What changes is where the agent behind it runs. It moves from OpenAI's hosted workflow onto a small server you control.

What breaks when Agent Builder shuts down

Agent Builder was a visual canvas for building agents: you dragged in steps, wrote instructions, attached tools and files, and published a workflow. Many teams then dropped that workflow onto their website with ChatKit, OpenAI's embeddable chat interface. That pairing was popular because it needed very little code: one small endpoint on your server, one widget on the page.

The weak point is that the widget doesn't really talk to your site. It talks to a workflow ID that lives inside Agent Builder. When that hosted workflow goes away, the widget has nothing behind it. Depending on how it was built, visitors may see an empty window, a spinner, or an error after they type their first message.

ChatKit itself is not being retired. OpenAI's ChatKit docs say it stays available, and that teams already using it with an Agent Builder workflow can keep that hosted workflow during the transition window. For new apps, and for moving before the shutdown, the docs point to the advanced integration: running ChatKit against your own server. OpenAI's deprecations page also lists the reusable prompt objects API for shutdown on the same date, so if your developer stored prompts there, they need to move into your own code too.

How to tell if your site is affected

  • Your site's code calls a ChatKit sessions endpoint and passes a workflow ID (it usually starts with wf_).
  • The front end uses a getClientSecret function to fetch a short-lived secret before the chat opens.
  • Someone on your team edits the assistant's behavior in the Agent Builder canvas rather than in code.

If any of those are true, plan the move. If your assistant already runs on the Agents SDK or the Responses API from your own server, this change doesn't touch it.

How the self-hosted ChatKit setup works

In the hosted setup, OpenAI ran three things for you: the agent's logic, the conversation history, and the session handshake. In the self-hosted setup you take over the first two and drop the third.

Before and after diagram: a chat widget calling an Agent Builder workflow, versus the same widget calling your own ChatKit server with the Agents SDK.
Before and after: the chat window can stay the same, but the agent moves from Agent Builder onto your own server.

Here is what each piece does after the move:

  • The widget is the same ChatKit component. Instead of asking for a session secret, it sends every request to one URL on your server, such as /chatkit.
  • Your ChatKit server uses the ChatKit Python SDK. It receives a message, decides what to do, and streams the reply back as events the widget understands.
  • The Agents SDK holds what used to be your workflow: instructions, tools, handoffs between agents and guardrails, written as code.
  • A store saves threads and messages in your own database. This is a real change: conversation history now lives with you, which has privacy and retention implications to agree with your adviser.

The main trade-off is ownership. You gain control over data, logging, model choice and how the assistant connects to your CRM or store. You also take on a server that needs hosting, monitoring and security updates, like any other part of your stack.

How to move your chat assistant off Agent Builder

Five-step plan for moving a website chat assistant off Agent Builder: inventory, export, rebuild the server, switch the widget, then test and watch.
The migration in five steps, from finding what depends on Agent Builder to watching the new assistant in production.

1. Take an inventory

List every place the assistant appears (site, help center, logged-in app), each workflow ID, and everything the workflow uses: instructions, knowledge files or vector stores, tool calls to your own APIs, guardrails and any approval steps. Screenshots of the canvas are useful as a record for the team, even though they won't be used on the site.

2. Export the workflow logic

Agent Builder could show a workflow as Agents SDK code, which is a sensible starting point. Treat that export as a draft: read it, move secrets into environment variables, and check every tool call against your own API. Copy the exact instructions text so the assistant keeps its tone.

3. Build the ChatKit server

This is a minimal Python server using FastAPI, the ChatKit Python SDK (pip install openai-chatkit) and the Agents SDK (pip install openai-agents). It goes in a new service your developer deploys; change the instructions and model to match your old workflow, and replace MyStore with a store backed by your database.

from agents import Agent, Runner
from chatkit.agents import AgentContext, simple_to_agent_input, stream_agent_response
from chatkit.server import ChatKitServer, StreamingResult
from fastapi import FastAPI, Request
from fastapi.responses import Response, StreamingResponse

from my_store import MyStore  # your Store implementation (threads + items)


class SiteAssistant(ChatKitServer):
    agent = Agent(
        name="Site assistant",
        instructions="Answer questions about our services. Offer the contact form for quotes.",
        model="YOUR_MODEL_NAME",
    )

    async def respond(self, thread, input_user_message, context):
        agent_context = AgentContext(thread=thread, store=self.store, request_context=context)
        items = await simple_to_agent_input(input_user_message) if input_user_message else []
        result = Runner.run_streamed(self.agent, items, context=agent_context)
        async for event in stream_agent_response(agent_context, result):
            yield event


app = FastAPI()
server = SiteAssistant(store=MyStore())


@app.post("/chatkit")
async def chatkit_endpoint(request: Request):
    result = await server.process(await request.body(), context={})
    if isinstance(result, StreamingResult):
        return StreamingResponse(result, media_type="text/event-stream")
    return Response(content=result.json, media_type="application/json")

ChatKitServer does no authentication of its own, so the endpoint needs rate limiting and, for logged-in areas, a check of the user's session before it calls server.process.

4. Point the widget at your server

In a React or Next.js front end, the change is small. The getClientSecret function goes, and an api setting takes its place:

import { ChatKit, useChatKit } from "@openai/chatkit-react";

export function SiteChat() {
  const { control } = useChatKit({
    api: {
      url: "/chatkit",
      domainKey: process.env.NEXT_PUBLIC_CHATKIT_DOMAIN_KEY,
    },
  });
  return <ChatKit control={control} className="h-[600px] w-[360px]" />;
}

The domain key comes from registering your site's domain in the domain allowlist in your OpenAI organization settings. Register the staging domain as well, or testing will fail there.

5. Test, switch and watch

Run your usual questions through the old and new assistant side by side and compare the answers. Switch production over while the old workflow is still available if you can, and read the server logs closely for the first few days.

What we've learned from moving chat assistants

The code is rarely the hard part. The work that takes time is rediscovering what the old workflow actually did: an instruction someone added months ago, a file search over an outdated price list, a handoff to a second agent nobody documented. A careful inventory saves more time than anything else.

We'd also recommend using the move to tidy up. Connect the assistant to your CRM properly so qualified chats become leads, decide how long conversations are kept, and write down who owns the OpenAI account, the API keys and the server. If your assistant is simple and mostly answers FAQs, a lighter option may suit you better than a full ChatKit server; that's worth a conversation before anyone writes code.

Troubleshooting

Symptom Likely cause Fix
The chat window stays blank on the live site but works locally The domain isn't in the OpenAI domain allowlist, or the wrong domain key is deployed Register the exact production domain, then set its key in the production environment variables
Replies appear all at once after a long pause, or cut off midway A proxy, CDN or host is buffering or timing out the streaming response Turn off response buffering for the /chatkit route (for example proxy_buffering off in Nginx) and raise its timeout
Conversation history disappears after a page reload or deploy The server uses an in-memory store from a sample Replace it with a store backed by a real database and test a reload
The assistant answers differently than it used to Instructions, tools or knowledge files weren't copied over exactly Compare the exported settings line by line and reconnect the same vector store or files
Unexpected API usage on the OpenAI account The endpoint is open to anyone who finds it Add rate limiting, bot protection and a session check before processing requests

Running your own server also means keeping it patched; our guide to building a repeatable patch routine for Node.js servers applies the same thinking to any back end.

Questions people ask

Will my chat assistant stop working on November 30, 2026?

If it depends on a hosted Agent Builder workflow, plan as if it will. OpenAI's ChatKit docs mention a transition window for existing hosted workflows, so check OpenAI's deprecations page for the current status, but don't rely on extra time.

Do we have to redesign the chat window?

No. The ChatKit component stays, along with its theme options. Visitors shouldn't notice the move unless you choose to change the design at the same time.

Can we use a different AI model or provider?

Yes. Once the agent runs on your own server, your developer can change models, and the Agents SDK can work with other providers. That flexibility is one of the better reasons to make the move carefully rather than in a rush.

Why this matters for your business

A chat assistant often sits on the pages where buyers decide to get in touch. If it breaks quietly, you lose enquiries without seeing an error anywhere. Moving it onto your own server is a chance to make it more dependable and to wire it properly into the rest of your automation. For related work, see our guides to capping WhatsApp campaign message costs and automating order and customer edits with Shopify Flow triggers.

Quick checklist before the shutdown:

  • Find every workflow ID and where it's used.
  • Export the instructions, tools and files.
  • Stand up a ChatKit server with a real database store and access controls.
  • Register production and staging domains, then switch the widget to your endpoint.
  • Test real conversations and watch the logs.

If you'd like a team to plan and carry out the move, our AI chat assistant and automation service can help, or you can tell us about your setup.

(over to you)

Planning a build like this?

Tell us what you're building and we'll come back with ideas and next steps.