Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Make home and mem0 dirs configurable so that the service can work on AWS lambda. (#1726)

Max von Hippel2d66c2311618
diff --git a/mem0/memory/setup.py b/mem0/memory/setup.py
index 2973b0724..a22b2e13e 100644
--- a/mem0/memory/setup.py
+++ b/mem0/memory/setup.py
@@ -4,7 +4,7 @@ import uuid
# Set up the directory path
home_dir = os.path.expanduser("~")
-mem0_dir = os.path.join(home_dir, ".mem0")
+mem0_dir = os.environ.get("MEM0_DIR") or os.path.join(home_dir, ".mem0")
os.makedirs(mem0_dir, exist_ok=True)