# Interface BaseMemoryService

Base interface for memory services.

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

interface BaseMemoryService {
addSessionToMemory(session: Session): Promise<void>;
searchMemory(request: SearchMemoryRequest): Promise<SearchMemoryResponse>;
}

#### Implemented by

- InMemoryMemoryService

- Defined in memory/base_memory_service.ts:36

## Methods

### addSessionToMemory

- addSessionToMemory(session: Session): Promise<void>

  Adds a session to the memory.

  #### Parameters

  - session: Session

    The session to add to the memory.

  #### Returns Promise<void>

  A promise that resolves when the session is added to the memory.

  - Defined in memory/base_memory_service.ts:43

### searchMemory

- searchMemory(request: SearchMemoryRequest): Promise<SearchMemoryResponse>

  Searches for sessions that match the query.

  #### Parameters

  - request: SearchMemoryRequest

    The request to search memory.

  #### Returns Promise<SearchMemoryResponse>

  A promise that resolves to SearchMemoryResponse containing the matching memories.

  - Defined in memory/base_memory_service.ts:52