Skip to main content

Overview

The SearchMemoriesOptions interface allows you to refine how the memory engine retrieves and ranks episodic and semantic results. It is used as the optional second argument in the MemMachineMemory.search() method.

Properties

All properties in this interface are optional.

Usage Example

The following example demonstrates how to perform a filtered search with a specific limit and context expansion.
Use expand_context when you need the LLM to understand the conversation flow surrounding a specific memory hit, rather than just the hit itself.
agent_mode defaults to false. When set to true, it changes episodic retrieval strategy (routing, splitting, and query rewriting) and does not change semantic retrieval behavior(yet).