Package org.springframework.ai.session
@NullMarked
package org.springframework.ai.session
-
ClassDescriptionWhat
SessionService.create(org.springframework.ai.session.CreateSessionRequest)needs: an id, a time to live and metadata, each optional.TheSessionServiceon aSessionRepository.Which events of a session's log a read returns: the view (the whole log or its active view), the per-event criteria (event and message types, synthetic events) and the retrievalEventFilter.Window.Builds anEventFilter; nothing set isEventFilter.all().The retrieval window: which of the matching events are returned.Every matching event.The newestnmatching events.What aSessionEventrecords.A thread-safeSessionRepositoryin memory, for tests and demos: the sessions are lost on restart and not shared across instances.Builds anInMemorySessionRepository.Decides which messages are stored in a session: the write-side counterpart ofEventFilter, which selects the stored events a prompt reads.One continuous conversation between a user and an agent: its identity, its expiry and itsmetadata.Thrown bySessionService.create(org.springframework.ai.session.CreateSessionRequest)when a session with the requested id exists; the existing session is left untouched.The well-known metadata attributes of aSession, and the accessors that read them.An entry of a session's log.Builds aSessionEvent.The store of sessions and their logs.The sessions of an application and their conversations: creating and finding sessions, appending and reading their events, compacting them.