{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "sodamem-sodamem--memory-api-for-typescript-app",
 "repo": "SodaMem/SodaMem",
 "repo_url": "https://github.com/SodaMem/SodaMem",
 "repo_slug": "sodamem-sodamem",
 "title": "Call Soda Mem memory from a TypeScript app over HTTP",
 "page_title": "How to call Soda Mem memory from a TypeScript app over HTTP with Soda Mem",
 "summary": "Use the sodamem npm client to fetch a zero-LLM context block from a running Soda Mem service.",
 "who": "A TypeScript or Node developer whose app needs per-user memory but who does not want to run Python in the app.",
 "problem": "Without a memory API, each app must build its own store and retrieval logic for user context.",
 "outcome": "The app gets a prompt-ready context block for a user and query from the Soda Mem HTTP service.",
 "steps": [
  "Start the Soda Mem HTTP service as described in the Self-hosting section of the README (inferred: the service needs the server extra).",
  "Run `npm i sodamem` in the app.",
  "Create a SodaMemClient with baseUrl set to your service and apiKey read from SODAMEM_API_KEY.",
  "Call mem.context with user_id, query and token_budget and use the returned block in your prompt."
 ],
 "agent_prompt": "In the app at <project path>, install the sodamem npm package and call the SodaMem context endpoint for user <user_id>. Expected output: a context block returned with a text field. Verify the request succeeds with the API key sent as a Bearer token.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The self-hosting steps are not in the excerpt provided, so the service start command must be taken from the full README before the client can connect.",
 "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": [
  {
   "tag": "credentials",
   "notice": "The API key sent in the Authorization header must stay in environment variables and out of source control."
  }
 ],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/sodamem-sodamem/memory-api-for-typescript-app/",
 "md": "https://dedupedai.com/use-cases/sodamem-sodamem/memory-api-for-typescript-app/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--memory-api-for-typescript-app.json",
 "api_version": "v1"
}
