Skip to content

Conversation

@seratch
Copy link
Member

This pull request adds a new feature equivalent to openai/openai-agents-js#749

@seratchseratch added this to the 0.6.x milestone Dec 11, 2025
@seratchseratch added enhancement New feature or request feature:core labels Dec 11, 2025
seratch added a commit that referenced this pull request Dec 11, 2025
@ihower
Copy link
Contributor

@seratch I came up with an alternative API design and sent PR #2176 for your consideration.

event: StreamEvent
"""The streaming event from the nested agent run."""

agent_name: str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of agent_name, why not pass the Agent object?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is true. i will revisit the properties in this object

Comment on lines +463 to +465
maybe_result=on_stream(payload)
ifinspect.isawaitable(maybe_result):
awaitmaybe_result
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be kinda bad since on_stream will block you from going to the next event. fine for now, but we should consider a queue based pattern where we write to a queue from here and the consumer reads from the queue, and we aren't blocking

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call; actually i made these executions async in the TS SDK. so will make this more efficient and consistent.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or requestfeature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@seratch@ihower@rm-openai