-
-
Notifications
You must be signed in to change notification settings - Fork 57.4k
Closed
Closed
Copy link
Description
Feature Request
When multiple agents (sonnet, opus, haiku) are configured to index the same workspace memory files (MEMORY.md, memory/**/*.md), each agent currently maintains a completely separate qmd database with duplicate content.
Current Behavior
- Each agent has its own
XDG_CACHE_HOME→ separate SQLite DB - Same files are indexed 3x, embedded 3x, stored 3x
- Disk: ~60MB per agent × 3 = ~180MB for identical content
- When agent A writes a memory file, agent B/C's DB is stale until their next
qmd update - The
path+patternuniqueness constraint in qmd causes collection creation failures across agents (see qmd: ensureCollections() silently fails when path+pattern conflicts with another collection name #25496)
Proposed Behavior
For kind: memory collections (not sessions), share a single qmd database across all agents:
- Sessions collections remain per-agent (they genuinely contain different data)
- Memory collections point to the same DB, indexed once, with a shared collection name (no agent suffix for memory)
- OR: use a single DB with agent-suffixed collection names but share the same
XDG_CACHE_HOME
Benefits
- 3x less disk/CPU for indexing and embedding
- Memory writes by any agent are immediately searchable by all agents
- Eliminates the path+pattern collision bug entirely for memory collections
- Simpler mental model: "all agents share the same knowledge base"
Environment
- OpenClaw 2026.2.21-2
- 3 agents sharing workspace
~/openclaw - qmd with local embeddings (embeddinggemma)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels