Exploring the new OpenAI Responses API and Agents SDK
We check out the web search with Responses API and the Agents SDK
Today OpenAI made a couple of major announcements, a new Responses API that will replace the Assistants API, and an Agents SDK along with some observability tools.
Responses API
First up is the Responses API. This new tool combines features from the previous Chat Completions and Assistants APIs, giving developers a more flexible option. It comes with some handy built-in tools, like:
Web Search: This lets you pull in real-time information with citations, making responses more trustworthy.
File Search: It helps you search through large document collections quickly and accurately, even filtering by metadata.
Computer Use: This feature allows AI to interact with computer interfaces, which means it can automate a variety of tasks.
The Responses API will replace the Assistants API by mid-2026, so developers are encouraged to start using this new platform.
To test it out, you can go to the URL https://platform.openai.com/playground/prompts?models=gpt-4o
Choose tools → Web Search and configure the web search tool. I am only setting country.
Next enter the system message “You are a helpful assistant“ and the user message. Since this will involve web search, I asked, “What did OpenAI announce today ?”
The response was quick, but bad. I am in US where it is still March 11th and Open AI made these announcements, but the response assumed the date as March 12th and said there were no new announcements. It also included some older news from OpenAI. I hope this will undergo more reviews. Each of the web search tool calls costs me $0.028
Agents SDK
Next, we have the Agents SDK. This open-source framework is designed to manage complex workflows involving multiple AI agents. It includes some important features like:
Agent Orchestration: This makes it easier for different AI agents to work together smoothly.
Safety Guardrails: These are built-in safety measures that help ensure the AI agents operate reliably and securely.
Tracing Capabilities: This tool aids in debugging, making it simpler to identify and fix issues that may arise during agent interactions.
To install, you need to set the OPENAI_API_KEY
environment variable and do the following steps
pip install openai-agents
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)
# Code within the code,
# Functions calling themselves,
# Infinite loop's dance.
Test these out for yourself and share what you find.