Skip to content

Commit a0ee00f

Browse files
committed
Update doc
1 parent a71e976 commit a0ee00f

6 files changed

Lines changed: 9 additions & 10 deletions

File tree

agents/agents-features/agents-features-longterm-memory/Module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ The agents-features-longterm-memory module adds long-term memory capabilities to
1919
| [`LongTermMemory`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/feature/LongTermMemory.kt) | Agent feature with DSL config for retrieval & ingestion |
2020
| [`SearchStorage`](../../../../../../rag/rag-base/src/commonMain/kotlin/ai/koog/rag/base/storage/SearchStorage.kt) | Interface for searching memory records (defined in `rag-base`) |
2121
| [`WriteStorage`](../../../../../../rag/rag-base/src/commonMain/kotlin/ai/koog/rag/base/storage/WriteStorage.kt) | Interface for adding memory records (defined in `rag-base`) |
22-
| [`SearchStrategy`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/SearchStrategy.kt) | Converts user query into a `SearchRequest`; `SimilaritySearchStrategy` is the default implementation |
23-
| [`SearchQueryProvider`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/SearchQueryProvider.kt) | Provides the search query string from a `Prompt` for retrieval |
24-
| [`LastUserMessageQueryProvider`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/LastUserMessageQueryProvider.kt) | Default `SearchQueryProvider` that uses the last user message content |
22+
| [`SearchStrategy`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/search/SearchStrategy.kt) | Converts user query into a `SearchRequest`; `SimilaritySearchStrategy` is the default implementation |
23+
| [`SearchQueryProvider`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/search/SearchQueryProvider.kt) | Provides the search query string from a `Prompt` for retrieval |
24+
| [`LastUserMessageQueryProvider`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/search/LastUserMessageQueryProvider.kt) | Default `SearchQueryProvider` that uses the last user message content |
2525
| [`DocumentExtractor`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/ingestion/extraction/DocumentExtractor.kt) | Transforms messages into `TextDocument`s for storage |
2626
| [`MessagePassingDocumentExtractor`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/ingestion/extraction/MessagePassingDocumentExtractor.kt) | Default `DocumentExtractor`; filters messages by role (`User`/`Assistant` by default) |
2727
| [`PromptAugmenter`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/PromptAugmenter.kt) | Interface for augmenting prompts with relevant context |

agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/RetrievalSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import ai.koog.rag.base.storage.search.SearchRequest
1515
* Settings controlling how memory records are retrieved and injected into prompts (RAG).
1616
*
1717
* @param storage The retrieval storage to search for relevant memory records.
18-
* @param searchQueryProvider The extractor that defines how to derive the search query from the prompt.
18+
* @param searchQueryProvider The provider that defines how to derive the search query from the prompt.
1919
* Defaults to [ai.koog.agents.longtermmemory.retrieval.search.LastUserMessageQueryProvider], which uses the last user message content.
2020
* @param searchStrategy The strategy that defines how to search the retrieval store.
2121
* @param promptAugmenter The augmenter that defines how retrieved context is inserted into the prompt.

agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/SystemPromptAugmenter.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import ai.koog.rag.base.storage.search.SearchResult
99
/**
1010
* A [PromptAugmenter] that inserts retrieved context as a system message at the beginning of the prompt.
1111
*
12-
* If an existing system message is present, the new context system message is inserted
13-
* before it, keeping each system message focused on a single concern.
12+
* The new context system message is prepended before all existing messages.
1413
* If there is no system message in the prompt, the prompt is returned unchanged.
1514
*
1615
* @param template The template for the system message. Use [PromptAugmenter.RELEVANT_CONTEXT_PLACEHOLDER] placeholder.

agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/search/SearchStrategy.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import kotlin.jvm.JvmStatic
88
* Search strategy for creating search requests during prompt augmentation.
99
*
1010
* This is a functional interface (SAM) that defines how a user query string
11-
* should be transformed into a [SimilaritySearchRequest] for storage.
11+
* should be transformed into a [SearchRequest] for storage.
1212
*
1313
* **[SimilaritySearchStrategy] is the default implementation.**
1414
* It uses vector embeddings for semantic search and works with all supported vector backends.

agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/storage/InMemoryRecordStorage.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import kotlin.uuid.ExperimentalUuidApi
1818
import kotlin.uuid.Uuid
1919

2020
/**
21-
* In-memory implementation of [SearchStorage]
22-
* and [WriteStorage] that stores records in a map.
21+
* In-memory implementation of [SearchStorage], [WriteStorage], [LookupStorage],
22+
* and [DeletionStorage] that stores records in a map.
2323
*
2424
* This implementation is useful for testing, development, and scenarios where persistence
2525
* is not required. All data is stored in memory and will be lost when the application stops.

docs/docs/features/long-term-memory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Ingestion runs once when the agent run completes: the final accumulated session
175175

176176
## Disabling Automatic Behavior
177177

178-
By default, retrieval and ingestion run automatically (before and after LLM calls, respectively). You can disable automatic behavior while still having access to the configured storage and strategies from within strategy nodes:
178+
By default, retrieval and ingestion run automatically (retrieval runs before each LLM call; ingestion runs once when the agent completes). You can disable automatic behavior while still having access to the configured storage and strategies from within strategy nodes:
179179

180180
=== "Kotlin"
181181

0 commit comments

Comments
 (0)