Credentials. The .env file holds provider API keys, so keep it local and out of version control, and avoid pasting keys into agent prompts or logs.
Who it is forA developer building a persistent assistant that must remember user preferences across sessions and recall them later.
The problemThe assistant forgets details from earlier conversations, and the team needs memory that keeps original observations with timestamps and provenance.
The outcomeA local memory cache built from your observations, plus an answer to a question about a stored preference, produced by the OpenAI-compatible model.
What you need first
- Python 3.11 or newer and a terminal
- A local copy of the repository (the README assumes you run commands from the repository root)
- For live runs: a TypeSafe API key and an OpenAI API key, plus network access, since live runs may incur charges
- For benchmarks: the LoCoMo dataset placed at data/locomo10.json, obtained from its original distributor per the data setup guide
Steps
- Create a
.envfile in the repository root withTYPESAFE_API_KEY=your-typesafe-keyandOPENAI_API_KEY=your-openai-key. - Format your data as a JSON list of strings or objects with
content, an optional ISO 8601timestamp, and optionalmetadata. - Build the cache with
python -m jev_mem --mode build --input examples/observations.json --jev-config config/jev_mem.json --cache-dir ./jev_mem_cache/app, replacing the input path with your file. (inferred, check the README) - Query it with
python -m jev_mem --mode query --question "What reminder does Mira prefer?" --jev-config config/jev_mem.json --cache-dir ./jev_mem_cache/app, replacing the question with your own. (inferred, check the README)
Prompt for your agent
In the Jev-Mem repository at <target-folder>, build a cache from <input-json-file> using `python -m jev_mem --mode build` with config/jev_mem.json, then query it with `--mode query` using the question <question>. Return the answer and confirm that the cache folder was created locally.
Caveat. Live runs send your text to the configured providers and may incur charges, and the README says to keep keys, conversations, and caches local, so review SECURITY.md before using private data.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for libingzheren/Jev-Mem and "Build and query Jev Mem over your own observations"
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