Add hybrid memory retrieval and escalation history

This commit is contained in:
dahyeon committed 2026-05-18 23:04:34 -07:00
1 parent 1a86bded0b
commit 211de18476
38 files changed
+1602 -37

No files matched your search

+4
View File
@@ -1,5 +1,6 @@
import type mongoose from "mongoose";
import type { GarnetClient } from "@common/garnet";
import type { LlmClient } from "@llm/llm-client";
import type { Blackboard } from "@skills/onboarding/types";
import { createEmbeddingClient } from "./embedding-client.js";
import { GarnetSessionMemory } from "./garnet-session-memory.js";
@@ -7,6 +8,7 @@ import {
MongoLongTermMemory,
NoopLongTermMemory,
} from "./mongo-long-term-memory.js";
import { LlmReranker } from "./reranker.js";
import type {
LongTermMemory,
MemoryService,
@@ -17,6 +19,7 @@ import type {
interface CreateMemoryServiceOptions {
garnetClient: GarnetClient;
llmClient?: Pick<LlmClient, "chatCompletion"> | undefined;
mongooseConnection?: mongoose.Connection | undefined;
}
@@ -88,6 +91,7 @@ export function createMemoryService(
options.garnetClient,
options.mongooseConnection,
createEmbeddingClient(),
options.llmClient ? new LlmReranker(options.llmClient) : undefined,
)
: new NoopLongTermMemory(options.garnetClient);