withEagerTopicSearch

fun withEagerTopicSearch(limit: Int = DEFAULT_LIMIT): Memory

Enable eager topic-based similarity search.

Uses the topic field to perform a vector similarity search and preloads the top matching memories into the description. This makes the most relevant memories for the topic immediately visible to the LLM without a tool call.

Subsequent tool calls automatically deduplicate against these eagerly loaded memories, so the LLM always receives new information.

Can be combined with withEagerQuery — both sets of memories will be merged (deduplicated) in the description.

Return

New Memory with eager topic search configured

Parameters

limit

Maximum number of memories to preload (default DEFAULT_LIMIT)