getEvents
suspend fun getEvents(currentInvocation: Boolean = false, currentBranch: Boolean = false): List<Event>
Returns the current session's events from the in-memory Session.events, which SessionService.appendEvent keeps in sync. Reads memory rather than re-fetching from the session service each step, matching Python, Java, and Go ADK.
Return
A list of events from the current session.
Parameters
currentInvocation
Whether to filter the events by the current invocation.
currentBranch
Whether to filter the events by the current branch.