You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/Module.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ The agents-features-longterm-memory module adds long-term memory capabilities to
19
19
|[`LongTermMemory`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/feature/LongTermMemory.kt)| Agent feature with DSL config for retrieval & ingestion |
20
20
|[`SearchStorage`](../../../../../../rag/rag-base/src/commonMain/kotlin/ai/koog/rag/base/storage/SearchStorage.kt)| Interface for searching memory records (defined in `rag-base`) |
21
21
|[`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 |
25
25
|[`DocumentExtractor`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/ingestion/extraction/DocumentExtractor.kt)| Transforms messages into `TextDocument`s for storage |
26
26
|[`MessagePassingDocumentExtractor`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/ingestion/extraction/MessagePassingDocumentExtractor.kt)| Default `DocumentExtractor`; filters messages by role (`User`/`Assistant` by default) |
27
27
|[`PromptAugmenter`](src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/PromptAugmenter.kt)| Interface for augmenting prompts with relevant context |
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/ingestion/extraction/DocumentExtractor.kt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import kotlin.jvm.JvmStatic
10
10
* This is a functional interface (SAM) that defines how a list of messages
11
11
* should be transformed into a list of [TextDocument]s for storage.
12
12
* It provides flexibility in how messages are filtered, transformed, and
13
-
* converted into memory records while maintaining type safety.
13
+
* converted into [TextDocument]s while maintaining type safety.
14
14
*
15
15
* Pre-built implementations are available for common ingestion patterns:
16
16
* - [MessagePassingDocumentExtractor] - Filters messages by role
@@ -33,7 +33,7 @@ import kotlin.jvm.JvmStatic
33
33
* val customExtractor = DocumentExtractor { messages ->
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/ingestion/extraction/MessagePassingDocumentExtractor.kt
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/RetrievalSettings.kt
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/augmentation/SystemPromptAugmenter.kt
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/retrieval/search/SearchStrategy.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ import kotlin.jvm.JvmStatic
8
8
* Search strategy for creating search requests during prompt augmentation.
9
9
*
10
10
* 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 retrieval.
12
12
*
13
13
* **[SimilaritySearchStrategy] is the default implementation.**
14
14
* It uses vector embeddings for semantic search and works with all supported vector backends.
@@ -33,10 +33,10 @@ import kotlin.jvm.JvmStatic
33
33
*/
34
34
publicfun interfaceSearchStrategy {
35
35
/**
36
-
* Maps a query string into a [SearchRequest] for the storage.
36
+
* Maps a query string into a [SearchRequest] for retrieval.
37
37
*
38
38
* @param query The user's query string (typically the last user message content)
39
-
* @return The similarity search request to be executed
Copy file name to clipboardExpand all lines: agents/agents-features/agents-features-longterm-memory/src/commonMain/kotlin/ai/koog/agents/longtermmemory/storage/InMemoryRecordStorage.kt
Copy file name to clipboardExpand all lines: docs/docs/features/long-term-memory.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ Ingestion runs once when the agent run completes: the final accumulated session
175
175
176
176
## Disabling Automatic Behavior
177
177
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:
0 commit comments