Scan your whole stack
Are you using memworthy?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.3.0
memworthy was last scanned on 27 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.0 LATEST | 27 Nov 2026 | No rules fired |
| 0.2.0 | 12 Oct 2026 | No rules fired |
Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.3.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Agent memory usually fails at the decision step, not at retrieval. Extraction pipelines are generous, so memory fills up with errors:
Memworthy is a small Python library that sits between whatever proposes memories and whatever stores them. For each candidate it:
store, update, merge, supersede, reject, review, redact or store_labeledEvery decision is written to a ledger you can audit, replay under a changed policy, and review.
pip install "memworthy[jev]" # Python 3.10+
export TYPESAFE_API_KEY=... # https://typesafe.ai
from memworthy import Candidate, DictStore, Gate
gate = Gate(policy="personal-memory", store=DictStore())
decisions = gate.ingest_messages([
{"role": "user", "content": "I live in Dubai"},
{"role": "user", "content": "Flying to Riyadh tomorrow"},
{"role": "user", "content": "I moved to Riyadh last week"},
{"role": "user", "content": "Actually I'm only considering it"},
])
for d in decisions:
print(f"{d.action:10} {d.rule:16} {d.candidate.text}")
# store rules[9] I live in Dubai
# reject not_memory Flying to Riyadh tomorrow
# update update_existing I moved to Riyadh last week
# supersede retracted Actually I'm only considering it (rolls back to Dubai)
The output above is what the bundled recorded Jev answers give; a live run may differ slightly. You can reproduce it with no API key:
from memworthy import RecordedJudge
from memworthy.judges.recorded import bundled_fixture_path
gate = Gate("personal-memory", DictStore(),
judge=RecordedJudge(bundled_fixture_path("personal-memory")))
Each decision also lands in memworthy.ledger.jsonl with every signal, its probability, the rule that fired, and the policy and model version.
# Wrap a Mem0 client: only approved content reaches Mem0 (pip install "memworthy[jev,mem0]")
from mem0 import Memory
from memworthy import GatedMemory
memory = GatedMemory(Memory(), policy="personal-memory") # mode="input" or "candidate"
memory.add([{"role": "user", "content": "I'm in Lisbon this week"}], user_id="alice") # rejected
# Turn Claude Code / Codex sessions into an Obsidian-compatible Markdown knowledge base
memworthy run dev-sessions ~/.claude/projects --store markdown:~/kb
memworthy run dev-sessions ~/.claude/projects --store markdown:~/kb --extractor llm # OpenRouter via EXTRACTOR_MODEL
| Command | What it does |
|---|---|
memworthy test POLICY [--judge recorded\|mock\|jev\|openai\|microsoft\|PLUGIN] [--pairs FILE] |
Runs the policy's tests; exits 1 on failure (CI-friendly with recorded answers) |
memworthy run POLICY SOURCE [--store dict\|markdown:PATH\|mem0] [--dry-run] |
Gates a candidate file, chat JSON or session folder |
memworthy replay LEDGER POLICY [--only-changed] |
Shows which past decisions a policy change would flip (no API calls when prompts are unchanged) |
memworthy lint POLICY [--strict] |
Overlapping types, unused signals, unreachable rules, vague prompts |
memworthy review LEDGER [--export-tests FILE] |
Accept, override or skip queued decisions; overrides become tests |
memworthy record POLICY INPUT [--judge jev\|openai\|microsoft\|PLUGIN] |
Records live judge answers as fixtures |
memworthy eval POLICY |
Contrast-pair metrics, calibration and plots into eval/results/ |
The judge answers the typed questions. Pick one with --judge or MEMWORTHY_JUDGE, or pass any object with a name and an async judge(state, questions) method to Gate(judge=...).
| Provider | Configuration |
|---|---|
jev (default) |
TYPESAFE_API_KEY, optional TYPESAFE_BASE_URL, MEMWORTHY_MODEL (default jev-1.13.0) |
openai |
OPENAI_API_KEY, optional OPENAI_BASE_URL, OPENAI_DECISIONS_MODEL (default gpt-6-luna); uses the Decisions API, in public beta |
microsoft |
AZURE_FOUNDRY_ENDPOINT, AZURE_FOUNDRY_API_KEY, optional AZURE_FOUNDRY_DEPLOYMENT (found automatically when unset); Microsoft-Decision-1 deployed in your Foundry resource (API-key auth) |
The bundled templates' thresholds and evaluation results come from Jev. Other providers' probabilities are on a different scale, so run memworthy eval with your judge before you trust a template's cut-offs.
To ship your own provider as a package, implement the memworthy.Judge protocol (see memworthy/judges/openai_decisions.py for a complete HTTP example) and register a zero-argument factory that reads its settings from the environment:
[project.entry-points."memworthy.judges"]
myprovider = "memworthy_myprovider:MyJudge"
If your provider speaks the System One API (the format Jev and Microsoft-Decision-1 use), you don't need to write the request and response mapping: return a configured memworthy.SystemOneJudge(api_key=..., base_url=..., model=..., auth="bearer" or "api-key") from your factory.
After pip install, --judge myprovider and MEMWORTHY_JUDGE=myprovider work. memworthy.available_judges() lists what is installed.
Both are ordinary YAML files in src/memworthy/templates/; copy one and edit it.
personal-memory (v1.1) is for consumer assistants.
rules:
- {name: secrets, when: "secret", then: redact}
- {name: not_user, when: "not from_user", then: reject}
- {name: retracted, when: "retraction > 0.7 and conflict", then: supersede, restore: true}
- {name: not_memory, when: "type in ['temporary', 'intent', 'hypothetical', 'noise']", then: reject}
- {name: bounded_time, when: "timing == 'bounded' or timing == 'future'", then: reject}
- {name: sensitive, when: "sensitivity >= 1.5", then: review}
- {name: low_durability, when: "durable < 0.6 or explicit < 0.5", then: reject}
- {name: wrong_subject, when: "about_subject < 0.5", then: review}
- {name: update_existing, when: "conflict and conflict.p > 0.6", then: update}
- {else: store}
dev-sessions (v1.1) turns coding-agent sessions into a knowledge base.
unverified, meaning no passing tests, build, commit or user sign-off._archive/.Policies use a small, safe expression language (a hand-written parser, never eval). For anything it can't express, register Python checks and rules with @memworthy.check and @memworthy.rule.
All numbers come from real jev-1.13.0 answers, regenerated with memworthy eval <policy>. Full reports, including every failure, are in eval/results/.
Contrast pairs are held out: one changed word flips the correct action, labels come from the template, and the policies were frozen before the pairs were recorded.
| Template | Cases | Action accuracy | Pair consistency | Target |
|---|---|---|---|---|
personal-memory v1.1 |
272 | 97.4% | 94.4% | ≥90% / ≥85%: met |
dev-sessions v1.1 |
236 | 91.5% | 83.9% | pair consistency misses 85% |
eval/results/README.md.python eval/longmemeval.py longmemeval_s_cleaned.json --limit 78; details are in eval/results/longmemeval/README.md.playground/ has a FastAPI backend that imports this library and a React front end:
pip install -e ".[dev,jev]"
uvicorn playground.backend.app:app --port 8765 # open http://localhost:8765
The built front end is committed in playground/web/. To change it, edit playground/ui/ and rebuild:
cd playground/ui && npm ci
npm run dev # http://localhost:5173, proxies /api to the backend on :8765
npm run build # typechecks, then writes ../web
Replay mode uses the bundled recorded answers and needs no key. Live mode needs TYPESAFE_API_KEY. It is rate-limited per IP (40 calls per hour) and globally (600 per hour), and has a daily spend cap (PLAYGROUND_DAILY_CAP_USD, default $0.50). Every decision is labeled recorded, live or needs-live.
pyenv install -s 3.12 && python -m venv .venv
.venv/bin/pip install -e ".[dev,jev,mem0]"
.venv/bin/pytest -q && .venv/bin/mypy src && .venv/bin/ruff check .
Tests never call live APIs; pytest -m live runs a few real Jev calls when TYPESAFE_API_KEY is set, and OpenAI Decisions calls when OPENAI_API_KEY is set. Design decisions are in docs/decisions.md and build status is in PROGRESS.md.
Apache 2.0.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.