fix: detach memory tools on startup when memfs is enabled (#909)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
@@ -1697,6 +1697,15 @@ async function main(): Promise<void> {
|
||||
settingsManager.setMemfsEnabled(agent.id, true);
|
||||
}
|
||||
|
||||
// When memfs is being enabled, detach old API-based memory tools
|
||||
if (
|
||||
settingsManager.isMemfsEnabled(agent.id) &&
|
||||
(memfsFlag || (isNewlyCreatedAgent && !isSubagent))
|
||||
) {
|
||||
const { detachMemoryTools } = await import("./tools/toolset");
|
||||
await detachMemoryTools(agent.id);
|
||||
}
|
||||
|
||||
// Ensure agent's system prompt includes/excludes memfs section to match setting
|
||||
if (memfsFlag || noMemfsFlag || (isNewlyCreatedAgent && !isSubagent)) {
|
||||
const { updateAgentSystemPromptMemfs } = await import(
|
||||
|
||||
Reference in New Issue
Block a user