Example 18: Replying to approval events with session.respond (v2)
Conversational agents pause their turn when a tool is gated with
ToolApprovalConfig.REQUIRES_APPROVAL. The paused turn surfaces a
SessionEvent on listen() with
event.type == SessionEventType.APPROVAL_REQUEST. The session helpers
let you reply on the same session without assembling raw payloads.What this demonstrates:
session.respond(event, approved=True) — dispatches on event type