Interactive Conversation to Perform Tasks is Essential in This Agent

The OpenAI Agent SDK provides the foundation (agents, tools, MCP, sessions), but we need a custom interactive wrapper to handle the confirmation/correction flow that's essential. current simple_agent.py does this beautifully:# Line 1149-1176: Interactive parameter correctionprint(f"\nExecute tool '{tool_name}' with these parameters? (y/n): ")user_input = input().strip()if user_input == 'n':# User can provide corrections# Agent remembers and retries … Continue reading Interactive Conversation to Perform Tasks is Essential in This Agent

Comparing My Agent to OpenAI Agent SDK

My agent hand-rolls LLM prompting, tool selection, conversational memory, and MCP tool discovery while openai-agents-python/src/agents/agent.py already encapsulates these behaviors through the Agent runtime. Custom MCP plumbing, the class manages ClientSession, output parsing, retries, and tool enablement logic on its own, while agents.mcp.MCPUtil and Agent.get_all_tools() can surface MCP tools automatically once servers are connected. Conversation history and logging live in plain dicts and prints. The … Continue reading Comparing My Agent to OpenAI Agent SDK

Cook Book Review: Agent SDK Agent as a Portfolio Manager

This complex agent is meant to create a workflow that multiple specialist agents (Macro, Fundamental, Quantitative) collaborate under a Portfolio Manager agent to solve a challenging investment research problem. Workflow codes: import datetime import json import os from pathlib import Path from contextlib import AsyncExitStack from agents import Runner, add_trace_processor, trace from agents.tracing.processors import BatchTraceProcessor … Continue reading Cook Book Review: Agent SDK Agent as a Portfolio Manager

Cook Book Review: Agent SDK Case Parallel Agents

First create agents # Agent focusing on product features features_agent = Agent( name="FeaturesAgent", instructions="Extract the key product features from the review." ) # Agent focusing on pros & cons pros_cons_agent = Agent( name="ProsConsAgent", instructions="List the pros and cons mentioned in the review." ) # Agent focusing on sentiment analysis sentiment_agent = Agent( name="SentimentAgent", instructions="Summarize the … Continue reading Cook Book Review: Agent SDK Case Parallel Agents

Cook Book Review: Agentic SDK Use Case

There are a dozen of such reviews since the launch of Agentic SDKs by OpenAI in March 2025. Let's start from the very first one: Automating Dispute Management with Agents SDK and Stripe API by Dan Bell. First need to defines several helper function tools that support the dispute processing workflow. close_dispute automatically closes a Stripe … Continue reading Cook Book Review: Agentic SDK Use Case

Use OpenAI Tools: Web Search, Code Interpreter, File Search and Computer Use

Web search is available in the Responses API as the generally available version of the tool, web_search, as well as the earlier tool version, web_search_preview. To use web search in the Chat Completions API, use the specialized web search models gpt-4o-search-preview and gpt-4o-mini-search-preview. Web search is limited to a context window size of 128000 (even with gpt-4.1 and gpt-4.1-mini models). The Code interpreter is … Continue reading Use OpenAI Tools: Web Search, Code Interpreter, File Search and Computer Use

Core Concepts to Use OpenAI Tools: Function Calling

Function calling or tool calling seems same, but we need to discern function tools, custom tools and built-in tools. A function is a specific kind of tool, defined by a JSON schema. In addition to function tools, there are custom tools (described in this guide) that work with free text inputs and outputs. There are … Continue reading Core Concepts to Use OpenAI Tools: Function Calling

Core Concepts to Use OpenAI Tools: Text Generation and Structured Output

Text Generation, Image and vision, Audio and Speech, Structured Output, Function Calling, Using GTP-5 and Migrate to Response API. Text Generation: Prompt engineering: sample codes from openai import OpenAI client = OpenAI() response = client.responses.create( model="gpt-5", reasoning={"effort": "low"}, instructions="Talk like a pirate.", # was realized by input array before, there are role of developer, user … Continue reading Core Concepts to Use OpenAI Tools: Text Generation and Structured Output