lethe-memory
Python bindings to the Rust core of lethe, a self-improving memory store for LLM agents. Built with PyO3 + maturin, distributed as wheels.
Install
pip install lethe-memory
Use
from lethe_memory import MemoryStore
store = MemoryStore("./my_memories") # encoders default to MiniLM
store.add("I prefer window seats on flights", session_id="trip")
store.add("My wife needs aisle seats", session_id="trip")
store.add("I work at Google as a software engineer", session_id="work")
for hit in store.retrieve("What are my travel preferences?", k=5):
print(f" [{hit.score:.1f}] {hit.content}")
store.save()
The wheel ships the Rust lethe-core retrieval pipeline (BM25 + dense
hybrid, cross-encoder rerank, clustered RIF), the same code path the CLI
uses, exposed via PyO3 with Python::allow_threads around all native
work so multi-threaded Python callers see real parallelism.
Constructor knobs
MemoryStore(
path,
bi_encoder="Xenova/all-MiniLM-L6-v2",
cross_encoder="Xenova/ms-marco-MiniLM-L-6-v2",
rif_config=None, # RIFConfig(n_clusters=30, ...)
k_shallow=30,
k_deep=100,
confidence_threshold=4.0,
dedup_threshold=0.95,
)
See also
- Project landing page: architecture, benchmarks, research journey
lethe-cli(Homebrew:lethe): the standalone CLI
License: MIT.
Metadata
Release files for lethe-memory 0.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lethe_memory-0.17.0-cp39-abi3-win_arm64.whl | CPython 3.9 | abi3 | Windows ARM64 | Details for lethe_memory-0.17.0-cp39-abi3-win_arm64.whl |
| lethe_memory-0.17.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for lethe_memory-0.17.0-cp39-abi3-win_amd64.whl |
| lethe_memory-0.17.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for lethe_memory-0.17.0-cp39-abi3-macosx_11_0_arm64.whl |
Total release size: 90.6 MB
Release files / lethe_memory-0.17.0-cp39-abi3-win_arm64.whl
| Download URL | lethe_memory-0.17.0-cp39-abi3-win_arm64.whl |
|---|---|
| Size | 23.2 MB |
| Tags | CPython 3.9 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
db801382fd162a0d971c1ac5a2f40d0deedfc0fd13beb4f8d2f79ae17f8b658a
|
|
BLAKE2b-256 checksum How to use checksums |
a29d06e47049928e714d7ae1a984dcb56205276ebb1c243bd458214257e509f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 15, 2026.
Transparency logRelease files / lethe_memory-0.17.0-cp39-abi3-win_amd64.whl
| Download URL | lethe_memory-0.17.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8a5858092fb0f6559e9458f30ef6cc4c89389f58944f6115e2dffd589bf7c233
|
|
BLAKE2b-256 checksum How to use checksums |
6b68a9f786529bc48c447d7befbd615802123190aac1242d2a9e7b0365a4274f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 15, 2026.
Transparency logRelease files / lethe_memory-0.17.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | lethe_memory-0.17.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 44.3 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
fe62c22cfe95861c1fe9a87837f649bf06b1c8fcc63a13f8ddb44e83116daa69
|
|
BLAKE2b-256 checksum How to use checksums |
cdc5eb987c030d0c01da274752747b0f77355cc20999417408db12c29b26cb22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 15, 2026.
Transparency logSecurity for lethe-memory 0.17.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.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for lethe_memory-0.17.0-cp39-abi3-win_arm64.whl
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 Jul 15, 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.