remember from a Bot is deduplicated per person, but read back per Bot.
server/src/memory/store.ts (the create path for formedBy: "bot") looks for an existing row by (ownerUserId, formedBy = 'bot', importDigest). The unique index has the same shape. It does not include formedByAgentId.
retrieve returns Bot-formed rows only where formedByAgentId is the asking Bot.
So if Bot A remembers "I prefer metric units" for a person, and Bot B later forms the same sentence, B gets { duplicate: true } with A's id. B never records it, and B's retrieval never returns it. B is told the fact is remembered but never sees it.
There are two possible directions:
- Scope the dedup lookup and the index to
formedByAgentId, so each Bot keeps its own copy.
- Keep one row per person, and let retrieval include Bot-formed rows from other Bots the person uses.
Which one is intended? I'm happy to send a PR for either.
rememberfrom a Bot is deduplicated per person, but read back per Bot.server/src/memory/store.ts(thecreatepath forformedBy: "bot") looks for an existing row by(ownerUserId, formedBy = 'bot', importDigest). The unique index has the same shape. It does not includeformedByAgentId.retrievereturns Bot-formed rows only whereformedByAgentIdis the asking Bot.So if Bot A remembers "I prefer metric units" for a person, and Bot B later forms the same sentence, B gets
{ duplicate: true }with A's id. B never records it, and B's retrieval never returns it. B is told the fact is remembered but never sees it.There are two possible directions:
formedByAgentId, so each Bot keeps its own copy.Which one is intended? I'm happy to send a PR for either.