openai-agents-sdk

Implement agents, function tools, sessions, and handoffs with the OpenAI Agents Python SDK.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ramshan00/hackaton --skill openai-agents-sdk-ramshan00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openai-agents-sdk
Source: https://github.com/ramshan00/hackaton/tree/main/Hackathon2-phase3/.claude/skills/openai-agents-sdk
Command: npx skills add https://github.com/ramshan00/hackaton --skill openai-agents-sdk-ramshan00

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai-agents, pydantic, and includes scripts (resource) and references (resource) components.

What problem does it solve? Building agentic AI applications in Python requires wiring together LLM agents, tool schemas, conversation memory, and multi-agent delegation, which involves repetitive boilerplate and error-prone manual schema definitions. ## Core Features & Use Cases - Agent and Tool Creation: Define agents with instructions and convert Python functions into tools using the @function_tool decorator with automatic JSON schema generation from type hints. - Persistent Sessions: Manage multi-turn conversation history with SQLiteSession so agents retain context across interactions. - Agent Handoffs: Delegate tasks between specialized agents such as booking and refund agents through a triage agent pattern. - Use Case: Build a customer support assistant where a triage agent routes booking questions to a booking agent and refund questions to a refund agent, while remembering the full conversation history in a SQLite-backed session. ## Quick Start Ask the AI to create an OpenAI Agents SDK agent with a calculator function tool and run a simple synchronous interaction.

Frequently Asked Questions about openai-agents-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an agent with the OpenAI Agents Python SDK?

Create an agent by instantiating the Agent class with a name and instructions, then run it with Runner.run_sync for synchronous execution or Runner.run for async. Pass tools as a list to give the agent callable capabilities.

How to add function tools to OpenAI agents in Python?

Decorate a Python function with @function_tool and the SDK automatically generates a JSON schema from its type hints and docstring. Use Annotated types or Pydantic models to describe parameters and structured outputs.

Does the OpenAI Agents SDK support conversation memory?

Yes, the SDK supports persistent conversation memory through SQLiteSession. Pass a session instance with a unique session ID to Runner calls, and the agent automatically retains context from previous turns.

How do agent handoffs work in the OpenAI Agents SDK?

Handoffs let a triage agent delegate tasks to specialized agents by passing them in the handoffs list of the Agent constructor. The triage agent's instructions determine when to transfer control, such as routing booking or refund requests.

Can I use async functions as tools in the OpenAI Agents SDK?

Yes, the SDK supports both sync and async functions as tools. Async tools work with Runner.run, and the SDK also provides RunContextWrapper for tools that need access to execution context.