Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
438 commits
Select commit Hold shift + click to select a range
29b2acf
fix(handoffs): preserve HandoffInputData.input_items in remove_all_to…
adityasingh2400 May 9, 2026
4bb388c
fix(redis-session): preserve created_at across writes (#3202)
adityasingh2400 May 9, 2026
8f40dde
fix(litellm): avoid duplicating content and signed thinking blocks ac…
adityasingh2400 May 9, 2026
3031b13
fix(realtime): validate RealtimeAgent fields in __post_init__ (#3234)
adityasingh2400 May 9, 2026
dbb3181
fix(tracing): keep BatchTraceProcessor worker alive on exporter error…
adityasingh2400 May 9, 2026
fc1abe0
Revert "fix(models): allow extra_query/extra_body via extra_args in R…
seratch May 9, 2026
38bef80
test: guard Responses transport extra kwargs with official client (#3…
seratch May 9, 2026
43e051e
fix: guard no-op tracing span IDs (#3296)
seratch May 9, 2026
73bc963
chore: improve automated example coverage and local service handling …
seratch May 9, 2026
1289fb0
fix: make chat completions response-feature validation opt-in (#3298)
seratch May 9, 2026
9154d83
fix: allow empty GitRepo subpaths as repository root (#3299)
seratch May 9, 2026
bc3607b
fix: preserve GitRepo root subpath aliases (#3303)
seratch May 9, 2026
fa75ffc
fix: #3274 limit sandbox archive extraction (#3278)
Aphroq May 9, 2026
4b87449
fix: #3304 skip corrupt items during pop (#3305)
Aphroq May 9, 2026
610c274
fix: #3306 track MongoDB metadata timestamps (#3307)
Aphroq May 9, 2026
94fa9e2
fix: #3315 align generic dict output schemas (#3316)
Aphroq May 9, 2026
6256099
fix: #3317 return fresh empty strict schemas (#3318)
Aphroq May 9, 2026
94ba76d
fix: include sandbox provider error details (#3326)
seratch May 10, 2026
a6a4cc5
feat: improve examples auto-run coverage and artifact handling (#3328)
seratch May 10, 2026
d7417fb
fix: #3319 preserve nested handoff history content (#3320)
Aphroq May 10, 2026
650212e
fix: #3313 align multi-choice chat streams with strict validation (#3…
Aphroq May 10, 2026
479640e
fix: #3308 reject chat custom tool calls explicitly (#3309)
Aphroq May 10, 2026
52656a5
fix: #3330 handle string tool trimmer allowlists (#3331)
Aphroq May 10, 2026
4bc942a
fix: #3267 preserve required hosted tool IDs in OpenAI conversation s…
seratch May 10, 2026
970db97
fix: #3333 scope Realtime tool approvals by qualified key (#3340)
seratch May 10, 2026
cf151f9
fix: #781 replace assertion in handoff() with UserError (#3339)
0xSudoSSH May 10, 2026
4c3de2d
docs: update MCP examples (#3342)
seratch May 11, 2026
028abc6
fix: make tracing shutdown best-effort on process exit (#3343)
seratch May 11, 2026
eada610
Release 0.17.1 (#3290)
github-actions[bot] May 11, 2026
852a8db
docs: clarify max_delay for retries works (#3350)
seratch May 11, 2026
92e014a
docs: update translated document pages (#3351)
github-actions[bot] May 11, 2026
5635fab
fix: #3268 fix OpenAI Conversations reasoning persistence (#3352)
seratch May 11, 2026
4a95659
fix: #3354 interrupt tracing retry backoff on shutdown (#3355)
Aphroq May 11, 2026
8715a05
fix: avoid auto response for unknown realtime tools (ref: #3287) (#3366)
seratch May 11, 2026
b2bd821
fix: #3359 preserve local approval rejection reasons (#3360)
Aphroq May 11, 2026
e3c99d9
fix: #3361 honor session settings in AsyncSQLiteSession (#3362)
Aphroq May 11, 2026
ae3263b
docs: normalize memory docstring cross-references (#3370)
seratch May 11, 2026
1d3df7f
docs: document sandbox archive limits after #3278 release (#3311)
Aphroq May 11, 2026
64de1cb
fix: #3310 avoid empty chat tool outputs (#3312)
Aphroq May 11, 2026
5594fb4
docs: update translated document pages (#3371)
github-actions[bot] May 11, 2026
55e4a85
Release 0.17.2 (#3368)
github-actions[bot] May 12, 2026
76f42d8
ci: tweak the PR labeling operation
seratch May 12, 2026
55b859d
ci: tweak the PR labeling operation
seratch May 12, 2026
03ff10e
fix: guard None text in text_message_output and add output guardrail …
zhoufengen May 12, 2026
a466860
ci: disable auto labeling job
seratch May 12, 2026
5645845
docs: add SDK review guidance (#3376)
seratch May 12, 2026
ec016cd
fix: unify memory optional dependency import errors (#3389)
seratch May 13, 2026
f9eb3a4
docs: mark Agent.instructions as optional (#3384)
ioleksiuk May 13, 2026
8dc30e4
docs: translate all pages using new settings (#3392)
seratch May 13, 2026
900cab6
docs: document auto_previous_response_id (#3383)
ioleksiuk May 13, 2026
bdd228b
[codex] Harden release tag workflow (#3399)
hintz-openai May 14, 2026
f7e8196
chore: clean up CI jobs and update uv pin (#3400)
seratch May 14, 2026
7865ec9
fix: avoid mutating FunctionTool params_json_schema (#3382)
ioleksiuk May 14, 2026
eca794c
fix: avoid mutating codex output schema input (#3385)
ioleksiuk May 14, 2026
656baf8
fix: #3357 output schema names for Literal types (#3358)
Aphroq May 14, 2026
43a389d
fix: skip wait_for_status when Vercel sandbox is in a terminal state …
cty-ut May 15, 2026
cb7211b
fix: filter hosted_tool_call types in remove_all_tools handoff filter…
ioleksiuk May 15, 2026
5e71d09
fix: guard None text in ItemHelpers.extract_last_content (#3394)
ioleksiuk May 15, 2026
cb0461d
fix: log exception when output guardrail raises instead of silently i…
cty-ut May 16, 2026
94523f9
fix: reject relative sandbox workspace roots (#3422)
a1vazovsky May 16, 2026
e37b3d2
fix: normalize leading question marks in exposed port queries (#3424)
a1vazovsky May 16, 2026
4bd459e
fix: #3363 honor short custom voice splitter chunks (#3364)
Aphroq May 16, 2026
4970fd6
fix: keep mountpoint credentials out of sandbox commands (#3429)
seratch May 18, 2026
41fe113
docs: fix LiteLLM API reference redirect (#3444)
ynachiket May 18, 2026
13d1815
docs: re-fix #3444
seratch May 18, 2026
65774ce
docs: fix duplicated word in usaspending glossary example (#3445)
LeSingh1 May 18, 2026
f6ba91b
Runtime handling updates (#3451)
adrianbravo-oai May 18, 2026
17f7cae
Release 0.17.3 (#3417)
github-actions[bot] May 19, 2026
445ad22
docs: add SECURITY.md in the same way with openai-agents-js repo
seratch May 20, 2026
9514473
fix: apply hardened http client default to MCP SSE transport (#3466)
ioleksiuk May 20, 2026
9303389
fix: use non-None value for output in FunctionSpanData (#3475)
rmotgi1227 May 21, 2026
45effb4
fix: #3459 add opt-in recovery for missing function tools (#3461)
seratch May 21, 2026
eda7b51
fix: add missing entries to span __slots__ (#3483)
rmotgi1227 May 21, 2026
813a003
fix: redact invalid JSON payload in ModelBehaviorError data (#3485)
LeSingh1 May 21, 2026
573530f
fix: export more tracing related functions & types from agents (#3489)
rmotgi1227 May 22, 2026
fedc809
fix: export MCPListToolsItem, ToolSearchCallItem, and ToolSearchOutpu…
rmotgi1227 May 22, 2026
9a92ea4
Support Realtime custom voice objects (#3473)
lionel-oai May 26, 2026
6d5b888
Release 0.17.4 (#3505)
github-actions[bot] May 26, 2026
9211356
fix: #3512 type tool-end hook results as object (#3518)
seratch May 28, 2026
9411cee
docs: add MongoDB session example under examples/memory (#3036)
alexbevi May 28, 2026
d87fec8
docs: remove beta label from realtime agent docs
seratch May 29, 2026
bd8b1b7
fix: use tuple form for SpeechGroupSpanData __slots__ (#3534)
jluocsa May 31, 2026
464043a
docs: add missing space in MCP params docstrings (#3535)
jluocsa May 31, 2026
9520a5c
chore: bump Modal sandbox extra to 1.4.3 (#3538)
jdoughty04 Jun 4, 2026
9470af0
docs: fix docstring typo in stdio params env description (#3557)
mshsheikh Jun 4, 2026
bf0d025
test: add unit tests for run_demo_loop streaming, EOF, and empty-inpu…
jluocsa Jun 4, 2026
0e9807b
docs: fix two docstring grammar errors in tool.py (#3543)
jluocsa Jun 4, 2026
b051a70
test: add unit tests for _openai_retry helpers (#3544)
jluocsa Jun 4, 2026
f4e5d96
docs: add Latitude to external tracing processors list (#3577)
guillemwilly Jun 4, 2026
5121f30
docs: translate pages
seratch Jun 5, 2026
8eaa4b9
fix: expose sandbox error retryability (#3581)
qiyaoq-oai Jun 5, 2026
6927622
docs: tweak in usage doc (#3597)
mshsheikh Jun 9, 2026
a4d17da
docs: improve code snippet in tools documentation (#3599)
mshsheikh Jun 9, 2026
b855c76
docs: capitalization fix in tracing docs (#3602)
mshsheikh Jun 9, 2026
5a3028f
docs: fix subject-verb agreement in agent loop description (#3605)
mshsheikh Jun 9, 2026
d8068d9
Release 0.17.5 (#3619)
github-actions[bot] Jun 11, 2026
1b0076d
fix(docs): fix typo in sandbox guide (#3628)
mshsheikh Jun 12, 2026
131c3ae
docs: tweak examples and senteneces
seratch Jun 13, 2026
c359c20
docs: update translated pages
seratch Jun 13, 2026
12e268c
chore: improve pr-draft-summary skill trigger
seratch Jun 18, 2026
2884559
fix: suppress handoff whitespace tool-name warnings (#3652)
seratch Jun 18, 2026
a4ba63f
feat: add pre-approval tool input guardrails (#3487)
seratch Jun 18, 2026
7fc489e
feat: add SDK-only custom data for tool outputs (#3486)
seratch Jun 18, 2026
09f0ed4
fix: enforce the documented strict JSON-compatible contract for #3486…
siddiksawani Jun 18, 2026
510b7de
Release 0.17.6 (#3659)
github-actions[bot] Jun 19, 2026
f918c6a
docs: #3461 changes for tool_not_found_behavior option (#3462)
seratch Jun 19, 2026
306d426
docs: changes for #3487 feature addition (#3488)
seratch Jun 19, 2026
869e869
docs: translate pages
seratch Jun 19, 2026
13ef230
fix: #3346 clean up branch-only messages when deleting branches (#3347)
Aphroq Jun 22, 2026
83e8a1b
fix: #3348 make AdvancedSQLiteSession add_items atomic (#3349)
Aphroq Jun 22, 2026
9f93077
fix(run): cancel sibling guardrail tasks when one raises (#3239)
adityasingh2400 Jun 22, 2026
b20cb7f
fix(approvals): skip needs_approval_checker when status resolved in _…
adityasingh2400 Jun 22, 2026
4ebf880
fix: validate ls special permission bits by position (#3420)
a1vazovsky Jun 22, 2026
50c8b74
fix: gate remote-mount edit guidance by mode (#3423)
a1vazovsky Jun 22, 2026
ce4cc62
fix: remove dependency on types-requests (#3509)
rouge8 Jun 22, 2026
7328f79
fix(items): empty list/tuple tool output dropped via all([]) == True …
vidigoat Jun 22, 2026
0bd3d1b
fix(e2b): wake PTY output collection on process exit (#3610)
rohitrastogi Jun 22, 2026
593331a
fix: #3620 avoid stale object-id dedupe in server conversation tracke…
chutch Jun 22, 2026
9168c38
fix: report effective Blaxel timeouts (#3643)
he-yufeng Jun 22, 2026
e605bd2
feat: expose configurable websocket max_size limit (#3645)
anneheartrecord Jun 22, 2026
f115dd6
fix: reduce sandbox sink buffering and spool timeouts (#3642)
2830500285 Jun 22, 2026
3f6324c
docs: fix OpenAI capitalization in auto-generated ref titles (#3646)
atimothee Jun 22, 2026
28d2a6c
feat: add buffered Chat Completions tool-call streaming (#3506)
incoffeemonster Jun 22, 2026
a9b7b7e
fix(realtime): prevent ambiguous multi-agent tool dispatch (#3441)
mavrickdeveloper Jun 22, 2026
7192bc9
docs: add SDK maintainer references and review guidance (#3676)
seratch Jun 23, 2026
2df8adc
fix: add hint to duplicated MCP server tool name error message (#3678)
wustwyh Jun 23, 2026
f706d65
chore: adjust examples-auto-run skill
seratch Jun 23, 2026
16d16ec
chore: update maintainer-review skill to have two phases
seratch Jun 24, 2026
30ff4a5
fix: recursively extract HTTP errors from nested ExceptionGroups (#3556)
mshsheikh Jun 24, 2026
8a0e34c
Release 0.17.7 (#3682)
github-actions[bot] Jun 24, 2026
92137d2
docs: improve hosted MCP tool example
seratch Jun 24, 2026
3321967
chore: adjust maintainer-review skill details
seratch Jun 25, 2026
ab38ee5
fix: propagate realtime session iterator cancellation (#3686)
fallintoplace Jun 25, 2026
8c688b9
fix: redact realtime validation failure logs (#3687)
fallintoplace Jun 25, 2026
81fe6ab
chore: adjust maintainer-review skill details
seratch Jun 25, 2026
97bc991
chore: update PR template
seratch Jun 29, 2026
fea17ef
fix(util): preserve non-dict Mapping values in _to_dump_compatible (#…
anxkhn Jun 29, 2026
7713342
chore: update maintainer-review skill
seratch Jun 30, 2026
655c805
fix(visualization): escape quotes and backslashes in DOT names (#3712)
anxkhn Jul 1, 2026
829e19a
chore(deps): bump astral-sh/setup-uv from 8.1.0 to 8.2.0 (#3714)
dependabot[bot] Jul 2, 2026
ecfa2e0
chore(deps): bump actions/setup-python from 6.2.0 to 6.3.0 (#3715)
dependabot[bot] Jul 2, 2026
8d78731
chore(deps): bump actions/stale from 10.2.0 to 10.3.0 (#3716)
dependabot[bot] Jul 2, 2026
f13a3f7
chore(deps): bump actions/checkout from 6.0.2 to 7.0.0 (#3717)
dependabot[bot] Jul 2, 2026
56921c8
fix(handoffs): enforce strict Pydantic validation when strict_json_sc…
Om-Borse26 Jul 2, 2026
343c06f
fix(sandbox): length-frame exec-stdin writes so file I/O works over a…
imran31415 Jul 2, 2026
2afb6e1
docs: add DProvenanceKit to external tracing processors list (#3726)
Therealdk8890 Jul 2, 2026
fe7d106
docs: update translated pages
seratch Jul 3, 2026
106ecb6
docs: update PR template and codex-change-verification skill
seratch Jul 3, 2026
a898061
docs: make markdown style consistent across the project
seratch Jul 4, 2026
70d01a9
chore: improve error handling in code-change-verification
seratch Jul 4, 2026
ec8fbb8
docs: update translated pages
seratch Jul 4, 2026
8492414
test: improve coverage for stream and sandbox edge cases (#3730)
seratch Jul 4, 2026
e7f835b
chore: update maintainer-review skill
seratch Jul 4, 2026
1643dbe
chore: update runtime-behavior-probe skill to use request_user_input
seratch Jul 4, 2026
3d07ff1
feat: add invalid final output recovery handler (#3736)
seratch Jul 6, 2026
5d4a752
docs: add sandbox examples to examples index (#3731)
saime428 Jul 6, 2026
0ffb9e0
docs: update README.md
seratch Jul 6, 2026
7a828f6
Release 0.17.8 (#3739)
github-actions[bot] Jul 6, 2026
94c1f60
docs: updates for v0.17.8 release (#3737)
seratch Jul 6, 2026
4a7dc08
docs: make hosted_mcp/on_approval.py stabler
seratch Jul 6, 2026
909c5c4
feat: update default realtime model to gpt-realtime-2.1 (#3740)
seratch Jul 7, 2026
b4606c8
fix(visualization): keep fillcolor on handoff nodes by merging style …
comp Jul 7, 2026
4fde807
feat: add Unicode storage option to SQLAlchemySession (#3746)
seratch Jul 7, 2026
668fabd
Release 0.18.0 (#3742)
github-actions[bot] Jul 7, 2026
078a28f
docs: updates for v0.18.0 (#3741)
seratch Jul 7, 2026
b3f8d8c
fix: close Chat Completions streams on early exit (#3689)
fallintoplace Jul 7, 2026
b10a7e9
docs(realtime): fix RealtimeRunner context docstring (#3748)
anxkhn Jul 7, 2026
3063306
test(items): document refusal None invariant (#3751)
seratch Jul 7, 2026
163caa3
docs: update README
seratch Jul 7, 2026
60d3f95
fix: preserve nested tool state during restoration (#3753)
seratch Jul 8, 2026
158b2f4
docs: clarify agent tool state options (#3754)
william-xue Jul 8, 2026
5807751
fix(sessions): handle list content in AdvancedSQLiteSession browsing …
anxkhn Jul 9, 2026
1b0c7c2
fix(models): accumulate streamed logprobs in place to avoid O(n^2) co…
anxkhn Jul 9, 2026
532acdf
fix: send logprobs=True when top_logprobs is set on Chat Completions …
winklemad Jul 9, 2026
6bb69bc
docs: update readme
seratch Jul 9, 2026
70c447e
fix(realtime): make session cleanup deterministic (#3767)
seratch Jul 9, 2026
8724b1b
fix: support cache-write usage across OpenAI Python versions (#3773)
seratch Jul 9, 2026
1332083
feat: add GPT-5.6 model defaults and migrate examples (#3774)
seratch Jul 9, 2026
574e2f7
docs: update translated pages
seratch Jul 9, 2026
28026bc
docs: stabilize tool guardrail and web search examples
seratch Jul 9, 2026
1760f73
Release 0.18.1 (#3775)
github-actions[bot] Jul 9, 2026
89653d2
fix(sandbox): own Daytona PTY worker tasks (#3778)
seratch Jul 10, 2026
152baf1
fix(realtime): enqueue callback errors synchronously (#3777)
seratch Jul 10, 2026
4e06694
fix(realtime): use monotonic playback timing (#3776)
seratch Jul 10, 2026
32bf99d
fix(sandbox): own Docker deferred cleanup tasks (#3779)
seratch Jul 10, 2026
dd0300b
fix(sandbox): own Unix PTY fd close tasks (#3780)
seratch Jul 10, 2026
2bd0397
chore: exempt OpenAI package from dependency cooldown (#3792)
seratch Jul 10, 2026
0354f48
feat: add hosted multi-agent beta support (#3788)
seratch Jul 10, 2026
df2ddd4
feat: support GPT-5.6 request controls (#3794)
seratch Jul 10, 2026
322a333
fix: serialize model-backed rollout interruptions as dicts (#3790)
otiscuilei Jul 10, 2026
fdca3ab
chore(lint): enable RUF006 for runtime source
seratch Jul 10, 2026
77f7f9a
refactor(sandbox): share core PTY output collection (#3796)
seratch Jul 10, 2026
4c5d630
refactor(sandbox): share extension PTY output collection (#3797)
seratch Jul 10, 2026
bc0dbb3
refactor(sandbox): share E2B rclone setup (#3798)
seratch Jul 10, 2026
e354126
refactor(sandbox): share Runloop rclone setup (#3799)
seratch Jul 10, 2026
eb54a61
refactor: share retry error metadata extraction (#3800)
seratch Jul 10, 2026
93317a8
refactor: share retry-after parsing (#3801)
seratch Jul 10, 2026
fb8fb10
docs: update AGENTS.md for git operations
seratch Jul 10, 2026
aeed7bb
chore: enable G004 logging lint rule (#3802)
seratch Jul 10, 2026
23c5276
chore: enable RUF012 for runtime source (#3803)
seratch Jul 10, 2026
0a0b7be
refactor: remove unused Responses include validator
seratch Jul 10, 2026
0fce2cb
chore: remove unused noqa directives (#3804)
seratch Jul 10, 2026
75b928e
chore: enable RUF100 for runtime source
seratch Jul 11, 2026
e1f7c12
fix: make conditional tools and web search examples deterministic
seratch Jul 11, 2026
6cf3600
fix(litellm): surface content-filter refusals instead of an empty tur…
seanturner83 Jul 11, 2026
41e79f1
Release 0.18.2 (#3805)
github-actions[bot] Jul 11, 2026
bcce208
docs: updates for hosted multi-agent support (#3789)
seratch Jul 11, 2026
5a9d221
docs: stabilize two examples
seratch Jul 11, 2026
0885933
docs: update translated pages
seratch Jul 11, 2026
beb3c51
fix(models): raise UserError for conflicting provider args instead of…
Dhruva-Das Jul 12, 2026
088075f
chore: enable flake8-async for runtime source (#3813)
seratch Jul 12, 2026
b24d5dd
fix(handoffs): preserve user messages containing history wrappers (#3…
russeell Jul 12, 2026
8221e42
feat(realtime): track response usage in session context (#3812)
seratch Jul 12, 2026
c3986d6
fix(memory): serialize OpenAI conversation session initialization (#3…
russeell Jul 13, 2026
68fadc7
fix: AdvancedSQLiteSession clear_session and pop_item metadata leaks …
okaditya84 Jul 13, 2026
4d96778
chore: remove hoooks for now
seratch Jul 13, 2026
df20e83
fix: parse Google docstrings missing the blank line before a section …
sohumt123 Jul 14, 2026
7369b73
feat: make task and turn tracing spans configurable (#3834)
seratch Jul 14, 2026
8ce548e
fix: bound $ref expansion in strict JSON schema conversion (#3838)
ioleksiuk Jul 15, 2026
585053b
fix(computer): isolate provider instances across concurrent runs (#3843)
russeell Jul 15, 2026
e29b023
fix(sandbox): avoid redundant E2B workspace root creation (#3845)
seratch Jul 15, 2026
697a46c
fix: redact non-tool trace error details (#3848)
seratch Jul 16, 2026
5e8d067
docs: make UserContext example runnable in Agents documentation (#3851)
MuhammadHamidRaza Jul 16, 2026
5313a82
fix: preserve streamed session input across model retries (#3857)
seratch Jul 16, 2026
d02972e
fix: prevent stale prepared-item identity reuse (#3858)
seratch Jul 16, 2026
3e788a4
Release 0.18.3 (#3859)
github-actions[bot] Jul 17, 2026
fff18a0
docs: document compact tracing hierarchy (#3839)
william-xue Jul 17, 2026
485bd96
docs: update translated pages
seratch Jul 17, 2026
95df2c9
docs: update pages
seratch Jul 17, 2026
965335a
feat: add Programmatic Tool Calling support (#3833)
seratch Jul 17, 2026
b2e9246
fix: parse Google docstrings whose Args: follows a section body (#3862)
oldrobotdev Jul 17, 2026
606fbd0
docs: clarify sandbox support on Windows (#3866)
seratch Jul 17, 2026
efd63ec
fix: fail closed on invalid callable approval arguments (#3867)
seratch Jul 17, 2026
825f113
docs: adjust code snippets (#3869)
AAliKKhan Jul 17, 2026
d003f21
chore: update e2b versions (#3871)
matthewlouisbrockman Jul 17, 2026
15bac19
fix(handoffs): partition nested history ownership (#3823)
seratch Jul 17, 2026
65886fa
fix(blaxel): shell-quote interpolated FUSE mount options (#3873)
ioleksiuk Jul 17, 2026
fa1001d
fix: recognize typed easy input messages in Chat Completions (#3877)
seratch Jul 19, 2026
1b5f59f
fix: summarize programmatic transcripts during nested handoffs (#3878)
seratch Jul 19, 2026
7b84479
fix: remove programmatic transcripts from handoff tool filtering (#3879)
seratch Jul 19, 2026
173eca4
fix: improve sandbox example runtime validation (#3880)
seratch Jul 19, 2026
bc4c5f5
docs: remove unused Runner import in tracing docs (#3881)
AAliKKhan Jul 19, 2026
2fa4635
docs: fix runnable Python examples (#3885)
seratch Jul 19, 2026
e78bb09
docs: fix missing imports in dynamic instructions example (#3895)
Syed-Umer-Ali Jul 20, 2026
3384027
fix(visualization): escape multiline DOT names (#3898)
hsusul Jul 20, 2026
588c6e3
fix: classify lazy skill read probes correctly (#3893)
seratch Jul 20, 2026
2171c77
docs: update review policies
seratch Jul 20, 2026
394d4dc
docs: fix conversation example imports (#3903)
william-xue Jul 21, 2026
5361129
Merge remote-tracking branch 'upstream/main' into chore/force-sync-up…
ashsolei Jul 21, 2026
29ba6a4
chore: re-apply iAiFy overlay after upstream force-sync
ashsolei Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions .agents/references/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SDK Maintainer References

This directory captures long-lived implementation contracts of the OpenAI Agents Python SDK that are not replaceable by OpenAI API or platform facts from the Developer Docs MCP. The repo's `docs/` remain an SDK-specific behavioral contract; these references distill the ownership, compatibility, ordering, and failure semantics that maintainers need to preserve that contract.

## Usage

Read the reference map before changing or reviewing an affected runtime boundary, then open only the files relevant to that boundary. During issue and PR review, treat this directory as read-only background: use it to identify expected invariants, adjacent surfaces, and regression risks, but verify the current claim against the remote issue or PR, current code, tests, docs, release boundary, and focused runtime evidence. Do not edit references as a side effect of a review or treat them as proof of current issue status, PR behavior, or repository readiness.

When implementation or dedicated repository-maintenance work establishes a reusable invariant that remains valid beyond one issue or PR, update the narrowest owning reference separately. Preserve the generalized contract, not the case history or decision outcome that revealed it.

## Inclusion Criteria

Add or retain a reference when the knowledge is SDK-specific, stable across multiple releases, easy to violate from one local code path, and expensive to reconstruct from source, tests, and repo docs during every review. Treat `docs/` as the SDK's user-facing behavioral contract; use these references to preserve the implementation constraints behind that contract. Prefer invariants and ownership rules over summaries of individual issues, PRs, or recent fixes.

Do not store current issue or PR status, generic maintainer-review workflow, release notes, OpenAI API or platform behavior available through `$openai-knowledge`, or one-off implementation details in this directory. Put review methodology under `.agents/skills/`, released migration notes in `docs/release.md`, and API or platform facts behind `$openai-knowledge`.

## Reference Map

| Reference | Read before changing or reviewing |
|---|---|
| [Agent definition and run context](agent-definition-and-run-context.md) | Agent fields, cloning, dynamic instructions, enabled tools or handoffs, context wrappers, usage, or public agent identity |
| [Runner lifecycle](runner-lifecycle.md) | Turn accounting, guardrails, handoffs, interruptions, cancellation, or streaming parity |
| [Run item lifecycle](run-item-lifecycle.md) | Model output processing, new item types, stream events, replay conversion, session persistence, or RunState serialization |
| [Function and output schema](function-and-output-schema.md) | Function-tool signatures and metadata, strict JSON schema conversion, or structured output types |
| [Conversation state ownership](conversation-state-ownership.md) | Sessions versus server-managed continuation, input deltas, retries, compaction, or conversation resume |
| [Session persistence](session-persistence.md) | Session input callbacks, per-turn saves, retry rewind, atomicity, or compaction replacement |
| [RunState schema and resume boundary](runstate-schema.md) | Serialized state, schema versions, approvals, agent identity, or durable resume data |
| [Tool identity and routing](tool-identity.md) | Tool names, namespaces, lookup, approvals, MCP naming, handoffs, or call IDs |
| [Tool execution lifecycle](tool-execution-lifecycle.md) | Function-tool planning, approvals, guardrails, concurrency, cancellation, timeouts, or failure conversion |
| [Local MCP server lifecycle](local-mcp-server-lifecycle.md) | Local MCP connection ownership, manager state, request serialization, caching, filtering, retries, or cleanup |
| [Model and provider boundaries](model-provider-boundaries.md) | Model resolution, provider adapters, feature capability, request conversion, terminal events, or retries |
| [Tracing lifecycle](tracing-lifecycle.md) | Trace and span context, processors, export, flush, shutdown, resume, or sensitive data |
| [Realtime session lifecycle](realtime-session-lifecycle.md) | Realtime listeners, connections, background tasks, handoffs, event iteration, or cleanup |
| [Realtime tracing architecture](realtime-tracing.md) | Realtime API server traces versus Agents SDK client traces |
| [Voice pipeline lifecycle](voice-pipeline-lifecycle.md) | VoicePipeline STT/workflow/TTS ownership, event and audio ordering, stream cleanup, PCM framing, or tracing |
| [Sandbox runtime boundary](sandbox-runtime-boundary.md) | Sandbox session ownership, preparation, resume state, manifests, materialization, or cleanup |

## Maintenance Rules

Keep each rule in the narrowest reference that owns it. Cross-link instead of copying detailed rules between files. Describe current architecture and compatibility boundaries, not the chronology of how a bug was found. Use source paths and durable public contracts as anchors, and remove or rewrite guidance when ownership moves.
57 changes: 57 additions & 0 deletions .agents/references/agent-definition-and-run-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Agent Definition and Run Context

Use this reference for changes to public `Agent` fields, cloning, dynamic instructions, enabled tools or handoffs, output schemas, `RunContextWrapper`, `ToolContext`, usage aggregation, or the distinction between a public agent and an internal prepared clone.

## Public Definition and Cloning

- Exported `Agent` and `AgentBase` dataclass field order is a positional compatibility boundary. Append optional fields where possible and test old positional construction when the order changes.
- `Agent.__post_init__()` is the eager boundary for invalid field categories such as names, tools, handoffs, hooks, model settings, output types, and tool-use behavior. Dynamic callbacks are validated when invoked because their result depends on the current run.
- `Agent.clone()` uses `dataclasses.replace()` and is shallow. Mutable fields and contained tool, handoff, hook, and provider objects remain shared unless the caller explicitly supplies replacements.
- When `clone(model=...)` replaces a model whose settings still equal the old model's implicit defaults, recompute the new model's implicit defaults. Preserve explicitly customized `model_settings` instead of silently resetting them.

## Per-Turn Resolution

- Resolve dynamic instructions with the current context and public agent for each model turn. Enforce the documented two-argument callable shape and await async results.
- Evaluate callable `FunctionTool.is_enabled` and `Handoff.is_enabled` against the current run context. Do not cache a prior run's enabled set on the reusable agent.
- Use one resolved tool and handoff view for model exposure, reserved-name and collision checks, local dispatch, tracing, and Realtime session updates. Re-resolving independently at those surfaces can expose one set and execute another.
- An internal prepared agent may add bound tools, instructions, or sampling settings, but hooks, `ToolContext.agent`, handoff callbacks, and public results should identify the public agent unless an internal identity is explicitly part of the contract.
- The effective output schema belongs to the agent and model call that produced the candidate output. A handoff can change the final output type, so do not assume the starting agent's schema when parsing or typing the final result.

## Context Ownership

- Every agent, tool, handoff, guardrail, and lifecycle hook in one run must agree on the same application context type. The context object is local runtime state and is never added to model input automatically.
- A normal `ToolContext.from_agent_context()` shares the underlying application object, usage accumulator, and approval mapping with its parent while adding call-scoped fields such as call ID, namespace, arguments, and conversation history.
- Nested `Agent.as_tool()` execution has a separate run loop, approval scope, and resumable tool state. On the normal function-tool path it still shares the application object and usage accumulator, while `tool_input` belongs to the nested wrapper and must not overwrite the parent's scoped value.
- Sharing the application object is not the same as sharing every wrapper field. Add explicit application-level isolation when nested mutation is unsafe, and do not reuse parent approval decisions for nested calls merely because the tool name or call ID looks similar.
- Context serialization is a separate durability decision. Read [RunState schema and resume boundary](runstate-schema.md) before persisting custom context objects, approvals, usage, or nested tool input.

## Usage Accounting

- `RunContextWrapper.usage` is the run-wide mutable accumulator. Add each model response exactly once across streaming, non-streaming, retries, nested runs, handoffs, and resume paths.
- Preserve authoritative `request_usage_entries` when combining usage. Do not synthesize a second per-request entry from aggregate totals when the provider or retry layer already supplied request-level records.
- Retry accounting may include failed attempts with no token totals. Keep request count, aggregate tokens, request-level entries, and trace span usage internally consistent without inventing provider token data.
- Streamed usage remains incomplete until terminal chunks and the stream driver finish. Do not finalize billing, result summaries, or usage-bearing spans from the last visible text delta alone.

## Review Checklist

1. Test direct construction and clone behavior without mutating shared caller-owned objects.
2. Resolve dynamic instructions, tools, and handoffs through the same public agent and current context used for dispatch.
3. Verify handoff and internal prepared-agent paths expose the intended public identity and effective output schema.
4. Test nested agent tools for shared application state and isolated scoped metadata.
5. Compare aggregate and per-request usage after streaming, retries, handoffs, interruption resume, and nested runs.

## Sources

- `docs/agents.md`
- `docs/context.md`
- `docs/results.md`
- `src/agents/agent.py`
- `src/agents/run_context.py`
- `src/agents/tool_context.py`
- `src/agents/usage.py`
- `src/agents/run_internal/turn_preparation.py`
- `src/agents/run_internal/run_loop.py`
- `tests/test_agent_config.py`
- `tests/test_agent_clone_shallow_copy.py`
- `tests/test_agent_as_tool.py`
- `tests/test_usage.py`
67 changes: 67 additions & 0 deletions .agents/references/conversation-state-ownership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Conversation State Ownership

Use this reference for changes involving multi-turn input, sessions, `conversation_id`, `previous_response_id`, `auto_previous_response_id`, compaction, retries, `call_model_input_filter`, or `RunState` resume.

## Choose One Conversation Strategy

The state owner determines what the next model request should contain.

| Strategy | State owner | Next-turn input |
|---|---|---|
| Explicit replay with `result.to_input_list()` | Application | Replay-ready history plus the new turn |
| SDK session | Application storage plus the SDK | The same session plus the new turn |
| `conversation_id` | OpenAI Conversations API | The same conversation ID plus only the new turn |
| `previous_response_id` or `auto_previous_response_id` | OpenAI Responses API | The previous response ID plus only the new turn |
| `RunState` resume | Serialized Agents SDK run | Resume the same interrupted run; this is not a new conversation strategy |

In normal use, select one conversation strategy. Mixing client-managed replay or sessions with server-managed continuation can duplicate context unless the implementation explicitly reconciles both owners. Read [Session persistence](session-persistence.md) for the client-managed storage contract.

## Server-Managed Continuation

- `OpenAIServerConversationTracker` in `src/agents/run_internal/oai_conversation.py` owns delta calculation for `conversation_id`, `previous_response_id`, and `auto_previous_response_id`.
- Send only items that the server has not already acknowledged. Object identity is useful only within one process; resume and retry paths also require stable item IDs, tool call IDs, and content fingerprints.
- Update `previous_response_id` from the most recent response that actually has an ID. Do not erase a valid chain because an adjacent provider response lacks one.
- Session persistence cannot be combined with server-managed continuation. `validate_session_conversation_settings()` rejects a session with `conversation_id`, `previous_response_id`, or `auto_previous_response_id`; do not add a second history writer without defining reconciliation and dedupe semantics.
- Treat `conversation_id` and `previous_response_id` / `auto_previous_response_id` chaining as mutually exclusive state owners.

## Filters, Retries, and Resume

- `call_model_input_filter` runs on the prepared model payload. With server-managed continuation, that payload may already be a new-turn delta rather than full history.
- The filter must return `ModelInputData` with list input. Mark exactly the returned list as sent immediately before the request so nested preparation cannot add unsent items, rewind that tracking before retrying a failed request, and preserve it after success.
- Keep streaming and non-streaming tracker updates aligned. Both paths must preserve the same delta, retry, and response-ID semantics.
- Stateful retries require replay-safety evidence. Do not blindly resend a request that may already have advanced server state.
- `RunState` persists conversation identifiers and reconstructs tracker knowledge for resumed runs. Resume must not replay acknowledged input, lose unsent tool outputs, or increment the turn count without a model call.
- Conversation continuation carries context into a new turn. `RunState` resume continues a paused run. Do not substitute one mechanism for the other.

## Compaction

- `compaction_mode="previous_response_id"` depends on a usable stored response chain.
- `compaction_mode="input"` rebuilds from client-held items and is the fallback when the server chain is unavailable or `store=False` prevents later response lookup.
- Compaction must preserve the chosen state owner. Do not compact from local history and then also replay that history through server-managed continuation.

## Handoffs

- Server-managed conversations send deltas, so handoff input filters are not supported. `Handoff.input_filter` and `RunConfig.handoff_input_filter` should raise instead of rewriting a history the server already owns.
- `nest_handoff_history` is a client-history transformation. When server-managed continuation is active, disable it with a warning and continue with delta-only input.
- Keep generated items and session items distinct during handoff processing. The next model input may be filtered, but session history needs the full unfiltered item sequence when client-managed sessions are active.

## Review Checklist

1. Name the state owner before changing request construction.
2. Specify whether the model receives full history or a delta on every affected path.
3. Verify first turn, follow-up turn, retry, interruption, serialized resume, and streaming behavior.
4. Test tool calls and outputs separately; call IDs and output fingerprints have different dedupe roles.
5. Confirm that filtering, compaction, and session persistence do not introduce a second source of truth.

## Sources

- [OpenAI conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state)
- [OpenAI running agents guide](https://developers.openai.com/api/docs/guides/agents/running-agents#choose-one-conversation-strategy)
- `src/agents/run_internal/oai_conversation.py`
- `src/agents/run_internal/run_loop.py`
- `src/agents/run_internal/session_persistence.py`
- `src/agents/run_state.py`
- `docs/running_agents.md`
- `docs/sessions/index.md`

Recheck the official API reference with `$openai-knowledge` before changing server-managed continuation behavior.
50 changes: 50 additions & 0 deletions .agents/references/function-and-output-schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Function and Output Schema

Use this reference for changes to function-tool signature inspection, parameter metadata, strict JSON schema conversion, tool argument reconstruction, or structured agent output schemas.

Schema behavior is a compatibility boundary shared by Python callables, Pydantic, model providers, and runtime validation. Keep schema generation and invocation aligned rather than fixing one representation in isolation.

## Function Schema Ownership

- Explicit decorator arguments for a function name or description override values inferred from the callable and its docstring.
- Parameter descriptions from parsed docstrings take precedence over description strings carried by `Annotated`. Preserve `Field` constraints, aliases, and defaults when merging `Annotated` metadata.
- A run context parameter is special only in the first parameter position. Exclude it from the model-visible schema while still supplying it during invocation; do not silently treat later context-typed parameters as injected context.
- Keep the inspected signature, generated Pydantic model, JSON schema, and `to_call_args()` reconstruction consistent. Cover positional-only parameters, keyword-only parameters, `*args`, and `**kwargs` when changing this path.
- Reject unsupported callable shapes or invalid schemas when the tool is constructed so failures do not depend on whether a particular model later selects the tool.

## Strict JSON Schema Conversion

- Strict conversion closes object schemas with `additionalProperties: false` and marks their declared properties required. Reject an explicit `additionalProperties: true` instead of silently changing its meaning.
- Preserve the meaning of unions, intersections, definitions, and references. Normalize `oneOf` where required, process `allOf`, retain chained references, and merge a referenced schema with sibling keys without discarding the siblings.
- Remove defaults that only encode Python `None`; a nullable type must remain represented by its type schema rather than by an unsupported default.
- `ensure_strict_json_schema()` may mutate a non-empty input dictionary. Copy caller-owned schemas at public boundaries before conversion. Empty-schema conversion must return a fresh object rather than shared mutable state.
- Keep strictness explicit. If a tool or output schema opts out of strict mode, preserve that choice through provider conversion instead of partially applying strict normalization.

## Structured Output Schemas

- Plain `str` output and no declared output type use the plain-text path. Pydantic models and dictionary-shaped outputs expose their object schema directly; other Python types use the SDK's wrapper object with the `response` key.
- Keep generated output names stable and descriptive for nested generics, unions, and `Literal` types. These names are observable in provider requests and diagnostics.
- Parse model output as JSON and validate it through the output type adapter. Convert JSON or validation failures to the SDK's model-behavior error boundary rather than leaking provider- or Pydantic-specific exceptions.
- Streaming and non-streaming adapters must carry the same schema, strictness flag, wrapper behavior, and validation result.

## Review Checklist

1. Test precedence among explicit metadata, docstrings, `Annotated`, and `Field` values.
2. Test invocation reconstruction for positional-only, keyword-only, variadic, and context-bearing callables.
3. Test nested objects, unions, intersections, sibling and chained references, nullable fields, and caller-owned schema mutation.
4. Test plain text, direct object output, wrapped scalar or generic output, invalid JSON, and validation failure.
5. Verify every provider adapter receives the same normalized schema and strictness decision.

## Sources

- `src/agents/function_schema.py`
- `src/agents/strict_schema.py`
- `src/agents/tool.py`
- `src/agents/agent_output.py`
- `src/agents/models/`
- `tests/test_function_schema.py`
- `tests/test_function_tool_decorator.py`
- `tests/test_strict_schema.py`
- `tests/test_strict_schema_oneof.py`
- `tests/test_output_tool.py`
- `tests/models/`
Loading
Loading