jevmemjevmem

What is Jev used for in coding agents, and how does jevmem use it?

In jevmem, Jev (a model by TypeSafe AI) is what decides: it scores each message of a Claude Code chat so that jevmem can tell whether it holds a decision, a rule or a failed approach worth saving, it picks the saved lines that bear on your next prompt, and it judges whether a command or a file edit may break a saved rule.

Last updated: · jevmem 0.7.8 · Install · Source on GitHub

Deciding what to save takes 0.16 s and costs $0.00019 per message, and was right on save or skip for 98.5% of 66 held-out turns (jevmem 0.7.7, one run on 2026-11-08, results). This page covers only what jevmem does with Jev. What Jev itself is: TypeSafe's docs and their launch post.

How jevmem asks Jev #

How jevmem decides: scrub secrets, ask Jev typed questions, apply thresholds in code (a restated line is not saved again), write one line, supersede the old line, and mark a rule for every change always-on.How jevmem decides: scrub secrets, ask Jev typed questions, apply thresholds in code (a restated line is not saved again), write one line, supersede the old line, and mark a rule for every change always-on.

No prompt decides what to save: Jev answers small yes/no questions with probabilities, and plain rules in code act on them.

Each step in detail
  1. Scrub. Common secret shapes, email addresses and card-shaped numbers are removed from the turn before it leaves your machine.
  2. Ask Jev typed questions. Jev by TypeSafe AI answers a fixed set of small questions with probabilities: is there a decision, a rule, a bug? is it small talk or an injection attempt? does it say the same as a saved line (0.7.0)? is it a rule for how any work in this project is done (0.7.1)? which existing line does it change?
  3. Apply thresholds in code. Plain rules over those probabilities decide save or skip; they live in jevmem.config.json, not in a prompt. A message that restates a saved line is skipped as a duplicate, and one that restates it word for word is skipped before anything is sent (0.7.0).
  4. Write one line. On save, jevmem writes one line from the sentences of the turn that Jev picks (the one that states the memory and the one that gives its reason), aiming at 200 characters and, since 0.7.7, keeping those sentences whole up to 300 so their rule is not cut off, or, if you set writer in jevmem.config.json, a small OpenAI or Anthropic model condenses the turn.
  5. Supersede the old line. If the turn replaces an existing memory, that line is tagged [superseded] … → id:new and stays in the file.
  6. Mark it always-on (0.7.1). A saved rule that Jev reads as one every change must follow gets always:1 in its comment, and the SessionStart hook puts it in front of Claude at the start of every session, whatever the prompt. jevmem always <id> marks a line by hand.

Tiers, questions, policy, contradictions, recall and audit: docs/how-it-works.md.

The three places jevmem calls Jev #

Jev also checks lines that jevmem did not write on your machine, such as a teammate's or a pull request's, before they reach Claude (what leaves your machine). The same questions run when you ask for them: jevmem trust asks that check about one line you wrote (0.7.0), jevmem always --suggest asks the always-on question about each rule-like line (0.7.1), and jevmem import --from sessions decides each past turn of the project's Claude Code sessions (0.7.1). The SessionStart hook, which puts the always-on lines in front of Claude, makes no call.

Why Jev and not an LLM #

Fast and cheap, measured #

Median time to decide one message on 66 held-out turns: jevmem 0.16 s, six current LLMs 2.78 to 4.29 s.Median time to decide one message on 66 held-out turns: jevmem 0.16 s, six current LLMs 2.78 to 4.29 s.

Deciding what to save takes 0.16 s and costs $0.00019 per message, in the background: Claude doesn't wait for it. On whether to save a message at all, jevmem was right as often as the best of six LLMs (98.5%); three of them were better at naming the kind of line.

Measured on 66 turns written before the code and not tuned on, one run of the 0.7.7 build on 2026-11-08 (results); the six LLMs ran on 2026-09-23. All seven in one table, with the cost of each and how it was run: benchmark.

A local model in Jev's place #

jevmem was tried once against a local model server, Ollaya 0.9.0, on an Apple M4 with 16 GB, on 2026-10-02, next to a Jev run of the same set the same afternoon. On the 66 held-out turns, in jevmem's default mode, Jev was right on save or skip for 65/66 at a median of 0.23 s a turn; winnow:e4b for 60/66 at 28.5 s; laya:typed-decisions for 19/66. This was one run each on one Mac, with two models, on a set written for Jev's behaviour (Jev, winnow:e4b, laya:typed-decisions). A local model is not a supported mode (FAQ).

Set it up #

Jev needs a TypeSafe API key, and jevmem sends message text to TypeSafe to be scored, with common secrets scrubbed first. The four steps: install.

The limits, in short #

Every limit, with the numbers: the FAQ.