fix(FN-000): search agent memory through memory tools

This commit is contained in:
gsxdsm
2026-04-17 09:52:23 -07:00
parent 2a981fc4d1
commit 728022366d
6 changed files with 379 additions and 15 deletions

View File

@@ -332,10 +332,25 @@ export async function reviewStep(
}
// Spawn a reviewer agent with read-only tools
const memoryAgent = options.rootDir && options.agentStore && options.task?.assignedAgentId
? await options.agentStore.getAgent(options.task.assignedAgentId).catch(() => null)
: null;
const memoryTools = options.rootDir && options.settings?.memoryEnabled !== false
? [
createMemorySearchTool(options.rootDir, options.settings),
createMemoryGetTool(options.rootDir, options.settings),
createMemorySearchTool(options.rootDir, options.settings, memoryAgent ? {
agentMemory: {
agentId: memoryAgent.id,
agentName: memoryAgent.name,
memory: memoryAgent.memory,
},
} : undefined),
createMemoryGetTool(options.rootDir, options.settings, memoryAgent ? {
agentMemory: {
agentId: memoryAgent.id,
agentName: memoryAgent.name,
memory: memoryAgent.memory,
},
} : undefined),
]
: undefined;
const { session } = await createKbAgent({