openai-agents-sdk
Skill72 starsChanged 18 days agoMITView on GitHub
OpenAI Agents SDK (Python) development. Use when building AI agents, multi-agent handoffs, function tools, guardrails, sessions, streaming, or tracing with the `openai-agents` / `agents` Python package — including Azure OpenAI through its native client or LiteLLM. Triggers on imports from `agents`, uses of `Runner.run_sync`/`Runner.run_streamed`, `@function_tool`, `AgentOutputSchema`, `SQLiteSession`, or questions about the openai-agents-python SDK. Python only — not the TypeScript `@openai/agents` SDK.
5 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- abdullahqureshi27/TaskCortextheir own version, first seen Nov 8, 2026
- yevhens-hue/claude-skills-starter-kittheir own version, first seen Aug 28, 2026
- sheikh-mohammad/agent-factory-claude-skillstheir own version, first seen Aug 4, 2026
- AbdulSamad94/Personal-Portfolioedited, first seen Jun 17, 2026
- mm-mazhar/agent-skills-configtheir own version, first seen Feb 10, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- AbdulSamad94/Personal-Portfolio★ 212% same
Wrote their own version · 4
- sheikh-mohammad/agent-factory-claude-skills★ 6same name
- yevhens-hue/claude-skills-starter-kit★ 4same name
- abdullahqureshi27/TaskCortex★ 0same name
- mm-mazhar/agent-skills-config★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/ai-sdk-6/references/agents.mdAGENTS.md
- skills/ai-sdk-7/references/agents.mdAGENTS.md
- skills/openai-agents-sdk/references/agents.mdAGENTS.md
- skills/react-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-view-transitions/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-harness-reviewSkill
- ai-appSkill
- ai-elementsSkill
- ai-sdk-6Skill
- ai-sdk-7Skill
- ai-sdkSkill
- cache-componentsSkill
- chrome-devtoolsSkill
- frontend-designSkill
- goSkill
- handoffSkill
- hetzner-cloudSkill
- iconsSkill
- next-best-practicesSkill
- nextjs-chatbotSkill
- nextjs-seoSkill
- nextjs-shadcnSkill
- postgres-semantic-searchSkill
- react-best-practicesSkill
- shadcnSkill
- supabase-postgres-best-practicesSkill
- vercel-react-view-transitionsSkill
- web-design-guidelinesSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill for openai-agents / agents, not the TypeScript SDK.
- Distinctive: line 15
Check the selected model's tools, reasoning settings and provider availability.
- Distinctive: line 79
Keep the project's provider, model and storage unless the task requires a change.
- Distinctive: line 83
Use native provider/client support when it fits.
- Very specific: line 105
Use the OpenAI Developer Docs MCP (https://developers.openai.com/mcp) if available for current OpenAI API/provider behavior, or its …
- Very specific: line 114
Verify changed tools, multi-turn history, approval/denial and failure recovery.
- Very specific: line 115
Use installed agents.testing (verified in 0.22.3) for offline orchestration: ScriptedModel, ModelStep, assistant_message, function_call and …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenAI Agents SDK for Python
Use this skill for openai-agents / agents, not the TypeScript SDK.
Resolve the installed package and its provider integrations before implementing
an API. Current SDK documentation
and a matching source tag take precedence over static examples.
Choose a model from the current OpenAI model catalog and model-selection guide. Check the selected model's tools, reasoning settings and provider availability; an SDK fallback or a demo ID is not a permanent recommendation.
The wheel ships no docs. Offline, read the installed source: the version from
importlib.metadata.version("openai-agents"), public exports in
agents/__init__.py, docstrings and types in the package directory
(python -c "import agents; print(agents.__file__)"). The documentation
source is docs/ at repository tag v<version>.
Core shape
Runner.run_sync raises inside a running event loop (async handlers and
notebooks); use await Runner.run(...). Runner.run_streamed(...) itself
is not awaited; consume its stream_events() async iterator to completion.
Checked with openai-agents 0.22.3; confirm names in the installed source for another version:
import asyncio
from pydantic import BaseModel
from agents import Agent, ModelSettings, Runner, SQLiteSession, function_tool
from openai.types.shared import Reasoning
class OrderAnswer(BaseModel):
order_id: str
status: str
reply: str
@function_tool
def get_order_status(order_id: str) -> str:
"""Return an order's shipping status.
Args:
order_id: Order ID given by the customer.
"""
return f"{order_id}: shipped" # authorize and read the app's data here
support = Agent(
name="Support",
instructions="Answer order questions. Use get_order_status for order data.",
model="gpt-6.1-sol", # example API ID; use the project's configured model
model_settings=ModelSettings(reasoning=Reasoning(effort="medium")),
tools=[get_order_status],
output_type=OrderAnswer,
)
# A manager keeps control with tools=[order_tool]; handoffs=[support] transfers it.
order_tool = support.as_tool("order_support", "Answer an order question.")
async def main() -> None:
session = SQLiteSession("user-123", "conversations.db") # ID owned by the signed-in user
result = await Runner.run(support, "Where is order A-17?", session=session)
answer: OrderAnswer = result.final_output # validated OrderAnswer instance
print(answer.status, answer.reply)
asyncio.run(main())The example uses Responses (the SDK's default API). GPT-6.1 Sol
requires Responses for tool calling and does not support none or minimal
reasoning effort.
Integration decisions
- Keep the project's provider, model and storage unless the task requires a change. Verify model IDs/capabilities in provider configuration or live docs. SDK model/settings defaults may change; configure product-critical choices explicitly.
- Use native provider/client support when it fits. LiteLLM/Any-LLM are optional integrations with their own compatibility and settings behavior.
- Choose handoffs when a specialist takes over, or
agent.as_tool()when the manager should continue after delegated work. A fixed pipeline does not need extra agents merely to implement ordinary control flow. - Authorize side effects in tools. Agent instructions, output schemas and guardrails do not replace authorization or idempotency.
- Decide history ownership, approval/resume and tracing data policy before exposing a multi-turn agent to untrusted clients.
Read for the feature
- Agents/providers: model defaults, Azure and adapters.
- Tools: local/hosted execution, delegation and approval/resume.
- Structured output: schema and capability constraints.
- Streaming: event types, failures and guardrails.
- Handoffs: control transfer and filtering.
- Guardrails: execution timing and coverage.
- Sessions: history ownership and persistence.
- Orchestration/tracing: run limits and observability.
- Sandbox: workspace execution and resume state.
Use the OpenAI Developer Docs MCP (https://developers.openai.com/mcp) if
available for current OpenAI API/provider behavior, or its plain-text index
https://developers.openai.com/api/docs/llms.txt; use the Python SDK's own
reference for SDK signatures. Read selected
official examples
from a compatible tag, not a copied catalog of demos.
Verification
Verify changed tools, multi-turn history, approval/denial and failure recovery.
Use installed agents.testing (verified in 0.22.3) for offline orchestration:
ScriptedModel, ModelStep, assistant_message, function_call and
model.assert_complete(), with RunConfig(tracing_disabled=True); assigning
agent.model = ScriptedModel([...]) runs the core shape offline. Run the
project's checks; report missing provider access separately from verified SDK
behavior.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

