MemoryService

interface MemoryService

Base contract for memory services.

The service provides functionalities to ingest sessions into memory so that the memory can be used for user queries.

Inheritors

Functions

Link copied to clipboard
open suspend fun addEventsToMemory(appName: String, userId: String, events: List<Event>, sessionId: String? = null, customMetadata: Map<String, Any?>? = null)

Adds an explicit list of events to the memory service.

Link copied to clipboard
open suspend fun addMemory(appName: String, userId: String, memories: List<MemoryEntry>, customMetadata: Map<String, Any?>? = null)

Adds explicit memory items directly to the memory service.

Link copied to clipboard
abstract suspend fun addSessionToMemory(session: Session)

Adds a session to the memory service.

Link copied to clipboard
abstract suspend fun searchMemory(appName: String, userId: String, query: String): SearchMemoryResponse

Searches for sessions that match the query asynchronously.