# Interface BaseMemoryService

All Known Implementing Classes:
  `FirestoreMemoryService, InMemoryMemoryService`

public interface BaseMemoryService
Base contract for memory services.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Completable`
  `addSessionToMemory(Session session)`
  Adds a session to the memory service.
  `io.reactivex.rxjava3.core.Single<SearchMemoryResponse>`
  `searchMemory(String appName, String userId, String query)`
  Searches for sessions that match the query asynchronously.

- ## Method Details

  - ### addSessionToMemory

    io.reactivex.rxjava3.core.Completable addSessionToMemory(Session session)
    Adds a session to the memory service.

    A session may be added multiple times during its lifetime.

    Parameters:
      `session` - The session to add.

  - ### searchMemory

    io.reactivex.rxjava3.core.Single<SearchMemoryResponse> searchMemory(String appName, String userId, String query)
    Searches for sessions that match the query asynchronously.
    Parameters:
      `appName` - The name of the application.
      `userId` - The id of the user.
      `query` - The query to search for.
    Returns:
      A `SearchMemoryResponse` containing the matching memories.