Credentials. The API key sent in the Authorization header must stay in environment variables and out of source control.
Who it is forA TypeScript or Node developer whose app needs per-user memory but who does not want to run Python in the app.
The problemWithout a memory API, each app must build its own store and retrieval logic for user context.
The outcomeThe app gets a prompt-ready context block for a user and query from the Soda Mem HTTP service.
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
- 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 sodamemin 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.
Prompt for your agent
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.
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for SodaMem/SodaMem and "Call Soda Mem memory from a TypeScript app over HTTP"
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