Why the OpenAI Agents SDK keeps Agent, Handoff, and Runner as its only three primitives
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Three primitives cover the 'a few agents that hand off to each other' case beautifully and stay out of the way; anything beyond it you build yourself or pick a different framework.
Imagine the kitchen aisle. Some gadget brands sell you 40 different specialised tools (an avocado slicer, a strawberry huller, a banana peeler). Others sell you a really good knife and trust you with the rest. The Agents SDK is the really good knife brand. It says: most agent work is one agent doing the job until it hands the task to a teammate; we will make that one motion clean and let you bring your own kitchen for everything else. The trade is honest. You give up shelves of specialised gadgets in exchange for fewer ways to cut yourself.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 to 5 min: name the three primitives, explain the workload bet, contrast with LangGraph and AutoGen 0.4 surface areas, name when each framework wins.
from agents import Agent, Runner
billing = Agent(name="billing",
instructions="Handle billing questions.",
tools=[lookup_invoice, issue_refund])
tech = Agent(name="tech",
instructions="Handle technical issues.",
tools=[search_kb, escalate_to_oncall])
triage = Agent(name="triage",
instructions="Route the user to the right specialist.",
handoffs=[billing, tech])
result = Runner.run_sync(triage, "My invoice looks wrong")
print(result.final_output)Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Expecting the SDK to cover parallel fan-out, durable resume, or graph topologies. It explicitly does not; that is the design centre, not a gap.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.