Module agent_session

Module agent_session 

Source
Expand description

AgentSession — intercepting wrapper around SessionHandle.

Replaces ADK Python’s LiveRequestQueue. Instead of adding a second queue on top of SessionHandle’s existing mpsc channel, this wraps a SessionWriter and intercepts sends for: (1) input fan-out to streaming tools, (2) middleware hooks, (3) state tracking.

Data flow: App → AgentSession → SessionWriter → WebSocket ↘ broadcast to input-streaming tools

ONE queue, ONE consumer task, zero-copy on the hot path.

Structs§

AgentSession
Intercepting wrapper around a SessionWriter.
NoOpSessionWriter
A SessionWriter that discards all writes. Used for isolated agent execution (AgentTool) where no real WebSocket exists.

Enums§

InputEvent
Input events broadcast to input-streaming tools. Distinct from SessionCommand — this is observation-only.