Runner is the main entry point for session-managed execution. It wires an agent, a session service, and the invocation context together.
Runner automatically:
- Fetches or creates the session
- Persists the user’s message as a
USER_MESSAGEevent - Builds an
Contextwith the session reference - Persists every agent event to the session via
append_event() - Applies
EventActions.state_deltato the session state
LlmAgent rebuilds LangChain message history from session.events on each turn, so the LLM sees the full conversation context.