Skip to main content

DEADKEY

Stop AI agents from silently committing lies — 0.14 ms CPU · 0 MiB GPU VRAM · signed Ed25519 receipts. Zero-dependency Python 3.10+ stdlib (dependencies = []) + optional Apache-2.0 Rust native core (_deadkey_core, 589,970 parallel Ed25519 batch verifications/s, 5.68–10.74 GB/s cold-to-warm Sealed KV) and standalone deadkeyd daemon.

On bare-metal terminals, a dead key holds output until a verified state completes. In Deadkey, nothing commits until the receipt locks.

Deadkey 15-Second Terminal Proof


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)

5 Independent Architectures Rescued to 100.0%

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

4-Bit Quant and Q4_0 KV Study across 4K, 16K, and 32K Tokens

  • Honest Myth-Busting Finding (data/sprint2_4bit_silent_drift_study_v1.json, N=180 across 5 configs × 4K/16K/32K, 12 stratified probes reused across cells):
    • Switching F16 KV → Q4_0 KV (allocated for 32K long-context evaluation) saved 1,632 MiB VRAM on Qwen3.8-27B NVFP4 (21,785 → 20,153 MiB) and 4,366 MiB VRAM on Devstral-24B (20,457 → 16,091 MiB) with no detectable accuracy drop (+2 / 0 across N=12 paired probes per tier) (Qwen3.8 NVFP4: 31/36 F16 KV vs 33/36 Q4_0 KV; Devstral-24B: 15/36 vs 15/36).
    • The real silent killer was baseline false-commit rate (54 silent lies raw across N=180, including 41/54 on Devstral-24B). Pairing NVFP4 + Q4_0 KV with Deadkey's 0.21–0.88 ms per-tier median CPU verifier (0.508 ms overall median, max 1.094 ms) gave BOTH the 4.37 GB VRAM savings AND 180/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), with 180/180 Ed25519 ledger entries verified in 8.02 ms.

Multi-Arch Agent Efficiency and 9950X3D Split-Brain Affinity

  • Tokens-Per-Successful-Task & 9950X3D Split-Brain Affinity (data/sprint2_agent_efficiency_affinity_v1.json, N=12 real sandboxed tool tasks, 48/48 Ed25519 OK in 6.69 ms):
    • Devstral-24B won wall-clock & token efficiency (12/12, 88.2 ctok/succ, 1.00 s/succ) despite slowest raw 100.8 t/s — beating Qwen3.8-27B NVFP4+MTP (12/12, 167.6 ctok/succ, 1.32 s/succ @ 187.3 t/s) and Inkling-2-Mini-pi-adapted (12/12, 413.9 ctok/succ, -18.7% vs matched stock 509.2 ctok/succ, 11/12).
    • 9950X3D Split-Brain Boundary (OS GetProcessAffinityMask verified): Pinning 64 MiB vector recall to CCD0 (96 MiB 3D V-Cache 0x5555) and LLM to CCD1 (0xffff0000) doubled vector speed 2.00× (0.455 → 0.227 ms) with flat decode (228.58 vs 224.96 t/s) on hybrid CPU+GPU 125B MoE, while on a 100%-VRAM llama-server it boosted vector recall 1.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, receipt data/ed25519_ledger_bench_v1.json):
    • Pure Python 3.10+ stdlib out of the box (501.0 verifications/s) with transparent optional Rust _deadkey_core v0.2.0 acceleration (ed25519-dalek v2 verify_strict + 16-core rayon batch verify): 589,970.5 batch verifications/s (1,177.6× vs pure Python), auditing a full 1,000-entry hash-chained JSONL ledger in 11.496 ms (0 MiB VRAM). Detached offline .dkreceipt.json files 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).
  • Scoped-Epoch kv-seal/v1 LMCache Plugin (deadkey/kv_seal.py, KvSealLMCacheBackend, receipt data/stage2_kv_seal_v1_lmcache_bench.json):
    • Wraps LMCache StorageBackendInterface (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/s on 16 MiB shards), RFC 8032 Ed25519 mediator signatures, and admission + async load-completion generation fences (LMCache Issue #5375 class torn-write / buffer-reclaim races).
    • On 4-arm poisoned/stale synthetic 4 MiB & 16 MiB KV shards (real LMCache backend + Linux Rust _deadkey_core): KV_SEAL_V1 caught 5/5 attack classes (3.04 ms / 5.29 ms, 5/5 Ed25519 ledger OK) vs AES-256-GCM 3/5 (blind to stale memory epochs & async races), CRC32 1/5, and STOCK 0/5.
    • Live 4-Turn vLLM + kv-seal/v1 End-to-End (data/stage2b_live_vllm_kv_seal_v1.json, sha=4250ac598b80a77c, Qwen3-8B-AWQ): Turn 1 admitted 16 MiB shard (900s policy) → Turn 2 unrelated ui_theme write stayed HIT (0% thrash, 0 resets) → Turn 3 policy supersede (900 → 300s) fired live POST /reset_prefix_cache HTTP 200 + live recompute (300) + post-reset clean verify → Turn 4 1-bit tamper & injected #5375 race fired live POST /reset_prefix_cache HTTP 200 + clean recovery (100% Rust Ed25519 ledger verified).
  • Live vLLM & SGLang & llama.cpp Sealed 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 MemoryStore epochs (5.68 GB/s cold / 10.74 GB/s warm on bare-metal Linux 990 PRO; 7.24 GB/s Tier B 16T Rust audit on real 1.60 GB 31B KV file).
    • Live vLLM parity (data/phase3b_live_vllm_dkkv_guard_v1.json, vllm/vllm-openai:latest, Qwen3-8B-AWQ, Rust _deadkey_core v0.2.0): 67,108,864 B clean verify in 24.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 live POST /reset_prefix_cache (HTTP 200 {"success":true}) + 5/5 Ed25519 ledger audit in 0.304 ms.
    • Live SGLang parity (data/phase3a_live_sglang_dkkv_guard_v1.json, lmsysorg/sglang:latest): Verified stale epoch (-9) & 1-bit tamper (-12) triggering live POST /flush_cache (HTTP 200) + 5/5 Ed25519 ledger.

4. Bi-Temporal World-Model Memory (3-Arch LongMemEval-V2 N=399 & ICLR 2025 N=312, 0 MiB VRAM)

Multi-Arch LongMemEval-V2 Locked test_sealed N=399 Proof

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), BLAKE2s slot_fp, ProvenanceLattice Merkle root, and Split-Conformal threshold tau. On a powered N=100 Dual-GPU 58B relay (data/ receipts), 64B DK-v2 frames steering llama.cpp#33268 hit 100/100 (50/50 grounded, 50/50 traps; 15W/0L vs Solo p=6.10e-5, 8W/0L vs Static Cliff p=0.00781) at 8.14× smaller wire and 4.41× faster audit than English peer relays.
  • Optional Rust Native Core (rust/deadkey-core, rust/deadkeyd): Build locally with maturin build --manifest-path rust/deadkey-py/Cargo.toml --release or install prebuilt wheels from GitHub Releases. Set DEADKEY_PURE_PYTHON=1 at 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 by deadkey-init)
    • OpenAI / NVIDIA NIM / TRT-LLM / vLLM / SGLang Proxy: deadkey-proxy --provider nvidia_nim_local --port 8788 (loopback-locked NVIDIA_API_KEY bind guard; emits X-Deadkey-Gate-Passed, X-Deadkey-Wire-Hex, X-Deadkey-Audit-Hash)
    • NVIDIA NeMo Relay grpc-v1 Worker: pip install 'deadkey[nemo-relay]' → deadkey-relay-worker --print-manifest (live verified against nemo-relay-plugin==0.11.2)
    • TTL Multi-Agent GPU & Lane Leases: deadkey/lab_leases.py (LabLeaseLedger, preventing VRAM & file-lane collisions)

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 MiB VRAM). DK-KV builds on prior KV integrity/governance work including kvcache_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, .dkkv detects 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 KiB CVEC lifts Qwen3-8B traps at s=1.8 (p=0.0312) but collapses grounded LongMemEval 75.6% → 44.9% at s=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 4 Qwen3-8B checkpoints (Base, DPO, GRPO, DPO+GRPO) to talk themselves into adversarial compliance (25%–37.5% raw), while Deadkey's external latch stayed invariant at 24/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 delivers 2.00× vector speedup with flat decode.

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)

Source distribution for deadkey 2.3.1
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)

Table of built distributions (wheels) for deadkey 2.3.1
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page