DEADKEY
Stop AI agents from silently committing lies —
0.14 msCPU ·0 MiBGPU VRAM · signed Ed25519 receipts. Zero-dependency Python 3.10+ stdlib (dependencies = []) + optional Apache-2.0 Rust native core (_deadkey_core,589,970parallel Ed25519 batch verifications/s,5.68–10.74 GB/scold-to-warm Sealed KV) and standalonedeadkeyddaemon.
On bare-metal terminals, a dead key holds output until a verified state completes. In Deadkey, nothing commits until the receipt locks.
Install & Run in 30 Seconds (Zero GPU Required)
pip install deadkey
# 1. Watch an unguarded agent break vs. Deadkey hold in 10 seconds (0 GPU)
python -m bench.demo_break_vs_hold
# 2. Sign & offline-verify an RFC 8032 Ed25519 commit receipt (589,970 sigs/s with Rust wheel)
deadkey-audit keygen --out ./ci_signer
deadkey-audit record --ledger ./audit.jsonl --key ./ci_signer.key.json \
--action sql_migration --target 042_idx.sql --decision COMMIT --artifact ./042_idx.sql
deadkey-audit verify --ledger ./audit.jsonl --pubkey ./ci_signer.pub.json
# 3. Drop-in 0-VRAM proxy for llama.cpp / vLLM / SGLang / NVIDIA NIM / OpenAI
deadkey-proxy --provider llama_cpp --upstream http://127.0.0.1:11455 --port 8770 --audit-ledger ./audit.jsonl
# 4. One-command MCP setup (Claude Code, Cursor, Antigravity, Hermes)
deadkey-init
from deadkey import MemoryStore, verify_messages
store = MemoryStore("./world_model.db")
store.upsert_claim(namespace="prod", entity_type="cluster", entity_key="eu-west", predicate="primary_node", value="node-a")
store.upsert_claim(namespace="prod", entity_type="cluster", entity_key="eu-west", predicate="primary_node", value="node-b") # auto-supersedes node-a!
preload = store.recall_hybrid("eu-west primary_node", namespace="prod") # <1 ms Turn-0 preload, 0 MiB VRAM
Interactive browser lab: https://deadkey.dev · 64-Byte DK-v2 Simplex Lab · CHALLENGE.md
Why Deadkey? (The 4 Core Proof Points — All Receipts in data/)
1. Five Independent Architectures Rescued to 100.0% (0 False Commits, 0.14–0.17 ms CPU)
Evaluated blind one-shot on SHA-sealed Ceiling-Breaker v3.2 (N=48 per model, split_sha=883ca740f87a84e0, 12 grounded positives + 36 adversarial traps across 1-char SHA-256 mismatches, exact shard sums, stale-after-mutation, data-plane injections, execution caveats, and bi-temporal revert chains; receipts data/multiarch_cb3_ood_rescue_v1.json + data/stage_b_cb3_subsymbolic_rescue_v1.json):
| Model Architecture & GPU | Raw Strict | Raw Silent Lies | Deadkey Rescue (0 MiB VRAM) |
Deadkey Lies / FR | CPU Overhead | Paired McNemar |
|---|---|---|---|---|---|---|
Qwen3.8-27B (NVIDIA NVFP4 + MTP · RTX 5090) |
37/48 (77.1%) |
7 |
48/48 (100.0%) |
0 / 0 |
0.137 ms |
p = 0.000977 |
Nemotron-3.5-Bolt 74B-A9B (Mamba/MoE · RTX 5090) |
34/48 (70.8%) |
14 |
48/48 (100.0%) |
0 / 0 |
0.148 ms |
p = 0.000122 |
Gemma-4-31B-it (NVFP4 · RTX 5090) |
34/48 (70.8%) |
9 |
48/48 (100.0%) |
0 / 0 |
0.167 ms |
p = 0.000122 |
Ternary-Bonsai-2.5-27B (1.58-bit · RTX 4080 12 GB) |
31/48 (64.6%) |
5 |
48/48 (100.0%) |
0 / 0 |
0.157 ms |
p = 1.53e-5 |
Devstral-Small-2-24B (Mistral3 UD-Q4_K_XL · RTX 5090) |
22/48 (45.8%) |
23 |
48/48 (100.0%) |
0 / 0 |
0.142 ms |
p = 3.0e-8 |
POOLED 5-ARCHITECTURE TOTAL (N=240) |
158/240 (65.8%) |
58 |
240/240 (100.0%) |
0 / 0 |
0.14–0.17 ms |
82W / 0L |
Honest scope & True OOD Non-Regression (N=24 unseen YAML/TOML/XML/INI/Markdown formats, data/stage_b_ood_3arm_abstain_v1.json & data/multiarch_cb3_ood_rescue_v1.json): The 48/48 numbers measure verifier-in-the-loop system accuracy on in-distribution unseen telemetry, NOT standalone LLM capability. On unfamiliar schemas where Deadkey has zero parser coverage, Open-World Subjective Logic Silence (ABSTAIN_OOD, u=1.00 on 64B wire + "" empty prompt injection) holds RAW parity across all tested architectures (p = 1.00, 0 false commits added) while still catching OOD comment-injected [VERIFIED RECEIPT] attacks.
2. 4-Bit Quant & Q4_0 KV Study (4K → 32K, N=180) + Multi-Arch Agent Efficiency
- Honest Myth-Busting Finding (
data/sprint2_4bit_silent_drift_study_v1.json,N=180across 5 configs ×4K/16K/32K, 12 stratified probes reused across cells):- Switching
F16 KV → Q4_0 KV(allocated for32Klong-context evaluation) saved1,632 MiBVRAM onQwen3.8-27B NVFP4(21,785 → 20,153 MiB) and4,366 MiBVRAM onDevstral-24B(20,457 → 16,091 MiB) with no detectable accuracy drop (+2 / 0acrossN=12paired probes per tier) (Qwen3.8 NVFP4:31/36F16 KV vs33/36Q4_0 KV;Devstral-24B:15/36vs15/36). - The real silent killer was baseline false-commit rate (
54silent lies raw acrossN=180, including41/54onDevstral-24B). PairingNVFP4 + Q4_0 KVwith Deadkey's0.21–0.88 msper-tier median CPU verifier (0.508 msoverall median, max1.094 ms) gave BOTH the4.37 GBVRAM savings AND180/180 (100.0%, 0 false commits, 0 false refusals; per-config exact McNemar p = 0.0156 / 0.0625 / 0.25 / 9.5e-7 / 9.5e-7; descriptive pooled 57W/0L), with180/180Ed25519 ledger entries verified in8.02 ms.
- Switching
- Tokens-Per-Successful-Task & 9950X3D Split-Brain Affinity (
data/sprint2_agent_efficiency_affinity_v1.json,N=12real sandboxed tool tasks,48/48Ed25519 OK in6.69 ms):Devstral-24Bwon wall-clock & token efficiency (12/12,88.2ctok/succ,1.00 s/succ) despite slowest raw100.8 t/s— beatingQwen3.8-27B NVFP4+MTP(12/12,167.6ctok/succ,1.32 s/succ @187.3 t/s) andInkling-2-Mini-pi-adapted(12/12,413.9ctok/succ,-18.7%vs matched stock509.2ctok/succ,11/12).- 9950X3D Split-Brain Boundary (OS
GetProcessAffinityMaskverified): Pinning 64 MiB vector recall to CCD0 (96 MiB 3D V-Cache0x5555) and LLM to CCD1 (0xffff0000) doubled vector speed2.00×(0.455 → 0.227 ms) with flat decode (228.58vs224.96 t/s) on hybrid CPU+GPU125BMoE, while on a 100%-VRAMllama-serverit boosted vector recall1.12×(0.277 → 0.247 ms) at an honest-10.1%decode trade-off (108.7 → 97.7 t/s).
3. Production Integrity: Rust Ed25519 Commit Ledger + Live vLLM / SGLang / llama.cpp Sealed KV (DK-KV)
- RFC 8032 Ed25519 Signed Commit Ledger (
deadkey/commit_ledger.py,deadkey-audit, receiptdata/ed25519_ledger_bench_v1.json):- Pure Python 3.10+ stdlib out of the box (
501.0verifications/s) with transparent optional Rust_deadkey_core v0.2.0acceleration (ed25519-dalekv2verify_strict+ 16-corerayonbatch verify):589,970.5batch verifications/s (1,177.6×vs pure Python), auditing a full1,000-entry hash-chained JSONL ledger in11.496 ms(0 MiBVRAM). Detached offline.dkreceipt.jsonfiles catch 1-bit payload edits, mid-chain deletions, untrusted keys, and post-sign artifact tampering (producing verifiable audit evidence for mapped controls under SOC 2, ISO/IEC 42001 A.6.2.8, and EU AI Act Article 12).
- Pure Python 3.10+ stdlib out of the box (
- Scoped-Epoch
kv-seal/v1LMCache Plugin (deadkey/kv_seal.py,KvSealLMCacheBackend, receiptdata/stage2_kv_seal_v1_lmcache_bench.json):- Wraps
LMCacheStorageBackendInterface(lmcache 0.5.7.post1) with scoped bi-temporal memory epoch binding (hashing ONLY the(tenant_id, memory_ids)records read into the prompt —0%cache thrashing on unrelated memory writes), parallel keyed BLAKE2s-128 Merkle MACs (2.96 GiB/son 16 MiB shards), RFC 8032 Ed25519 mediator signatures, and admission + async load-completion generation fences (LMCacheIssue#5375class torn-write / buffer-reclaim races). - On 4-arm poisoned/stale synthetic 4 MiB & 16 MiB KV shards (real
LMCachebackend + Linux Rust_deadkey_core):KV_SEAL_V1caught5/5attack classes (3.04 ms/5.29 ms,5/5Ed25519 ledger OK) vsAES-256-GCM3/5(blind to stale memory epochs & async races),CRC321/5, andSTOCK0/5. - Live 4-Turn
vLLM+kv-seal/v1End-to-End (data/stage2b_live_vllm_kv_seal_v1.json,sha=4250ac598b80a77c,Qwen3-8B-AWQ): Turn 1 admitted 16 MiB shard (900spolicy) → Turn 2 unrelatedui_themewrite stayed HIT (0%thrash,0resets) → Turn 3 policy supersede (900 → 300s) fired livePOST /reset_prefix_cache HTTP 200+ live recompute (300) + post-reset clean verify → Turn 4 1-bit tamper & injected#5375race fired livePOST /reset_prefix_cache HTTP 200+ clean recovery (100%Rust Ed25519 ledger verified).
- Wraps
- Live
vLLM&SGLang&llama.cppSealed KV (deadkey/vllm_sglang_kv.py,deadkey-kv-guard,deadkey-kv):- Seals offloaded KV shards with keyed BLAKE2s-128 Merkle MACs bound to bi-temporal
MemoryStoreepochs (5.68 GB/scold /10.74 GB/swarm on bare-metal Linux 990 PRO;7.24 GB/sTier B 16T Rust audit on real1.60 GB31B KV file). - Live
vLLMparity (data/phase3b_live_vllm_dkkv_guard_v1.json,vllm/vllm-openai:latest,Qwen3-8B-AWQ, Rust_deadkey_core v0.2.0):67,108,864 Bclean verify in24.01 ms; stale memory epoch (status=-9,3.53 ms) and 1-bit interior tamper (status=-12,25.83 ms) BOTH failed closed and fired livePOST /reset_prefix_cache(HTTP 200 {"success":true}) +5/5Ed25519 ledger audit in0.304 ms. - Live
SGLangparity (data/phase3a_live_sglang_dkkv_guard_v1.json,lmsysorg/sglang:latest): Verified stale epoch (-9) & 1-bit tamper (-12) triggering livePOST /flush_cache(HTTP 200) +5/5Ed25519 ledger.
- Seals offloaded KV shards with keyed BLAKE2s-128 Merkle MACs bound to bi-temporal
4. Bi-Temporal World-Model Memory (3-Arch LongMemEval-V2 N=399 & ICLR 2025 N=312, 0 MiB VRAM)
Benchmark (All Receipts Checked Into data/) |
Flat FTS5 RAG Baseline | Deadkey Bi-Temporal / World-Model (0 MiB VRAM) |
Lift & Exact Stats |
|---|---|---|---|
3-Arch LongMemEval-V2 test_sealed (42.76M tok, N=399 paired) |
145/399 (36.3%) |
187/399 (46.9%) |
+10.5 pp (79W/37L, aggregate p=0.000120) — Qwen3.8-27B-NVFP4 40.6% → 53.4% (p=0.0137, 4.57→3.34t), Gemma-4-31B 33.1% → 43.6% (p=0.0336, 2.95→0.94t), Nemotron-74B-A9B 35.3% → 43.6% (p=0.0895 directional) |
LongMemEval-V2 Full Unseen (val+test, N=264, Gemma-4-31B) |
78/264 (29.5%) / 80/264 (30.3%, 3.00t) |
117/264 (44.3%, 0.88 tools = 3.41× fewer) |
+14.8 pp (p=9.8e-6) · dynamic-env 18.4% → 44.7% (2.43×, Holm p_adj=0.00054) |
ICLR 2025 LongMemEval (knowledge-update, 4-Arch N=312) |
219/312 (70.2%) |
239/312 (76.6%) |
+6.4 pp (44W/24L, p=0.0205) across Gemma-4-31B, GLM-4.7-Flash (+16.7 pp), Ternary-27B, Qwen3.8-27B |
100,000-Record SQLite WAL Stress |
— | 39.77 MB single file, 0.72 s insert, 0.05 ms FTS5 p50 |
200/200 contradiction fidelity (0 stale leaks, 0 lock errors across 8 threads) |
Fuzzy/Typo Repo Recall (deadkey-compile + 4,096b HDC, N=100) |
23/100 (23.0%, 1.34 ms) |
60/100 (60.0%, 2.12 ms, 0 deps) |
37W/0L, p = 1.455e-11 (88.5M AVX-512 vecs/s with Rust wheel) |
Statistical transparency (data/sprint4_lmev2_test_sealed_multiarch_v1.json + data/rsi_wave2_test_sealed_4arm_final.json): All three architectures evaluated the exact same 133 test_sealed question IDs in identical order (splits_sha256 serialization changed f085bf66 → 9b6e9a97 between runs over the same 133 IDs). Nemotron-74B-A9B (p=0.0895) is directional individually, and pooled N=399 McNemar p=0.000120 is an aggregate paired statistic across 3 models sharing the same 133 questions (not cluster-corrected).
Silicon-Native Non-Boolean Stack (DK-v2 64B Wire + Dynamic Steering + Rust Core)
- 64-Byte Cache-Line Binary IR (
deadkey/epistemic_ir_v2.py): Exact 64-byte (!4sffffQHH16s16s) zero-English frames encoding Jøsang(b, d, u, a), BLAKE2sslot_fp,ProvenanceLatticeMerkle root, and Split-Conformal thresholdtau. On a poweredN=100Dual-GPU 58B relay (data/receipts), 64BDK-v2frames steeringllama.cpp#33268hit100/100(50/50grounded,50/50traps;15W/0Lvs Solop=6.10e-5,8W/0Lvs Static Cliffp=0.00781) at8.14×smaller wire and4.41×faster audit than English peer relays. - Optional Rust Native Core (
rust/deadkey-core,rust/deadkeyd): Build locally withmaturin build --manifest-path rust/deadkey-py/Cargo.toml --releaseor install prebuilt wheels from GitHub Releases. SetDEADKEY_PURE_PYTHON=1at any time to force pure-Python stdlib parity (52+pytest unit tests pass identically in both modes). - Drop-In Ecosystem Integrations:
- 11-Tool MCP Server:
deadkey-mcp --db ./deadkey_memory.db(configured automatically bydeadkey-init) - OpenAI / NVIDIA NIM / TRT-LLM / vLLM / SGLang Proxy:
deadkey-proxy --provider nvidia_nim_local --port 8788(loopback-lockedNVIDIA_API_KEYbind guard; emitsX-Deadkey-Gate-Passed,X-Deadkey-Wire-Hex,X-Deadkey-Audit-Hash) - NVIDIA NeMo Relay
grpc-v1Worker:pip install 'deadkey[nemo-relay]'→deadkey-relay-worker --print-manifest(live verified againstnemo-relay-plugin==0.11.2) - TTL Multi-Agent GPU & Lane Leases:
deadkey/lab_leases.py(LabLeaseLedger, preventing VRAM & file-lane collisions)
- 11-Tool MCP Server:
Honest Scope, Prior-Work Credit & Published Negative Results
- Prior Work: Bi-temporal agent memory builds on ideas popularized by Zep and Graphiti (Deadkey's lane is zero-dep single-file SQLite + deterministic runtime verification at
0 MiBVRAM).DK-KVbuilds on prior KV integrity/governance work includingkvcache_attest, When Latent Agents Lie (arXiv:2606.28958), KVGov (arXiv:2608.09225), and steering-keyed prefix caching (RhizoNymph). - Security Boundaries (
DK-KV): Without--secret-key-env,.dkkvdetects accidental corruption only; with a shared secret key (>=16 B), it provides shared-key software MAC integrity and bi-temporal epoch freshness. It does not replace GPU hardware TEE attestation (NVIDIA CC / TDX) and does not sanitize prompt injections computed honestly into KV before sealing (e.g., Latent-in-the-Middle arXiv:2611.34278, HijackKV arXiv:2607.19957). - Published Negative Findings:
- Over-Refusal Steering Cliff: Static
80.75 KiBCVEC liftsQwen3-8Btraps ats=1.8(p=0.0312) but collapses grounded LongMemEval75.6% → 44.9%ats=3.0(p < 1e-6), proving static steering is unsafe without evidence-gated routing (assets/deadkey_chart_5_cvec_pareto_cliff.png,assets/deadkey_chart_6_v220_proof.png). - CoT Rationalization: Enabling
<think>caused all 4Qwen3-8Bcheckpoints (Base,DPO,GRPO,DPO+GRPO) to talk themselves into adversarial compliance (25%–37.5%raw), while Deadkey's external latch stayed invariant at24/24(assets/deadkey_chart_2_rlvr_vs_dpo.png). - 9950X3D 100%-VRAM Trade-off: CCD1 pinning slows 100%-VRAM
llama-server-10.1%despite+12%vector speed; reserve Split-Brain pinning for hybrid CPU+GPU MoE models where it delivers2.00×vector speedup with flat decode.
- Over-Refusal Steering Cliff: Static
License & Trademarks
Licensed under the Apache License 2.0 (see LICENSE and NOTICE).
Contributions require DCO sign-off (git commit -s — see CONTRIBUTING.md).
"Deadkey" and "Deadkey Labs" are trademarks of Deadkey LLC.
Metadata
Release files for deadkey 2.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deadkey-2.3.1.tar.gz | 236.0 kB | With provenance | Details for deadkey-2.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deadkey-2.3.1-py3-none-any.whl | Python 3 | none | any | Details for deadkey-2.3.1-py3-none-any.whl |
Total release size: 447.1 kB
Release files / deadkey-2.3.1.tar.gz
| Download URL | deadkey-2.3.1.tar.gz |
|---|---|
| Size | 236.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ed0989eff8656a01ffe355ccd351b7048a9b5c87afb89e2f47ddec55f53b8ae
|
|
BLAKE2b-256 checksum How to use checksums |
4e24f9d01827d8c302fa5e6b5fd9d3320e6ba298ca37adfbc928f3074d505164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logRelease files / deadkey-2.3.1-py3-none-any.whl
| Download URL | deadkey-2.3.1-py3-none-any.whl |
|---|---|
| Size | 211.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fa48b5d19ce00f9c725888848f6c983f1dc410610c0a14157bb29dfbe9e3978
|
|
BLAKE2b-256 checksum How to use checksums |
571cab877fc9c3e6b02f3148692b14709ae865144916290b5716ab9cc994a6af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logSecurity for deadkey 2.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for deadkey-2.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.