{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "sodamem-sodamem--trace-agent-memory-to-source-turn",
 "repo": "SodaMem/SodaMem",
 "repo_url": "https://github.com/SodaMem/SodaMem",
 "repo_slug": "sodamem-sodamem",
 "title": "Trace each recalled memory back to the turn it came from",
 "page_title": "How to trace each recalled memory back to the turn it came from with Soda Mem",
 "summary": "Check where a stored fact came from before trusting an agent's answer about a user.",
 "who": "A developer or reviewer who must explain why an agent believes something about a user.",
 "problem": "A similarity score alone does not show which conversation produced a remembered claim.",
 "outcome": "Each line of recalled context links to a source span and the exact raw turn, so the claim can be checked.",
 "steps": [
  "Run `pip install \"sodamem[chroma,llm]\"` to install Soda Mem.",
  "Call mem.build_context for the user and question you want to audit, with a token_budget.",
  "Read block.citations to get each evidence item and its source.",
  "Use the MCP tool entity_timeline to see one entity's history in order, with each item still pointing at its source."
 ],
 "agent_prompt": "Using the SodaMem repo at <repo path>, run build_context for user <user_id> with the question <question>. Expected output: a list of citations, each tied to a session and turn. Verify that every line in the context has a citation.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Citations trace to stored turns only, so the audit is only as complete as what was ingested.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/sodamem-sodamem/trace-agent-memory-to-source-turn/",
 "md": "https://dedupedai.com/use-cases/sodamem-sodamem/trace-agent-memory-to-source-turn/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/sodamem-sodamem--trace-agent-memory-to-source-turn.json",
 "api_version": "v1"
}
