# Uses of Class
com.google.adk.sessions.Session

Packages that use Session
Package
Description
com.google.adk.agents
com.google.adk.memory
com.google.adk.runner
com.google.adk.sessions
com.google.adk.summarizer
com.google.adk.web.controller

- ## Uses of Session in com.google.adk.agents

  Methods in com.google.adk.agents that return Session
  Modifier and Type
  Method
  Description
  `Session`
  InvocationContext.`session()`
  Returns the session associated with this invocation.
  Methods in com.google.adk.agents with parameters of type Session
  Modifier and Type
  Method
  Description
  `InvocationContext.Builder`
  InvocationContext.Builder.`session(Session session)`
  Sets the session associated with this invocation.

- ## Uses of Session in com.google.adk.memory

  Methods in com.google.adk.memory with parameters of type Session
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Completable`
  BaseMemoryService.`addSessionToMemory(Session session)`
  Adds a session to the memory service.
  `io.reactivex.rxjava3.core.Completable`
  FirestoreMemoryService.`addSessionToMemory(Session session)`
  Adds a session to memory.
  `io.reactivex.rxjava3.core.Completable`
  InMemoryMemoryService.`addSessionToMemory(Session session)`

- ## Uses of Session in com.google.adk.runner

  Methods in com.google.adk.runner with parameters of type Session
  Modifier and Type
  Method
  Description
  `protected io.reactivex.rxjava3.core.Flowable<Event>`
  Runner.`runAsyncImpl(Session session, com.google.genai.types.Content newMessage, RunConfig runConfig, @Nullable Map<String,Object> stateDelta)`
  Runs the agent asynchronously using a provided Session object.
  `io.reactivex.rxjava3.core.Flowable<Event>`
  Runner.`runLive(Session session, LiveRequestQueue liveRequestQueue, RunConfig runConfig)`
  `protected io.reactivex.rxjava3.core.Flowable<Event>`
  Runner.`runLiveImpl(Session session, @Nullable LiveRequestQueue liveRequestQueue, RunConfig runConfig)`
  Runs the agent in live mode, appending generated events to the session.

- ## Uses of Session in com.google.adk.sessions

  Methods in com.google.adk.sessions that return Session
  Modifier and Type
  Method
  Description
  `Session`
  Session.Builder.`build()`
  `static Session`
  Session.`fromJson(String json)`
  Methods in com.google.adk.sessions that return types with arguments of type Session
  Modifier and Type
  Method
  Description
  `default io.reactivex.rxjava3.core.Single<Session>`
  BaseSessionService.`createSession(SessionKey sessionKey)`
  Creates a new session with the specified application name and user ID, using a default state (null) and allowing the service to generate a unique session ID.
  `default io.reactivex.rxjava3.core.Single<Session>`
  BaseSessionService.`createSession(SessionKey sessionKey, @Nullable Map<String,Object> state)`
  Creates a new session with the specified parameters.
  `default io.reactivex.rxjava3.core.Single<Session>`
  BaseSessionService.`createSession(String appName, String userId)`
  Creates a new session with the specified application name and user ID, using a default state (null) and allowing the service to generate a unique session ID.
  `default io.reactivex.rxjava3.core.Single<Session>`
  BaseSessionService.`createSession(String appName, String userId, @Nullable Map<String,Object> state, @Nullable String sessionId)`
  Creates a new session with the specified parameters.
  `io.reactivex.rxjava3.core.Single<Session>`
  BaseSessionService.`createSession(String appName, String userId, @Nullable ConcurrentMap<String,Object> state, @Nullable String sessionId)`
  Deprecated.
  Use `BaseSessionService.createSession(String, String, Map, String)` instead.
  `io.reactivex.rxjava3.core.Single<Session>`
  FirestoreSessionService.`createSession(String appName, String userId, ConcurrentMap<String,Object> state, String sessionId)`
  Creates a new session in Firestore.
  `io.reactivex.rxjava3.core.Single<Session>`
  FirestoreSessionService.`createSession(String appName, String userId, Map<String,Object> state, String sessionId)`
  Creates a new session in Firestore.
  `io.reactivex.rxjava3.core.Single<Session>`
  InMemorySessionService.`createSession(String appName, String userId, @Nullable Map<String,Object> state, @Nullable String sessionId)`
  `io.reactivex.rxjava3.core.Single<Session>`
  InMemorySessionService.`createSession(String appName, String userId, @Nullable ConcurrentMap<String,Object> state, @Nullable String sessionId)`
  `io.reactivex.rxjava3.core.Single<Session>`
  VertexAiSessionService.`createSession(String appName, String userId, @Nullable Map<String,Object> state, @Nullable String sessionId)`
  `io.reactivex.rxjava3.core.Single<Session>`
  VertexAiSessionService.`createSession(String appName, String userId, @Nullable ConcurrentMap<String,Object> state, @Nullable String sessionId)`
  `default io.reactivex.rxjava3.core.Maybe<Session>`
  BaseSessionService.`getSession(SessionKey sessionKey, @Nullable GetSessionConfig config)`
  Retrieves a specific session, optionally filtering the events included.
  `io.reactivex.rxjava3.core.Maybe<Session>`
  BaseSessionService.`getSession(String appName, String userId, String sessionId, Optional<GetSessionConfig> config)`
  Retrieves a specific session, optionally filtering the events included.
  `io.reactivex.rxjava3.core.Maybe<Session>`
  FirestoreSessionService.`getSession(String appName, String userId, String sessionId, Optional<GetSessionConfig> configOpt)`
  Retrieves a session by appName, userId, and sessionId from Firestore.
  `io.reactivex.rxjava3.core.Maybe<Session>`
  InMemorySessionService.`getSession(String appName, String userId, String sessionId, Optional<GetSessionConfig> configOpt)`
  `io.reactivex.rxjava3.core.Maybe<Session>`
  VertexAiSessionService.`getSession(String appName, String userId, String sessionId, Optional<GetSessionConfig> config)`
  `abstract com.google.common.collect.ImmutableList<Session>`
  ListSessionsResponse.`sessions()`
  Methods in com.google.adk.sessions with parameters of type Session
  Modifier and Type
  Method
  Description
  `default io.reactivex.rxjava3.core.Single<Event>`
  BaseSessionService.`appendEvent(Session session, Event event)`
  Appends an event to an in-memory session object and updates the session's state based on the event's state delta, if applicable.
  `io.reactivex.rxjava3.core.Single<Event>`
  FirestoreSessionService.`appendEvent(Session session, Event event)`
  Appends an event to a session, updating the session state and persisting to Firestore.
  `io.reactivex.rxjava3.core.Single<Event>`
  InMemorySessionService.`appendEvent(Session session, Event event)`
  `io.reactivex.rxjava3.core.Single<Event>`
  VertexAiSessionService.`appendEvent(Session session, Event event)`
  `default io.reactivex.rxjava3.core.Completable`
  BaseSessionService.`closeSession(Session session)`
  Closes a session.
  Method parameters in com.google.adk.sessions with type arguments of type Session
  Modifier and Type
  Method
  Description
  `abstract ListSessionsResponse.Builder`
  ListSessionsResponse.Builder.`sessions(List<Session> sessions)`

- ## Uses of Session in com.google.adk.summarizer

  Methods in com.google.adk.summarizer with parameters of type Session
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Completable`
  EventCompactor.`compact(Session session, BaseSessionService sessionService)`
  Compacts events in the given session.
  `io.reactivex.rxjava3.core.Completable`
  SlidingWindowEventCompactor.`compact(Session session, BaseSessionService sessionService)`
  Runs compaction for SlidingWindowCompactor.
  `io.reactivex.rxjava3.core.Completable`
  TailRetentionEventCompactor.`compact(Session session, BaseSessionService sessionService)`

- ## Uses of Session in com.google.adk.web.controller

  Methods in com.google.adk.web.controller that return Session
  Modifier and Type
  Method
  Description
  `Session`
  SessionController.`createSession(String appName, String userId, SessionRequest body)`
  Creates a new session where the ID is generated by the service.
  `Session`
  SessionController.`createSessionWithId(String appName, String userId, String sessionId, SessionRequest body)`
  Creates a new session with a specific ID provided by the client.
  `Session`
  SessionController.`getSession(String appName, String userId, String sessionId)`
  Retrieves a specific session by its ID.
  Methods in com.google.adk.web.controller that return types with arguments of type Session
  Modifier and Type
  Method
  Description
  `List<Session>`
  SessionController.`listSessions(String appName, String userId)`
  Lists all non-evaluation sessions for a given app and user.