Key Takeaways:
- OpenAI’s Agents SDK supports code-first agent development in Python and TypeScript.
- Agent Builder is scheduled to shut down on November 30, 2026, making migration essential for existing users.
- Use tools, handoffs and guardrails to build reliable agents with controlled actions.
- Deploy agents as regular services with external session storage, queues and observability.
- Replace hosted Evals with custom datasets, automated graders and regression testing.
Quick Answer: Build AI agents with OpenAI using the Agents SDK in Python or TypeScript. Define a focused agent with instructions and tools, add handoffs for specialized tasks, and implement input/output guardrails before deployment. Run the agent as a regular backend service using containers or serverless infrastructure, with external session storage, background queues and tracing. For existing Agent Builder workflows, export the code and migrate to the SDK before the November 30, 2026 shutdown.
If you searched for how to build AI agents with OpenAI this month, you’ve landed at an awkward moment, because the answer changed in June and most tutorials haven’t caught up. Agent Builder, the visual canvas inside AgentKit, shuts down on November 30, 2026, and OpenAI is pointing everyone toward the code first Agents SDK instead.
Our AI development services team has shipped agents on the SDK since it appeared and migrated a few off Agent Builder since the announcement, so what follows is grounded in work rather than launch day press. You’ll get an explanation of what an agent is, how the SDK is put together, what’s left of AgentKit, and a deployment path that holds up once real users arrive.
What Counts As An AI Agent, And What Doesn’t?
Before building anything, it helps to be strict about the word, since “agent” gets attached to everything from an autocomplete feature to a fully autonomous system. An agent, in the sense the Agents SDK means it, is a model given instructions, a set of tools it can call and the freedom to decide which tool to use and when.
That decision making loop is the difference. A chatbot answers, an agent acts, checks the result and decides what to do next, sometimes handing the task to another agent entirely. The distinction matters for scoping, because a lot of what clients ask us to build turns out to be a very good copilot rather than an agent, and that’s fine, it’s just a different architecture. If you’re unsure which one you actually need, AI copilot vs AI agent draws the line in detail, and it’s worth reading before you commit to a framework.
What Is The OpenAI Agents SDK?
The OpenAI Agents SDK is a lightweight framework for building agents on top of the Responses API, released in March 2025 and now the centerpiece of how OpenAI expects agents to be built. It’s deliberately small, which we consider a feature rather than a limitation.
- Agents: A model, a set of instructions and a list of tools, defined in a few lines of code.
- Tools: Any Python or TypeScript function becomes a tool with a decorator, plus hosted tools like file search and web search.
- Handoffs: One agent can delegate to another, which is how you build triage flows and specialist agents.
- Guardrails: Input and output checks that run alongside the agent and can stop a run before damage is done.
- Sessions and tracing: Conversation memory is built in, and every run produces a trace you can inspect.
That’s nearly the whole conceptual surface, and the small size is why teams who dislike heavy orchestration frameworks tend to settle on it.
What Is AgentKit, And What’s Left Of It?
AgentKit arrived at DevDay in October 2025 as a bundle rather than a single product, and understanding the bundle explains the current confusion. It contained Agent Builder, a visual canvas for composing multi agent workflows with nodes, a Connector Registry for admins to manage data sources, ChatKit for embedding chat interfaces, and an expanded Evals platform with trace grading and automated prompt optimization. Guardrails, an open source safety layer, could be dropped into Agent Builder flows as a node.
Then on June 3, 2026, OpenAI announced it was winding down Agent Builder and Evals, with evals going read only at the end of October and both products disappearing on November 30, 2026. ChatKit survives, and so does the Connector Registry for enterprise accounts. So when people say “AgentKit” today they usually mean the pieces that remain, and when they say “Agent Builder” they’re describing something with thirteen days left. We’d rather you learn that from us than from a dead link.
How To Get Started With Agent Builder, And Why You Shouldn’t Now?
People still search for how to get started with Agent Builder, and the honest answer in November 2026 is that you shouldn’t start, you should finish. If you already have workflows there, this is the checklist we’ve used on migrations.
- Export Every Workflow As Code: Open each one in Agent Builder, select Code and copy the Agents SDK export before the shutdown.
- Record The Configuration: Write down each agent’s instructions, model and tools, plus the typed inputs and outputs passing between nodes.
- Copy Your Eval Datasets: Evals are already read only, so pull the datasets and grader results out while the dashboard still loads.
- Check ChatKit References: A ChatKit interface pointing at an Agent Builder workflow by ID will outlive the workflow it points to.
- Pick The Destination: Code heavy logic goes to the Agents SDK, and natural language tasks may fit ChatGPT Workspace Agents instead.
If you have nothing there yet, skip the canvas entirely and go straight to the SDK, where the rest of this guide lives.
Still running something in Agent Builder?
We’ll migrate it to the Agents SDK before the deadline.
Building Production Ready AI Agents With OpenAI: The Steps That Matter
Building production ready AI agents with OpenAI looks very different from building a demo, and most of the difference sits outside the agent code. We’ve found the sequence below holds up across support, operations and sales use cases.
- Define The Job Narrowly: One clear outcome per agent, because agents asked to do everything reliably do nothing well.
- Write Tools Before Prompts: Tools fix what the agent can actually do, and the instructions then explain when to use them.
- Add Handoffs For Specialization: A triage agent routing to specialists beats one giant prompt every time we’ve measured it.
- Put Guardrails On Both Ends: Validate inputs for injection and outputs for leakage before anything reaches a user or a database.
- Trace From Day One: The SDK traces every run, and reading traces early teaches you where the agent goes wrong.
- Build Your Own Eval Loop: Golden datasets and automated graders in your repo, since the hosted version is leaving.
None of these steps are glamorous, and all of them are what separates the agents still running next year from the ones quietly switched off.
Which Tools Should Your Agent Actually Have?
Tool selection decides more about an agent’s reliability than model choice does, which surprises people who expect the model to be the hard part. Give an agent too many tools and it dithers or picks wrong, give it too few and it hallucinates the capability it lacks. The SDK makes any function a tool, which is convenient and also dangerous, because a database write tool is one decorator away from an agent that can corrupt records.
We keep tools small, idempotent where possible and named for exactly what they do, and we gate anything destructive behind a human approval step. Hosted tools cover file search, web search and code execution without you building them. The most common mistake we see is treating a content generation workflow as if it needs agentic autonomy when it needs a good writing tool and a review step. AI writing software vs autonomous AI agent is where we unpack that confusion, because it costs teams months.
Guardrails And Security For OpenAI Agents
Guardrails are the part of OpenAI agent development that everyone agrees matters and most teams implement last, usually after an incident. The SDK runs guardrails as parallel checks on inputs and outputs, and the open source Guardrails library gives you detectors for personal data, jailbreak attempts and hallucination patterns.
- Input Guardrails: Catch prompt injection and off topic requests before the agent spends tokens or calls a tool.
- Output Guardrails: Scan responses for leaked personal data, policy violations or confident nonsense before they reach anyone.
- Tool Level Permissions: Scope credentials per tool so a compromised agent can’t reach systems it was never meant to.
- Human Approval Nodes: Any irreversible action, payments, deletions, external emails, waits for a person to confirm.
- Rate And Cost Limits: Cap tokens and tool calls per run, because a looping agent is an expensive agent.
Security teams increasingly build their own agents to watch for exactly these failures, and AI agents for cybersecurity covers how that defensive use is taking shape.
How Are You Deploying OpenAI Agents SDK To Production?
This is the question we hear most from engineering leads, phrased almost exactly that way, and the answer is reassuringly boring. The Agents SDK is a library, not a hosted runtime, so your agent is an ordinary service that you deploy wherever you deploy services today.
A Python agent runs happily inside a FastAPI app on a container, a TypeScript agent sits in a Node service or an edge worker, and the SDK doesn’t care which cloud is underneath. The things you do have to decide are where session state lives, how you handle long running runs that exceed a request timeout, and how traces get shipped to whatever observability stack you already trust.
We generally put session storage in a managed database, run agents as background jobs with a queue for anything over thirty seconds, and forward traces to the same place as application logs. If you need a chat surface, ChatKit embeds in your frontend and talks to your backend, which saves rebuilding streaming and thread management yourself.
OpenAI Agent Deployment Options Compared
The table below lays out the hosting choices we’ve actually used for deploying OpenAI Agents SDK to production, with the tradeoffs stated plainly. None is universally right, and your existing platform team’s preferences should weigh heavily.
| Deployment option | Best for | Session state | Long runs | Main tradeoff |
| Container on Kubernetes or ECS | Teams with existing platform tooling | External database | Background workers with a queue | Operational overhead you may already carry |
| Serverless functions | Bursty, short agent tasks | External store, nothing local | Awkward beyond timeout limits | Cold starts and run length ceilings |
| Edge workers (TypeScript) | Low latency chat agents near users | Durable objects or external store | Limited, offload heavy work | Restricted runtime and library support |
| Managed app platform (Render, Fly, Railway) | Small teams moving fast | Managed Postgres or Redis | Worker processes | Less control at scale |
| Agent Builder hosted endpoint | Nothing new, shutting down November 30 | Hosted by OpenAI | Hosted | Gone in two weeks |
For most clients with a modest platform team, containers plus a queue is the default, and the serverless option wins only when agent runs are short and spiky.
Want a production deployment reviewed?
We’ll check your agent architecture before it meets real traffic.
Evaluating Agents After The Evals Shutdown
With OpenAI’s hosted Evals platform closing alongside Agent Builder, evaluation becomes your responsibility, and that’s a healthier place for it to live anyway. The pattern we use is simple enough to fit in a repository and run in CI.
- Golden dataset: Fifty to two hundred real or realistic inputs with expected outcomes, grown from production traces over time.
- Automated graders: A model based grader scoring correctness and tone, plus deterministic checks for tool calls and formats.
- Trace replay: Rerun recorded traces against a new prompt or model version and diff the results before shipping.
- Regression gate: A pull request that drops the eval score below a threshold doesn’t merge, same as a failing test.
- Human spot checks: A weekly sample reviewed by someone who knows the domain, because graders drift too.
If you had datasets in the hosted platform, export them now, since read only became permanent in October and deletion follows at month end.
Where OpenAI Agents Pay Off: Examples From Real Work?
The agents that justify their cost tend to sit on repetitive, judgment heavy work with clear tools, rather than on anything requiring creativity or deep ambiguity. Support triage is the classic case, where a classifier agent routes tickets and specialist agents resolve the common ones, with a handoff to a person for the rest.
Procurement and back office flows are another, reading requests, checking policy and drafting approvals with a human signing off. Industry specific examples are where the interesting work happens, and AI agents for real estate walks through lead qualification and listing operations agents we’ve seen deliver. A question clients ask early is whether they need an agent at all or whether rules based automation would do, and the honest answer is often the latter for stable, high volume processes. AI agents vs RPA vs traditional automation lays out that decision, and reading it first has saved more than one client an unnecessary project.
Should You Build In House Or Bring In A Partner?
Most engineering teams can build a working OpenAI agent in a week, and that’s the problem, because the working prototype creates confidence the production system hasn’t earned yet. The parts that take experience are guardrail design, eval discipline, cost control and the operational plumbing around long runs, and those are exactly the parts a first project tends to skip. If your team has shipped agents before, keep it in house and use this guide as a checklist.
If this is the first one and it touches customers or money, a partner who has already made the expensive mistakes shortens the path considerably, and you should be picky about which one. How to choose an AI agent development company sets out the questions we’d want answered, including a few that make vendors uncomfortable, which is rather the point.
Ready to build your first production agent?
Tell us the job it needs to do and we’ll scope it.
Final Thoughts
Learning how to build AI agents with OpenAI in late 2026 means accepting that the visual shortcut is gone and the code path is the path. That’s less of a loss than it sounds, because the Agents SDK is small enough to learn in an afternoon and honest enough to show you, through traces, exactly where your agent is failing.
The hard work was never the canvas, it was the tool design, the guardrails, the evals and the deployment plumbing, and those sit with you either way. If you’re mid migration, export before November 30 and treat the rebuild as a chance to tighten scope. If you’re starting fresh, build narrow, trace everything and keep a human in the loop for anything irreversible. DianApps, a mobile and AI app development company, has done both kinds of projects this year, and the agents still running are the ones built that way.



Your email address will not be published. Required fields are marked *