Who it is forA Python developer building a personal assistant whose users change jobs, homes or preferences over time.
The problemMost memory stores overwrite old values, so the assistant gives outdated answers after a user changes their mind.
The outcomeThe assistant returns a prompt-ready memory block showing the current fact, with citations to the turn it came from.
What you need first
- Python environment with pip available
- An LLM provider API key set as SODAMEM_LLM_API_KEY, needed only for ingest
- Docker or a running daemon is not required for the Python path, but coding tools need `sodamem daemon ensure` first
Steps
- Run
pip install "sodamem[chroma,llm]"to install Soda Mem. - Set SODAMEM_LLM_API_KEY in your environment for the extractor.
- Create a script that calls Soda Mem.open("./data", extractor=FactEventExtractorV2(create_provider_from_env())) and calls mem.ingest with a message that changes a fact.
- Call mem.build_context with a question about that fact and print block.text and block.citations.
Prompt for your agent
In the SodaMem repo at <repo path>, write a Python script that ingests a message for user u1 saying the user moved to a new city, then calls build_context for where the user lives. Expected output: the new city in block.text with citations. Verify that the old city does not appear as the current answer.
Caveat. Ingest needs an LLM provider through the extractor, so the first run depends on a valid API key, while the recall step makes zero LLM calls.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for SodaMem/SodaMem and "Build a chatbot that updates facts when users change them"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer