Skip to main content

LEVH
Local-first memory layer for AI agents and humans
Memory that forgets like you do — unless it matters.

PyPI version MCP Python License LEVH documentation

Deploy on Hostinger


What is LEVH?

Your AI tools are stateless — every session starts from zero. LEVH gives them a persistent, searchable memory that lives on your machine. Plug it into Claude Desktop, Cursor, Claude Code, VS Code, or any MCP client, and it remembers your decisions, projects and people across sessions.

Most memory tools store everything and retrieve everything. LEVH forgets on purpose: every memory has its own decay curve, unused ones fade, and the ones you actually rely on are reinforced automatically. Signal rises to the top without manual curation.

Everything runs locally on SQLite. No accounts, no cloud, no external services.

Quick start

pip install levh
levh setup --client claude --profile work
levh capture "Atlas uses PostgreSQL in production."
levh serve

Dashboard and API come up on http://localhost:8000. Open Settings for copy-paste MCP configs, or run levh mcp config cursor for any supported client.

Optional, once you are set up:

levh hook install --client claude-code   # every new session starts with your memory
levh hook install                        # capture every git commit message
levh context -o CLAUDE.md                # compile memory into a context file

How it works

Every memory has its own half-life. Recalling it resets the clock and grows it, negative feedback shrinks it, and pinning skips decay entirely.

retention(t) = 0.5 ^ (hours_since_last_recall / stability_hours)

Memories are ranked by an explainable multi-factor score — semantic similarity, decay, importance and access frequency, each weight configurable. See Architecture.

What you get

  • Adaptive decay — per-memory half-life, reinforced by recall and weakened by feedback.
  • Ask your memory — natural-language answers that cite the memories they came from. Offline by default.
  • People, projects & timeline — entities extracted from your memories automatically. No manual tagging.
  • Daily briefing — what's on today, what you recently committed to, and what you're about to forget.
  • Decisions & conflicts — decisions pulled from your memories, with a review signal when two disagree. A signal, never a verdict.
  • Knowledge Wiki — a source-linked Markdown wiki built from your memories, browsable in the dashboard. It surfaces the conflict candidates LEVH already flagged, each linked to both snapshots — a candidate, never a verdict.
  • Admission gate — every memory screened before storage; duplicates flagged and secrets redacted. An ambiguous candidate is held for you, never dropped.
  • Trust & provenance — an explainable reliability score per memory. Separate from ranking; not a truth claim.
  • Mistake guard — a corrected mistake becomes a pinned rule that never decays.
  • Encrypted backup & restore — one portable snapshot, optionally encrypted.
  • Connectors — Calendar, Email, transcripts, Notion, Obsidian, GitHub, Jira, Linear, Slack, git history and local files.
  • Signed federation — explicit, pull-first memory exchange between two LEVH instances.
  • 78 MCP tools, a REST API, a WebSocket feed, and a Next.js dashboard served by the API itself — one process, one port.

Documentation

Getting Started First run and local setup
Platform Setup Claude, Cursor, VS Code, Codex and the rest
MCP Tools All 78 tools and the profile bands
REST API Every endpoint
CLI Every command
Knowledge Wiki The source-linked wiki over your memories
Architecture Layers, engine, scoring internals
Releasing Version bump, tag, automated publish

→ Installing from source · Configuration

Security

LEVH is a local, single-user tool — no accounts, no multi-tenancy.

  • Tokenless means loopback-only. Without LEVH_TOKEN, remote peers are rejected.
  • LEVH_TOKEN gates /api/*, the WebSocket and the MCP SSE transport. Set it before widening any bind. Generate one with python -c "import secrets; print(secrets.token_urlsafe(32))"; it is a value you choose, not one the server hands out.
    • If the dashboard asks you for a token, paste the same value you started the server with — whatever LEVH_TOKEN held in the shell, .env or Docker environment that ran levh serve. The server never prints it, so it is not shown anywhere; if you never set one, pick a value with the command above and restart with LEVH_TOKEN=<value> levh serve. Once set, every call needs it, including from the same machine — the token is what the dashboard is gated on, not the network distance.
  • Nothing leaves the machine without an explicit opt-in. Ask, summaries and transcript ingest stay offline until you set ANSWER_MODE=llm or SUMMARY_MODE=llm.
  • Secrets are redacted before storage, on every write path.

The MCP size profiles narrow tool discovery; read_only is enforced server-side at call time. The size profiles are not a security boundary.

Found a vulnerability? See SECURITY.md.

Contributing

Issues and pull requests are welcome — see CONTRIBUTING.md and Discussions.

License

GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).

Metadata

Release files for levh 2.38.2

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

Source distribution (sdist)

Source distribution for levh 2.38.2
File Size Uploaded Provenance Actions
levh-2.38.2.tar.gz 2.7 MB With provenance Details for levh-2.38.2.tar.gz

Built distribution (wheel)

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

Total release size: 5.3 MB

Release files / levh-2.38.2.tar.gz

Download URL levh-2.38.2.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
bce56444d4b344ba349611714b1ae98b4c9a5e057a1ac1d61b24b16648cf14eb
BLAKE2b-256 checksum
How to use checksums
d1c6c90ea342658ebaa87ecb32a82af490cc108520f8694c404294a07e72aa3b
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 Oct 29, 2026.

Transparency log

Release files / levh-2.38.2-py3-none-any.whl

Download URL levh-2.38.2-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
730830ab19e50174e189d86c3a304c4728a16d989922ef86ae9db3598c274527
BLAKE2b-256 checksum
How to use checksums
4ba84fd0e89fee46cb60a1ba695ee3dc949e2bb9dbac4c512f032140e4b7a463
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 Oct 29, 2026.

Transparency log

Security for levh 2.38.2

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 levh-2.38.2.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 Oct 29, 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