AGENT SKILL

openai-agents-python

Route tasks for using, debugging, and maintaining the OpenAI Agents Python SDK across agents, tools, sessions, models, MCP, realtime, sandbox, tracing, and repo-development workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
openai-agents-python
license
MIT
metadata
{ "disco-role": "operating" }
description
Route tasks for using, debugging, and maintaining the OpenAI Agents Python SDK across agents, tools, sessions, models, MCP, realtime, sandbox, tracing, and repo-development workflows.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

OpenAI Agents Python

Use this repo skill when a task involves the Python openai-agents package, the agents import module, or this repository's SDK code, examples, tests, docs, and maintainer workflow.

The root is a router. Read only the nearest sub-skill and references needed for the current task.

Start Here

  1. Install the package with Python 3.10+:

    pip install openai-agents
    
  2. Use extras only for the workflow that needs them:

    pip install "openai-agents[voice]"       # VoicePipeline, STT/TTS helpers
    pip install "openai-agents[redis]"       # RedisSession
    pip install "openai-agents[sqlalchemy]"  # SQLAlchemySession
    pip install "openai-agents[docker]"      # Docker sandbox client
    pip install "openai-agents[litellm]"     # LiteLLM adapter
    
  3. Run the bundled install diagnostic when import, extras, or version facts are unclear:

    python openai-agents-python/scripts/check_openai_agents_install.py --json
    
  4. Read references/repo-provenance.md before deciding whether this skill is current for a checkout. If commit, dirty source state, version, or major evidence paths changed, refresh the skill.

Route By Task

User task or signal Read
Define Agent, run Runner.run, stream events, inspect RunResult, resume RunState, use RunConfig core settings sub-skills/core-runtime/SKILL.md
Add function tools, hosted tools, local shell/computer/apply-patch tools, agents-as-tools, handoffs, approvals, guardrails sub-skills/tools-handoffs-guardrails/SKILL.md
Add persistent memory, choose SQLiteSession or optional session backends, use OpenAI conversation continuation, compact history sub-skills/sessions-memory/SKILL.md
Configure OpenAI model providers, Responses vs Chat Completions, websocket transport, third-party adapters, retries, ModelSettings sub-skills/models-providers/SKILL.md
Integrate local MCP servers, hosted MCP tools, filtering, approvals, structured content, retries, auth/session issues sub-skills/mcp-and-hosted-tools/SKILL.md
Build realtime sessions, audio/text event loops, telephony attach flows, interruption playback, optional voice pipelines sub-skills/realtime-voice/SKILL.md
Configure SandboxAgent, Manifest, entries, capabilities, sandbox clients, snapshots, mounts, sandbox memory, workspace safety sub-skills/sandbox-agents/SKILL.md
Configure tracing, processors, spans, sensitive-data controls, usage tracking, logging/debug, visualization sub-skills/tracing-observability/SKILL.md
Modify this repository, choose focused tests, follow API compatibility rules, update docs/snapshots, prepare PR handoff sub-skills/repo-development/SKILL.md

Cross-Cutting References

Bundled Scripts

  • Run scripts/check_openai_agents_install.py to inspect package version, importability, public surfaces, and optional extras without API calls.
  • Run scripts/list_example_families.py to see the distilled example families this skill covers without depending on the original checkout.
  • Each sub-skill also owns focused helpers for safe schema, config, manifest, tracing, or test-target checks.

Important Boundaries

  • This skill is self-contained. Do not require future agents to open original repository docs, examples, tests, or scripts at runtime.
  • Original examples and tests are evidence. Credentialed, networked, audio-device, Docker, hosted-provider, or long-running examples are distilled into bundled references or marked as verification candidates, not runtime dependencies.
  • Most SDK examples require OPENAI_API_KEY or another provider credential before real model calls. The bundled helpers avoid model/API calls by default.
  • agents.voice requires the voice extra. Optional session, provider, sandbox, and visualization backends require their matching extras.
  • When editing this repository, follow sub-skills/repo-development/SKILL.md before changing runtime code, tests, examples, build/test config, or behavior-impacting docs.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351