Problem
All memories live in a single flat namespace. When the assistant is used across multiple projects, semantically similar memories from different projects contaminate search results. There is no way to say "search only within project X" or "search everything except project X".
The existing category field is used for topic classification (e.g. "debugging", "deployment") and should not be overloaded with project identity.
Solution
Add a first-class project field (a plain string, e.g. "A-mem", "mcp-stuff") to:
MemoryNote dataclass
- All metadata dicts in
AgenticMemorySystem (add_note, update, consolidate_memories, _load_memories_from_chromadb)
ChromaRetriever.search() — accept an optional where filter, pass to ChromaDB's collection.query(where={"project": project}) when set
AgenticMemorySystem.search_agentic() (and sibling search methods) — accept and pass through optional project filter
- MCP tool signatures:
add_memory, search_memories, update_memory, get_memory
Behaviour
add_memory(content, project="A-mem") — tags memory to that project
search_memories(query, project="A-mem") — returns only A-mem memories
search_memories(query) — no filter, returns from all projects (cross-project retrieval)
update_memory(id, project="new-project") — allows reassigning a memory's project
Why not category?
category is already used for semantic classification of the memory's topic. project is orthogonal — a memory can be category="debugging" in project="A-mem" or category="debugging" in project="mcp-stuff". They should vary independently.
Problem
All memories live in a single flat namespace. When the assistant is used across multiple projects, semantically similar memories from different projects contaminate search results. There is no way to say "search only within project X" or "search everything except project X".
The existing
categoryfield is used for topic classification (e.g. "debugging", "deployment") and should not be overloaded with project identity.Solution
Add a first-class
projectfield (a plain string, e.g."A-mem","mcp-stuff") to:MemoryNotedataclassAgenticMemorySystem(add_note, update, consolidate_memories, _load_memories_from_chromadb)ChromaRetriever.search()— accept an optionalwherefilter, pass to ChromaDB'scollection.query(where={"project": project})when setAgenticMemorySystem.search_agentic()(and sibling search methods) — accept and pass through optionalprojectfilteradd_memory,search_memories,update_memory,get_memoryBehaviour
add_memory(content, project="A-mem")— tags memory to that projectsearch_memories(query, project="A-mem")— returns only A-mem memoriessearch_memories(query)— no filter, returns from all projects (cross-project retrieval)update_memory(id, project="new-project")— allows reassigning a memory's projectWhy not category?
categoryis already used for semantic classification of the memory's topic.projectis orthogonal — a memory can becategory="debugging"inproject="A-mem"orcategory="debugging"inproject="mcp-stuff". They should vary independently.