Behaviour for memory storage backends.
Memory services store cross-session knowledge extracted from session events and provide search capabilities for retrieving relevant memories.
Summary
Callbacks
Adds a session's events to memory storage.
Searches memory for entries matching the given criteria.
Types
@type opts() :: keyword()
Callbacks
@callback add_session(server :: GenServer.server(), session :: ADK.Session.t()) :: :ok | {:error, term()}
Adds a session's events to memory storage.
Extracts text content from session events, indexes it for search, and stores it keyed by the session's app_name and user_id.
@callback search(server :: GenServer.server(), opts()) :: {:ok, [ADK.Memory.Entry.t()]} | {:error, term()}
Searches memory for entries matching the given criteria.
Options:
:query— search text (words are matched against stored entries):app_name— scope to a specific application:user_id— scope to a specific user