Skip to main content

Lydite

CI License: MIT

中文文档 · User Guide · Overview · Privacy

Lydite (Lydian stone, the siliceous black touchstone used by goldsmiths to separate real gold from counterfeits) is a local-first, anchor-verified memory kernel and MCP server for AI coding agents (claude, codex, and any MCP-compatible host).

Instead of letting agents silently consolidate unverified guesses or external prompt injections into long-term memory ("memory laundering"), Lydite binds 6 structured memory kinds (state, decision, fact, preference, todo, procedure) to 4 epistemic origins (user_stated, tool_verified, agent_inferred, external_doc), enforces repository file anchors and bi-temporal validity, and injects only confirmed, non-drifted context.

Lydite touchstone memory loop

Why Lydite?

Long-horizon multi-agent coding breaks down when a new session treats stale or unvetted notes as current truth:

  • Memory laundering: unreviewed web/RAG snippets (external_doc) or speculative model summaries get saved and later recalled as authoritative user decisions.
  • Silent code drift: refactored files invalidate earlier architecture facts and runbooks, yet flat memory stores keep serving obsolete instructions.
  • Startup context bloat: dumping raw transcripts or verbose procedures into every prompt wastes tokens and degrades reasoning.

Lydite runs on zero third-party Python dependencies (Python >= 3.11 stdlib + SQLite >= 3.34 FTS5 trigram). All databases live locally under $LYDITE_HOME (~/.local/share/lydite on macOS/Linux, %LOCALAPPDATA%\Lydite on Windows).

Core capabilities

Capability Mechanism & Surface
Touchstone anti-laundering gate Pre-hash secret/PII redaction, mandatory draft staging on MCP propose_entries, derived_from origin clamping, 4-gate deterministic --auto-verify for anchored tool_verified claims, and permanent rejected tombstones.
Tri-axis grounded invalidation Bi-temporal windows (valid_from / valid_until / event_time + --as-of), LF-normalized repository file-blob & path anchors, AGM explicit retraction (retracts), and cycle-safe depends_on cascade (lydite/invalidation.py).
Two-tier lock-free recall Prompt-cache-friendly ?mode=ro Tier-1 startup briefing (lyd brief / SessionStart, <= 6,000 chars) + Tier-2 stdio MCP (lyd mcp: intent-routed hybrid RRF search, recall_procedures, get_entry, propose_entries, record_outcome).
Skills bridge & clean exit Export verified procedure entries into validated SKILL.md files (lyd export-skill), import browser chat archives (lyd import-chat), and run lossless JSONL export/import or guarded .jsonl.gz cold archival (lyd gc).

30-second quick start

Install with uv (or pip install -e . inside a Python >= 3.11 virtual environment):

uv tool install .
# Or inside a local virtualenv:
python3 -m venv .venv && ./.venv/bin/pip install -e .

Initialize your repository and wire Claude Code / Codex hooks & MCP in one step:

# Preview host config diffs first (dry-run), then apply with automatic *.bak backups:
lyd setup all
lyd init --setup all
lyd doctor

Daily workflow

  1. Work normally in claude or codex — SessionStart injects a lock-free confirmed Tier-1 briefing; agents recall procedures and propose anchored draft memories over MCP.
  2. lyd review -i — single-keypress interactive triage (y confirm, n reject, v revalidate drifted anchors, s skip, q quit), or run lyd review --project <id> --auto-verify --run for deterministic anchor verification.
  3. lyd maintain — drain queued SessionEnd transcripts into redacted transcripts.db, scan code anchors for drift, and sync optional local embeddings.

lyd CLI overview

Group Commands
Onboarding & health lyd init, lyd setup, lyd doctor, lyd config embed
Daily workflow lyd status, lyd review (-i / --auto-verify), lyd maintain
Search & recall lyd search, lyd show, lyd brief
Transcripts & web chat lyd import-chat, lyd capture, lyd sessions
Skills, views & archival lyd export-skill, lyd render-note, lyd gc, lyd export, lyd import, lyd mcp

Optional browser exporter (browser-capture/)

When an architectural discussion happens in ChatGPT or Claude on the web, the standalone Manifest V3 extension under browser-capture/ (Lydite Capture) exports selected conversations to a local .zip with zero third-party JS libraries. Import it straight into Lydite's redacted fallback transcript store with:

lyd import-chat ~/Downloads/lydite-chatgpt-20261205T000000Z.zip --project my-repo

Verification & evaluation

python -m unittest discover -s tests -v
python eval/continuity_eval.py
python eval/ablation_runner.py --include-m4-plus
python -B browser-capture/tests/test_extension.py
python tools/check_public_tree.py

License

MIT. See LICENSE.

Metadata

Release files for lydite 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lydite 0.1.0
File Size Uploaded Provenance Actions
lydite-0.1.0.tar.gz 193.1 kB Without provenance Details for lydite-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lydite 0.1.0
File Interpreter ABI Platform Actions
lydite-0.1.0-py3-none-any.whl Python 3 none any Details for lydite-0.1.0-py3-none-any.whl

Total release size: 322.4 kB

Release files / lydite-0.1.0.tar.gz

Download URL lydite-0.1.0.tar.gz
Size 193.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9e33e8bee34788f0f9b6774110d01245658cddabac45840986d8f72e66600a32
BLAKE2b-256 checksum
How to use checksums
4e24e9d2fddb26252bad5daf16897c16b40622c5dad782f7bb406344e4bb30d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lydite-0.1.0-py3-none-any.whl

Download URL lydite-0.1.0-py3-none-any.whl
Size 129.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4830923fa3c0fda763699ec6101a5fa17b74fe884a48832c9e9cc59d46de69a6
BLAKE2b-256 checksum
How to use checksums
2c9d49f9e3a6563e369572848506d09675dd56a2a102383f5a46c37b81c4385e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lydite 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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