You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mem::smart-search ignores the project filter on observation results (cross-project leak) #868
I run a single agentmemory instance and want to scope memory per concern using the project field — one logical space per workstream. I can't isolate them: mem::smart-search with project: "A" still returns observations stored under project: "B".
Repro
remember an observation with project: "A", and another with project: "B".
POST /agentmemory/smart-search {"query": "...", "project": "A"}
The results include the project: "B" observation.
curl -s -XPOST localhost:3111/agentmemory/remember -d '{"content":"alpha note","project":"A"}'
curl -s -XPOST localhost:3111/agentmemory/remember -d '{"content":"beta note","project":"B"}'
curl -s -XPOST localhost:3111/agentmemory/smart-search -d '{"query":"note","project":"A"}'# -> returns both the A and the B observation
Cause
mem::smart-search accepts project but only forwards it to mem::lesson-recall. The primary observation results — filteredHybrid in the hybrid branch and scoped in the expand-ids branch — are filtered by agentId alone; project is never applied to them. Other functions (actions, timeline, crystallize) already filter by project, so smart-search is the gap.
Expected
A project-scoped search returns only that project's observations; omitting project returns all (unchanged).
Environment
Node: v24
OS: Linux
agentmemory: 0.9.27
Happy to send a PR — it mirrors the existing agentId post-filter and the project filtering already done elsewhere.
Activity
jwfaye commentedon Jun 9, 2026
Closing as a duplicate of #787, which reported this first. The fix lives in #869, now linked to #787.