Skip to content

docs: fix missing imports in dynamic instructions example#3895

Merged
seratch merged 2 commits into
openai:mainfrom
Syed-Umer-Ali:docs/fix-missing-imports-dynamic-instructions
Jul 20, 2026
Merged

docs: fix missing imports in dynamic instructions example#3895
seratch merged 2 commits into
openai:mainfrom
Syed-Umer-Ali:docs/fix-missing-imports-dynamic-instructions

Conversation

@Syed-Umer-Ali

Copy link
Copy Markdown
Contributor

What

The "Dynamic instructions" code block in docs/agents.md uses RunContextWrapper[UserContext] and Agent[UserContext] without importing anything from agents.

Why

Running the example as-written raises ImportError: name 'RunContextWrapper' is not defined.

Fix

Added from agents import Agent, RunContextWrapper before the function definition.

Verification

Confirmed both Agent and RunContextWrapper are exported from agents in src/agents/__init__.py.

@seratch seratch added the documentation Improvements or additions to documentation label Jul 20, 2026
Comment thread docs/agents.md
@seratch
seratch enabled auto-merge (squash) July 20, 2026 21:58
@seratch
seratch merged commit e78bb09 into openai:main Jul 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants