OpenAI Agents SDK Learn banner
GongRzhe GongRzhe

OpenAI Agents SDK Learn

Development community

Description

This repository contains examples of using the OpenAI Agents SDK to build intelligent travel planning agents with progressively advanced capabilities.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

OpenAI Agents SDK Learn

This repository contains examples of using the OpenAI Agents SDK to build intelligent travel planning agents with progressively advanced capabilities.

This project was adapted from examples in:

Project Structure

  • v1_basic_agent.py - A simple agent example that generates a haiku about recursion
  • v2_structured_output.py - Travel agent with structured output using Pydantic models
  • v3_tool_calls.py - Travel agent with tool calls for weather forecasting
  • v4_handoffs.py - Travel agent with specialized sub-agents for flights and hotels
  • v5_guardrails_and_context.py - Travel agent with budget guardrails and user context
  • v6_streamlit_agent.py - A Streamlit web interface for the travel agent with chat memory
  • v7_streamlit_agent_real.py - Enhanced Streamlit interface with real API integrations
  • v8_mcp_stdio.py - Demonstration of Model Control Protocol (MCP) with stdio transport
  • v9_mcp_sse.py - Demonstration of MCP with Server-Sent Events (SSE) transport
  • server.py - A test server for MCP examples with simple tools

Features Demonstrated

  1. **Basic Agent Configuration (v1)**

    • Instructions and model settings
    • Simple agent execution with synchronous response
  2. **Structured Output (v2)**

    • Using Pydantic models for structured responses
    • Travel planning with organized destination information
  3. **Tool Calls (v3)**

    • Custom tools for retrieving external data
    • Weather forecasting integration using NWS API
  4. **Agent Handoffs (v4)**

    • Specialized agents for flights and hotels
    • Delegation to domain-specific experts
    • Amadeus API integration for real-world travel data
  5. **Guardrails and Context (v5)**

    • Input validation with budget guardrails
    • User context