Skip to content

feat: Support custom workspace path configuration for dual memory systems#9

Open
heshuaibjcn-bit wants to merge 1 commit intoTianyiDataScience:mainfrom
heshuaibjcn-bit:feature/memory-system-config
Open

feat: Support custom workspace path configuration for dual memory systems#9
heshuaibjcn-bit wants to merge 1 commit intoTianyiDataScience:mainfrom
heshuaibjcn-bit:feature/memory-system-config

Conversation

@heshuaibjcn-bit
Copy link
Copy Markdown

Summary

  • Add OPENCLAW_WORKSPACE_ROOT environment variable to support custom workspace locations
  • Update .env.example with detailed configuration examples and comments
  • Add comprehensive docs/MEMORY-SYSTEM.md documentation
  • Improve code comments for workspace path resolution

Problem

The Control Center expected workspace at a fixed relative path (../../../ from control-center directory), which didn't work for users with OpenClaw workspace at ~/.openclaw/workspace or other custom locations. This caused the memory browsing feature to show empty results even when memory files existed.

Solution

  • Added OPENCLAW_WORKSPACE_ROOT environment variable override
  • Maintains backward compatibility with default relative path calculation
  • Added comprehensive documentation explaining different memory system types
  • .env.example now includes clear configuration examples

Supported Memory Systems

  • File-system memory (Markdown files in workspace/)
  • LanceDB vector database (accessed through Gateway)
  • Dual memory systems (both simultaneously)

Configuration Example

# For ~/.openclaw/workspace
OPENCLAW_WORKSPACE_ROOT=/Users/username/.openclaw/workspace

# For custom location
OPENCLAW_WORKSPACE_ROOT=/path/to/workspace

Testing

Tested with:

  • Memory files API: ✅ Returns correct file list
  • Workspace files API: ✅ Returns correct file list
  • Memory content API: ✅ Reads file content correctly
  • UI rendering: ✅ Memory section displays properly

Documentation

Added docs/MEMORY-SYSTEM.md with:

  • Explanation of different memory system types
  • Configuration guide
  • Troubleshooting section
  • Best practices
  • API endpoint reference

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

…tems

- Add OPENCLAW_WORKSPACE_ROOT env var to support custom workspace locations
- Update .env.example with detailed configuration examples
- Add comprehensive MEMORY-SYSTEM.md documentation
- Improve code comments for workspace path resolution

This change enables Control Center to work with OpenClaw installations
that use non-standard workspace locations, particularly the common
~/.openclaw/workspace path instead of the default ../workspace relative path.

Supported memory systems:
- File-system memory (Markdown files)
- LanceDB vector database (through Gateway)
- Dual memory systems (both simultaneously)

Fixes memory browsing showing empty for users with custom workspace paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@TianyiDataScience
Copy link
Copy Markdown
Owner

I tested/reviewed this locally. The feature direction makes sense, but this PR is not ready to merge as submitted.

The blocker is open-source/release hygiene: it introduces machine-specific absolute macOS home paths into public-facing files and code comments, for example /Users/....

Please replace those examples with generic placeholders such as:

  • ~/.openclaw/workspace
  • /path/to/workspace
  • /path/to/.openclaw

This needs to be cleaned up before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants