[KongchangAI]
ProductAgents SDK

OpenAI Agents SDK

OpenAI Agents SDK is an open-source development framework released by OpenAI for building agent-based applications. It provides developers with core capabilities for creating, orchestrating, and managing AI agents, supporting multi-agent collaboration, tool calling, conversation context management, and execution tracing. The framework is designed to simplify the development of autonomous task-planning and execution systems built on large language models.

Core Facts

Timeline (last 90 days)

Oct 28

The OpenAI Agents SDK replaces OpenAI's previous experimental project Swarm, its core metaphor is handoffs, and it supports Python and TypeScript.

Unverified50%
Oct 28

In the OpenAI Agents SDK, after a run ends, result.last_agent points to the agent that actually handled the request last, making it easy to reuse the correct agent instance when continuing the conversation after a handoff.

Unverified50%
Oct 28

In the OpenAI Agents SDK, an agent in the tools list is converted into an ordinary tool via the agent.as_tool() method; when called, it starts an independent sub-run and returns only the final output string to the parent agent, and the parent run's conversation state is not inherited.

Unverified50%
Oct 26

A guardrail itself is usually a lightweight agent that uses structured output to make a binary judgment, so it adds the overhead of one extra LLM call.

Unverified50%
Oct 26

The OpenAI Agents SDK supports marking ordinary Python functions as tools via the @function_tool decorator and placing them in an Agent's tools list.

Unverified50%
Oct 26

The Guardrail mechanism of the Agents SDK throws an InputGuardrailTripwireTriggered or OutputGuardrailTripwireTriggered exception when it determines a policy violation, immediately halting the agent's run rather than merely returning a warning.

Unverified50%
Oct 26

SQLiteSession is the approach in the OpenAI Agents SDK for locally persisting session memory, and it does not depend on OpenAI servers.

Unverified50%
Oct 26

agent.as_tool(tool_name=..., tool_description=...) can wrap a sub-agent as a tool; the difference from handoff is that handoff transfers control, whereas toolification keeps control with the main agent, which calls the sub-agent.

Unverified50%
Oct 26

In the OpenAI Agents SDK, structured output can be obtained by using a structured output model (such as a Pydantic BaseModel) and setting the Agent's output_type, and the returned final_output is an instance of that type.

Unverified50%
Oct 26

The OpenAI Agents SDK supports human-in-the-loop approval of sensitive operations via needs_approval=True; after running, interruptions appear in the result object, and state.approve or state.reject must be called to continue execution.

Unverified50%

40 more timeline events

All Facts (20)

Verified

OpenAI open-sourced the experimental framework Swarm in 2024, proposing a lightweight Agent-to-Agent handoff mechanism.

80%
Verified

Major AI companies such as OpenAI and Anthropic all provide official Python-based SDKs.

70%
Verified

OpenAI's Agent SDK takes a more engineering-oriented approach, natively supporting agent-to-agent hand-off mechanisms and built-in safety guardrails.

65%
Verified

Agent failure modes can be understood across three architectural layers: planning-layer failure, execution-layer failure, and reflection-layer failure, each with entirely different mitigation strategies.

65%
Verified

In the tool-calling mechanism, developers attach a tool description list in JSON Schema format when calling the LLM API, and the model outputs call parameters in structured JSON format

65%
Verified

Open Agent Builder natively supports the MCP protocol and can connect to existing MCP tool servers in the community.

65%
Verified

The OpenAI Agents SDK's trace function supports adding custom metadata, which can be used to filter and analyze trace records.

65%
Verified

The Agents SDK provides a trace function as a context manager, supporting two key parameters — workflow_name and group_id — for customizing traces.

65%
Verified

The OpenAI Agents SDK's Runner does not automatically save and maintain conversation history; each call to Runner.run() is independent.

65%
Verified

The instructions parameter in the OpenAI Agents SDK is essentially a system prompt, used to define the behavioral guidelines of the Agent.

65%
Verified

The official OpenAI Python SDK released version v3.23.0, with enhanced Agents capabilities as the main theme.

90%
Unverified

OpenAI Agents SDK内置了WebSearchTool,可用于Agent的Web搜索功能

90%
Unverified

OpenAI Agents SDK使用to_input_list()方法将上一次的运行结果转换为可重新输入的格式,以实现对话历史的手动管理

90%
Unverified

2024-2025年,Anthropic Claude Agent SDK、OpenAI Agents SDK、Google ADK等Agent框架集中涌现

85%
Unverified

OpenAI Agents SDK支持gpt-4.1-nano和gpt-4.1-mini等模型

85%
Unverified

group_id的设计借鉴了分布式追踪领域的Trace Context标准(如W3C TraceContext),用于将相关追踪记录归为一组

70%
Unverified

The OpenAI Agents SDK provides a Guardrails mechanism for intercepting inputs that should not enter the model and outputs that should not be returned to the user.

60%
Unverified

ScriptedModel is a test helper class provided by the OpenAI Agents SDK that allows pre-defining static response sequences to drive Agent execution in place of a real LLM.

60%
Unverified

The stateless design of the OpenAI Agents SDK contrasts with stateful frameworks such as LangChain's Memory module.

60%
Unverified

The OpenAI Agents SDK defines five message types: Developer Message, User Message, Assistant Message, Function Call, and Function Call Output.

60%

Source Articles