---
type: email
from: Kazuhiro Sera <notifications@github.com>
subject: [openai/openai-agents-python] feat: expose immutable agent tool

 invocation metadata on run results (ref #2575) (PR #2576)
received: 2026-03-05 11:16:48
priority: high
status: awaiting_approval
---

## Email Content
This pull request is a follow-up of #2575 and it adds a narrow public accessor for nested `Agent.as_tool()` runs so custom output extractors can read tool invocation metadata without receiving the live `ToolContext`. It introduces an immutable `AgentToolInvocation` value on `RunResult` and `RunResultStreaming`, returns `None` for ordinary top-level runs, and avoids adding any new `RunState` persistence or schema changes.



The change also updates the public exports and agent-as-tool docs to describe the new accessor, and adds regression coverage for plain runs plus nested non-streaming and streaming extractor paths.

You can view, comment on, or merge this pull request online at:



  https://github.com/openai/openai-agents-python/pull/2576



-- Commit Summary --



  * feat: expose immu...

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Flag for review
