Summary
When agents.defaults.memorySearch.extraPaths is configured, every agent independently indexes and embeds all files in those paths. For a setup with N agents and M files in extraPaths, this produces N × M embedding operations and N copies of the same vectors in separate sqlite databases.
Impact
- Wasted embedding API calls (cost + latency on every sync)
- Duplicate storage in each agent's
.sqlite file
- Sync time scales linearly with agent count for the same shared files
Expected behavior
Files in shared/extra paths should be indexed once and searched from all agents, not duplicated per-agent.
Workaround
#46542 introduces a shared memory store (sharedPaths) that indexes once in _shared.sqlite and merges results into agent searches. It also soft-migrates extraPaths to sharedPaths with a deprecation warning.
Repro
- Configure
agents.defaults.memorySearch.extraPaths: ["~/shared-docs"] with multiple agents
- Run
openclaw memory index
- Observe each agent's sqlite independently embedding the same files
Summary
When
agents.defaults.memorySearch.extraPathsis configured, every agent independently indexes and embeds all files in those paths. For a setup with N agents and M files in extraPaths, this produces N × M embedding operations and N copies of the same vectors in separate sqlite databases.Impact
.sqlitefileExpected behavior
Files in shared/extra paths should be indexed once and searched from all agents, not duplicated per-agent.
Workaround
#46542 introduces a shared memory store (
sharedPaths) that indexes once in_shared.sqliteand merges results into agent searches. It also soft-migratesextraPathstosharedPathswith a deprecation warning.Repro
agents.defaults.memorySearch.extraPaths: ["~/shared-docs"]with multiple agentsopenclaw memory index