-
Notifications
You must be signed in to change notification settings - Fork 608
Description
Problem Statement
The current steering system (steer_before_tool() and steer_after_model()) was designed for unidirectional agent execution flows. With the introduction of bidirectional streaming agents (Python 3.12+), there is no clear path for how steering handlers should intercept and guide agent behavior in a bidirectional context.
As noted in PR #1429, "steering on bidi agents is currently uncertain" and this needs to be resolved before the steering feature can exit experimental status. The existing implementation focuses exclusively on unidirectional agents, leaving bidirectional support as undefined future work requiring architectural decisions.
Proposed Solution
Design and implement steering support for bidirectional agents that addresses:
-
Event Interception Points: Define where in the bidirectional streaming flow steering handlers can intercept events (e.g., during streaming chunks, at message boundaries, or at turn completion)
-
Action Semantics: Clarify how
Proceed,Guide, andInterruptactions behave in a streaming context:- Can a
Guideaction be issued mid-stream to redirect the model? - How does
Interruptinteract with an active bidirectional stream? - Should there be new action types specific to streaming scenarios?
- Can a
-
Handler Interface: Extend or adapt the
SteeringHandlerprotocol for bidi agents:async def steer_bidi_stream( self, agent: Agent, stream_event: StreamEvent, **kwargs ) -> BiDiSteeringAction
Proposed Solution
No response
Use Case
Steer bidi agents in the same manner as uni agents
Alternatives Solutions
No response
Additional Context
No response