Core primitives
As we mentioned before, the OpenAI Agents SDK introduces a handful of core concepts (normally called primitives) that we can use to build agent systems. These are the building blocks for any agent-driven application using the SDK.To understand what primitives are, let’s say you’re designing a robot assistant to help manage a smart home. The assistant should be able to turn off lights, adjust the thermostat, respond to voice commands, and notify you if a window is left open. Instead of building everything from scratch, the SDK gives you a small set of foundational pieces: one for defining what the agent knows (state), one for what it can do (tools), one for how it thinks (policy), and so on. These are the primitives. You combine them like assembling distinct parts of a machine to create a functioning agent.Think of primitives as LEGO bricks in a LEGO set. They’re the smallest standard pieces you use to build anything. The SDK might later...