
# OpenAI Agents SDK. The OpenAI Agents SDK enables you to build agentic AI apps in a lightweight, easy-to-use package with very few abstractions. The Agents SDK has a very small set of primitives:. In combination with Python, these primitives are powerful enough to express complex relationships betw…
# OpenAI Agents SDK. The OpenAI Agents SDK enables you to build agentic AI apps in a lightweight, easy-to-use package with very few abstractions. The Agents SDK has a very small set of primitives:. In combination with Python, these primitives are powerful enough to express complex relationships between tools and agents, and allow you to build real-world applications without a steep learning curve. In addition, the SDK comes with built-in **tracing** that lets you visualize and debug your agentic flows, as well as evaluate them and even fine-tune models for your application. ## Why use the Agents SDK. result = Runner.run_sync(agent, “Write a haiku about recursion in programming.”). | Build the first text agent and see one complete run | Quickstart |. | Keep memory across turns | Running agents and Sessions |. | Build a low-latency voice agent with `gpt-realtime-1.5` | Realtime agents quickstart and Realtime transport |. | Build a speech-to-text / agent / text-to-speech pipeline | Voice pipeline quickstart |.
详细内容
1. Agents SDK from OpenAI! | Full Tutorial
OpenAI have released an Agents SDK, their version of an open source agent development library akin to LangChain, Llama-Index, Pydantic AI,
2. A practical guide to building agents
* [Introduction](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/#introduction). * [What is an agent?](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/#what-is-an-agent). * [When should you build an agent?](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/#when-should-you-build-an-agent). * [Agent design foundations](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/#agent-design-foundations). * [Guardrails](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/#guardrails). * [Conclusion](https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/#conclusion). 1. **Single-agent systems,**where a single model equipped with appropriate tools and instructions executes workflows in a loop. `1from agents import Agent, Runner23technical_support_agent = Agent(4 name=”Technical Support Agent”,5 instructions=(6 “You provide expert assistance with resolving technical issues, “7 “system outages, or product troubleshooting.”8 ),9 tools=[search_knowledge_base],10)1112sales_assistant_agent = Agent(13 name=”Sales Assistant Agent”,14 instructions=(15 “You help enterprise clients browse the product catalog, “16 “recommend suitable solutions, and facilitate purchase transactions.”17 ),18 tools=[initiate_purchase_order],19)2021order_management_agent = Agent(22 name=”Order Management Agent”,23 instructions=(24 “You assist clients with inquiries regarding order tracking, “25 “delivery schedules, and processing returns or refunds.”26 ),27 tools=[track_order_status, initiate_refund_process],28)2930triage_agent = Agent(31 name=”Triage Agent”,32 instructions=(33 “You act as the first point of contact, assessing customer queries “34 “and directing them promptly to the correct specialized agent.”35 ),36 handoffs=[37 technical_support_agent,38 sales_assistant_agent,39 order_management_agent,40 ],41)4243result = await Runner.run(44 triage_agent,45 input(“Could you please provide an update on the delivery timeline for our recent purchase?”)46)`. Arrows show decision points and control flow between user input, safety checks, agent responses, and downstream actions.](https://images.ctfassets.net/kftzwdyauwt9/1PNt2OCSfrhHO0I0uDcjZu/02df2294de2830876a0e3d8a84009156/Guardrails_Media.png?w=3840&q=90&fm=webp). [How we monitor internal coding agents for misalignment Safety Mar 19, 2026](https://openai.com/index/how-we-monitor-internal-coding-agents-misalignment/).
3. Agents SDK | OpenAI API
Build agents in code with the OpenAI Agents SDK and grow into more advanced runtime patterns as needed. * Use the **Agents SDK** pages when your application owns orchestration, tool execution, approvals, and state. * Use **Agent Builder** only when you specifically want the hosted workflow editor and ChatKit path. | Build a code-first agent app | Quickstart | This is the shortest path to a working SDK integration. | Inspect and improve runs | Integrations and observability and evaluate agent workflows | Use traces for debugging first, then move into evaluation loops. | Build a voice-first workflow | Voice agents | Voice is still an SDK-first path because Agent Builder doesn’t support it. Use the SDK track when your server owns orchestration, tool execution, state, and approvals. ## Use Agent Builder for the hosted workflow path. Use Agent Builder when you want OpenAI-hosted workflow creation, publishing, and ChatKit deployment. Voice agents are an exception: they live in the SDK track because Agent Builder doesn’t currently support voice workflows.
总结
本文整理了关于OpenAI Agents SDK的最新资讯。随着行业发展,相关信息会持续更新,敬请关注。
相关资讯
• Solutions for agentic workflows
本文整理自网络,发布时间:2026年04月14日 | 内容仅供参考
