Skip to content

invalidate

Invalidation layer for agent memory: each fact gets a lease and Jev yes/no votes decide whether new evidence ends it.

ProjectbetaApache-2.0

Overview

invalidate addresses a gap in agent memory: agents remember but never un-remember. When something new happens, such as a Slack message saying a Postgres-to-SQLite migration is done, invalidate checks every stored memory against the event and asks whether it is still true. Stale memories are marked superseded rather than edited, and the replacement is stored verbatim. Questions, plans and instructions are not treated as evidence, and when unsure it sends the memory to a human review queue. Every check is logged.

The design depends on cheap checks: comparing every memory with every event is too slow and expensive with an LLM, so typical memory products only check the most similar ten. invalidate uses six yes/no votes from Jev per check followed by fixed rules in code. The README reports about 150 ms and $0.00006 per check, under a second and half a cent for 500 memories against one event, and an eval on 157 labelled cases of 89.2% strict, 97.5% lenient, with no memories wrongly retired. A live playground is available.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this new event mean this stored memory is no longer true?(inferred)yes · no
Yes / noIs this event actual evidence rather than a question, plan or instruction?(inferred)yes · no

How it works

  1. A new event arrives (e.g. from Slack)
  2. Each stored memory is checked against it with six Jev yes/no votes
  3. Fixed rules combine the votes into keep, supersede or review
  4. Superseded memories are marked and the replacement stored verbatim
  5. Uncertain cases go to a human review queue; all checks logged

Strengths

  • Checks every memory, not just the most similar few
  • README reports $0.00006 and about 150 ms per check
  • Eval reports 0 memories wrongly retired on 157 cases
  • Prompt-injection style instructions are not treated as evidence

Caveats

  • Eval set is small (157 cases)
  • Requires a TypeSafe API key

Getting started

Try it without installing at https://invalidate-playground.vercel.app, or install the Python package locally per the README.

At a glance

Type
Project
Status
beta
Language
Python
Runtime
library, web playground
Has code
yes
Has tests
yes
License
Apache-2.0

Use cases and integrations

How curated lists describe it

  • The invalidation layer for AI memory. Every fact gets a lease; new evidence ends it. Built on TypeSafe Jev.

    hellogumbo/awesome-jev
  • Gives every remembered fact a lease and asks Jev whether new evidence ends it, so an agent's memory can be made to go stale on purpose.

    MrJev/awesome-jev

Frequently asked questions

What does invalidate decide?

Whether each stored memory is still true after a new event, using six Jev yes/no votes and fixed rules.

Does it delete old memories?

No. Stale memories are marked and kept, and the replacement is stored word for word.

What does it cost?

The README reports about $0.00006 per check, or half a cent for 500 memories against one event.

Related projects

  • Agent context compactor where Jev scores transcript segments to keep verbatim or move behind a recoverable pointer.

    ServiceprototypePython
  • Example of using Jev as a webhook guardrail inside the agentgateway proxy to inspect model requests and responses.

    ProxyproductionRust
  • Large catalog of Claude Code agents, commands, hooks and MCPs, listed with community Jev mods for guardrails and subagent models.

    CLIproductionJavaScript
  • x402 pre-payment risk-check provider combining sanctions lists, phishing feeds and simulation with Jev checks for injected instructions.

    Projectproduction
  • Cisco's security scanner for agent skills, with a System One analyzer as an advisory tier that cannot emit findings or change severity.

    Agent skillproductionPython
  • MCP proxy and hooks that screen agent tool calls before they run and their results before the agent reads them, using Jev judgments.

    MCP serverbetaTypeScript