laguagu/claude-code-nextjs-skills / skills/openai-agents-sdk
openai-agents-sdk
VerifiedOpenAI 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.9 KB |
| references/guardrails.md | markdown | 1.8 KB |
| references/handoffs.md | markdown | 1.4 KB |
| references/patterns.md | markdown | 1.5 KB |
| references/providers.md | markdown | 2.8 KB |
| references/sandbox.md | markdown | 1.5 KB |
| references/sessions.md | markdown | 1.6 KB |
| references/streaming.md | markdown | 1.5 KB |
| references/structured-output.md | markdown | 838 B |
| references/tools.md | markdown | 3.0 KB |
references/streaming.md
View on GitHub# Streaming contracts
`Runner.run_streamed` returns a streamed result. Consume `stream_events()`
through completion to establish final output, usage and terminal failure.
Raw provider deltas, run items and agent changes are distinct event shapes:
`raw_response_event` (`event.data`), `run_item_stream_event` (`event.item`)
and `agent_updated_stream_event` (`event.new_agent`). The handoff-completed
event name is spelled `handoff_occured`.
`result.cancel()` cancels immediately; `result.cancel(mode="after_turn")`
finishes the current turn. Approval pauses end with `result.interruptions`;
resume the approved/rejected state with `Runner.run_streamed(original_agent, state)`.
Choose the UI protocol explicitly. A stream already opened with a successful
HTTP status can still emit a terminal error. Handle cancellation and safe public
errors; keep provider/DB diagnostics on the server.
Input guardrails can run in parallel, and output guardrails run after agent
completion. Already-sent deltas or completed side effects cannot be withdrawn.
If the product must withhold unvalidated content, buffer it or use the matching
blocking/tool boundary rather than claiming output guardrails prevent display.
Read [streaming docs](https://openai.github.io/openai-agents-python/streaming/)
and [guardrails](https://openai.github.io/openai-agents-python/guardrails/) for
event and persistence behavior in the installed version. Verify tool events,
partial output, tripwires and disconnects alongside successful text.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |