Commit Graph
1 Commits
Author SHA1 Message Date
Zamuldinov Nikitaandutkarsh240799 051551edb7 fix: use platform-appropriate user data dir instead of /tmp for vector store paths
The default vector store path was hardcoded to /tmp/{provider}, which fails in:
- macOS LaunchAgents: /tmp cleared on reboot, limited permissions
- Linux systemd: may have noexec restrictions or private /tmp namespaces
- Windows: /tmp does not exist
- Docker: /tmp is ephemeral unless mounted as a volume

Replace with a cross-platform user data directory:
  - Linux/macOS: $XDG_DATA_HOME or ~/.local/share/mem0/{provider}
  - Windows:     %APPDATA%/mem0/{provider}

This follows the XDG Base Directory Specification on Linux and the
conventional APPDATA path on Windows, making mem0 work reliably in
all deployment environments without requiring explicit path config.

Closes #4279
2026-03-26 18:28:36 +05:30