Openai Agents SDK, Responses Api is the new tools provided by Openai. I want to talk about OpenAI's New Tools for Building Intelligent Agents
Openai Agents SDK, Responses API
OpenAI has introduced a suite of new tools aimed at empowering developers and enterprises to build more sophisticated and reliable AI agents. These enhancements mark a significant step in making AI-driven applications more adaptable, efficient, and accessible.
Openai Responses API
The Responses API is OpenAI’s new API primitive for leveraging built-in tools to build agents. It combines the simplicity of Chat Completions with the tool-use capabilities of the Assistants API. The API provides a more flexible foundation for developers by enabling multi-tool use and multiple model turns within a single API call.
- Supports web search, file search, and computer use as built-in tools.
- Offers a unified item-based design for easier management.
- Allows intuitive streaming events and simplified SDK access via
response.output_text
. - Enables better data storage and evaluation capabilities for agent performance analysis.
The Responses API is available today, with standard pricing applying to tokens and tools used.
OpenAI’s Responses Api in action:
Openai Agents SDK
A major highlight is the release of an advanced agent-building framework, which simplifies the integration of AI into complex workflows. The new tools allow for:
- Seamless orchestration of multiple AI models.
- Memory capabilities for agents to retain information across interactions.
- Better security and compliance features to ensure enterprise-grade usage.
- Multi-agent workflows that allow developers to integrate agents that work collaboratively.
- Configurable handoffs between AI agents based on task requirements.
For example, Coinbase used the Agents SDK to prototype and deploy AgentKit, which enables AI agents to interact with crypto wallets and other on-chain activities in just a few hours.
OpenAI’s Agents SDK in action:
New Built-in Tools for Agents
Web Search
Developers have already been utilizing web search for a variety of use cases, including shopping assistants, research agents, and travel booking agents—any application that requires timely information from the web. for a variety of use cases including shopping assistants, research agents, and travel booking agents—any application that requires timely information from the web.
One example is Hebbia, which leverages the web search tool to help asset managers, private equity and credit firms, and law practices quickly extract actionable insights from extensive public and private datasets. to help asset managers, private equity and credit firms, and law practices quickly extract actionable insights from extensive public and private datasets. By integrating real-time search capabilities into their research workflows, Hebbia delivers richer, context-specific market intelligence and continuously improves the precision and relevance of their analyses, outperforming current benchmarks.
The web search tool in the API is powered by the same model used for ChatGPT search. Benchmarks such as SimpleQA, which evaluates the accuracy of LLMs in answering short, factual questions, show that GPT‑4o search preview and GPT‑4o mini search preview achieve scores of 90% and 88%, respectively.. On SimpleQA, a benchmark that evaluates the accuracy of LLMs in answering short, factual questions, GPT‑4o search preview and GPT‑4o mini search preview score 90% and 88% respectively.
SimpleQA Accuracy Benchmark
Responses generated with web search in the API include links to sources, such as news articles and blog posts, allowing users to engage with more information while also giving content owners opportunities to reach a broader audience., such as news articles and blog posts, giving users a way to learn more. With these clear, inline citations, users can engage with information in a new way, while content owners gain new opportunities to reach a broader audience.
Additionally, websites and publishers have the option to appear in web search results within the API, enhancing visibility for their content.
The web search tool is available to all developers in preview in the Responses API. Developers also have direct access to OpenAI’s fine-tuned search models via gpt-4o-search-preview and gpt-4o-mini-search-preview in the Chat Completions API. Pricing starts at \$30 per 1,000 queries for GPT‑4o search and \$25 per 1,000 queries for GPT‑4o-mini search.
- Provides fast, up-to-date answers with citations from the web.
- Available in GPT-4o and GPT-4o-mini.
- Enables shopping assistants, research agents, and travel booking bots.
Example:
const response = await openai.responses.create({
model: "gpt-4o",
tools: [ { type: "web_search_preview" } ],
input: "What was a positive news story that happened today?",
});
console.log(response.output_text);
File Search
- Retrieves relevant information from large document volumes.
- Supports query optimization, metadata filtering, and reranking.
- Helps with customer support, legal research, and technical documentation queries.
Example:
const productDocs = await openai.vectorStores.create({
name: "Product Documentation",
file_ids: [file1.id, file2.id, file3.id],
});
const response = await openai.responses.create({
model: "gpt-4o-mini",
tools: [{
type: "file_search",
vector_store_ids: [productDocs.id],
}],
input: "What is deep research by OpenAI?",
});
console.log(response.output_text);
Computer Use Automation
Developers can use the computer use tool to automate browser-based workflows like performing quality assurance on web apps or executing data-entry tasks across legacy systems.
One example is Unify, a system designed to streamline revenue growth through AI agents. By leveraging OpenAI’s computer use tool, Unify’s agents can access previously unreachable data via APIs—such as verifying a business’s real estate expansion through online maps. This analysis serves as a custom trigger for personalized outreach, allowing go-to-market teams to engage buyers with greater accuracy and efficiency.
Another example is Luminai, which has integrated the computer use tool to automate operational workflows for large enterprises struggling with legacy systems lacking API support. In a pilot project with a major community service organization, Luminai automated the application processing and user enrollment process in just days, something traditional robotic process automation (RPA) systems had failed to achieve in months.
Before launching Computer-Using Agent (CUA) in Operator last year, OpenAI conducted extensive safety testing and red teaming, addressing three primary risks: misuse, model errors, and frontier risks. With the introduction of CUA in the API, OpenAI has implemented additional safeguards, including:
- Safety checks to guard against prompt injections.
- Confirmation prompts for sensitive actions.
- Tools to help developers isolate execution environments.
- Enhanced detection of potential policy violations.
Despite these mitigations, the model is still susceptible to errors, particularly in non-browser environments. Benchmark tests show that CUA’s performance on OSWorld is 38.1%, indicating the need for human oversight in real-world automation scenarios.
Benchmark Comparison for OSWorld, WebArena, and WebVoyager
Starting today, the computer use tool is available as a research preview in the Responses API for select developers in usage tiers 3-5. Pricing is set at \$3 per 1M input tokens and \$12 per 1M output tokens.
Developers can now build AI-powered tools that perform computer automation tasks, including:
- Capturing mouse and keyboard actions.
- Automating workflows across multiple software applications.
- Enhancing enterprise productivity through AI-driven task execution.
Example:
const response = await openai.responses.create({
model: "computer-use-preview",
tools: [{
type: "computer_use_preview",
display_width: 1024,
display_height: 768,
environment: "browser",
}],
truncation: "auto",
input: "I'm looking for a new camera. Help me find the best one.",
});
console.log(response.output);
4. AI Safety and Governance Enhancements
Recognizing the importance of responsible AI use, OpenAI has reinforced its safety measures with:
- Stronger bias detection algorithms.
- More transparent AI decision-making processes.
- Advanced compliance tracking tools for regulatory requirements.
- Additional safety evaluations for automation-related risks.
Openai Agents SDK Tutorial
OpenAI has also provided new code examples for integrating AI into applications efficiently:
Example: Using the Agents SDK to build AI agents
from agents import Agent, Runner, WebSearchTool, function_tool
@function_tool
def submit_refund_request(item_id: str, reason: str):
return "success"
support_agent = Agent(
name="Support & Returns",
instructions="You are a support agent who can submit refunds",
tools=[submit_refund_request],
)
shopping_agent = Agent(
name="Shopping Assistant",
instructions="You are a shopping assistant who can search the web",
tools=[WebSearchTool()],
)
triage_agent = Agent(
name="Triage Agent",
instructions="Route the user to the correct agent.",
handoffs=[shopping_agent, support_agent],
)
output = Runner.run_sync(
starting_agent=triage_agent,
input="What shoes might work best with my outfit so far?",
)
print(output)
Deprecation of the Assistants API
OpenAI has announced that the Assistants API will be deprecated by mid-2026 in favor of the Responses API. Developers are encouraged to migrate applications to the Responses API, which offers:
- Full feature parity with Assistants API.
- Support for Assistant-like and Thread-like objects.
- Better flexibility, speed, and efficiency.
A detailed migration guide will be provided by OpenAI closer to the sunset date.
Openai Agents SDK, Responses API: Final Thoughts
OpenAI continues to push the boundaries of what’s possible with artificial intelligence. With these new tools, businesses and developers can create smarter, safer, and more scalable AI solutions. As these advancements roll out, the AI landscape is set to become more innovative and impactful than ever before.
For more details, visit OpenAI’s official announcement here:openai.com/news
Top comments (0)