🧬OpenAI Agents SDK
Also known as Agents SDK (OpenAI), openai-agents, OpenAI Agents Library
OpenAI's small kit for agents that use tools and pass on work.
Think of it like
It is like a relay race. Each runner does a part and hands on the stick.
Example
Jack builds a front-desk agent that reads each ticket. Billing questions are handed off to a billing agent, and the trace shows every step.
Why it matters
It gives agents the parts most of them need, with very little to learn. Tracing makes a run of many steps easy to check.
Definition
Example code
python
from agents import Agent, Runner
agent = Agent(name="Assistant", instructions="You are a helpful assistant")
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)Common mistake
Key takeaways
- 1Agents and tools. A model with instructions.
- 2Handoffs. One agent passes the work on.
- 3Guardrails and tracing. Check and record each run.