Scope memory deliberately
Use user_id for end-user facts, agent_id for assistant-specific knowledge, and run_id for session-bounded context. Clear scopes make retrieval easier to reason about.
Separate writes from reads
Treat memory writes as deliberate events. Reads can happen frequently inside the agent loop, but writes should carry enough metadata to support auditing and cleanup later.
Monitor request logs
Track add, search, and failure rates per project and API key. Usage visibility is what keeps memory behavior debuggable in production.

