🌙 luminary-memory
A lightweight, self-hosted memory layer for AI agents.
Self-hosted · Private · Budget-aware · Self-maintaining
What your agent remembers is what it becomes.
Agents are only as good as what they remember. A stateless agent re-learns the same context every session — paying the same tokens, making the same mistakes. luminary-memory closes that gap with a local memory store that persists between runs, retrieves the right context on demand, and keeps itself tidy over time.
Four retrieval strategies. One fused answer. Zero cloud.
- Semantic — ONNX embeddings (384-dim, CPU, no GPU needed)
- Keyword — FTS5 BM25 (SQLite, zero config)
- Temporal — recency decay × access count
- Graph — entity co-occurrence with automatic curation
Strategies run in parallel and fuse via Reciprocal Rank Fusion (k=60) → Jaccard deduplication (0.85) → token budget (4096).
Quickstart
pip install luminary-memory
from luminary_memory import MemoryClient
client = MemoryClient(db_path="memory.db")
# store a durable fact
client.ingest("The deploy target is the staging cluster", tags=["deploy", "infra"])
# recall — four strategies fused into one ranked answer
result = client.recall("where do we deploy?")
for memory, score in zip(result.memories, result.scores):
print(f"{score:.3f} {memory.content}")
# → 0.942 The deploy target is the staging cluster
# CLI
luminary-memory add "deploy target is staging" --tags deploy
luminary-memory recall "where do we deploy?" --json
luminary-memory list
luminary-memory lifecycle
luminary-memory stats
Hermes Agent — first-class memory provider
Drop-in. Install the provider with pip install "luminary-memory[hermes]", then add
memory.provider: luminary to your Hermes config. That's it.
From the next session: auto-recall injects relevant memories every turn,
auto-save persists completed turns, and the model can call
luminary_recall / luminary_ingest / luminary_list on demand.
Two optional LLM-powered features keep the store sharp:
ingest_llm— evaluates every turn before saving: drops chit-chat, stores factual summaries instead of raw transcripts.auto_maintain— reviews the store at session end: keeps current facts, updates changed ones, deletes stale or duplicate ones.
18 settings are exposed in the Hermes dashboard for zero-hassle tuning. See hermes/README.md for the one-shot installer and full configuration.
Configuration
Every setting has a LUMINARY_* env var or a Settings object.
| Setting | Env var | Default |
|---|---|---|
backend |
LUMINARY_BACKEND |
sqlite |
db_path |
LUMINARY_DB_PATH |
luminary_memory.db |
pg_dsn |
LUMINARY_PG_DSN |
— (pgvector only) |
embedding_model |
LUMINARY_EMBEDDING_MODEL |
BAAI/bge-small-en-v1.5 |
embedding_dim |
LUMINARY_EMBEDDING_DIM |
384 |
ingest_llm |
LUMINARY_INGEST_LLM |
false |
rrf_k |
LUMINARY_RRF_K |
60 |
dedup_jaccard_threshold |
LUMINARY_DEDUP_JACCARD_THRESHOLD |
0.85 |
token_budget |
LUMINARY_TOKEN_BUDGET |
4096 |
ttl_default_seconds |
LUMINARY_TTL_DEFAULT_SECONDS |
null |
prune_min_importance |
LUMINARY_PRUNE_MIN_IMPORTANCE |
0.2 |
consolidate_jaccard_threshold |
LUMINARY_CONSOLIDATE_JACCARD_THRESHOLD |
0.9 |
consolidate_semantic |
LUMINARY_CONSOLIDATE_SEMANTIC |
true |
importance_auto |
LUMINARY_IMPORTANCE_AUTO |
true |
See hermes/SKILL.md for the full provider config table (18 settings).
Architecture
ingest(text) ──► whitelist filter ──► (LLM curation) ──► embed ──► SQLite / pgvector
recall(query) ──► semantic │ keyword │ temporal │ graph
──► RRF fusion ──► Jaccard dedup ──► token budget ──► ranked results
lifecycle() ──► cleanup (TTL) ──► consolidate (near-dupes) ──► prune (low-value)
maintenance() ──► LLM reviews store ──► keep │ update │ delete stale facts
Built-in lifecycle keeps the store lean. LLM maintenance (optional) keeps it accurate. health_score() gives you a 0-100 checkup with actionable recommendations.
Documentation
| Section | |
|---|---|
| Quickstart | Install and first use |
| Architecture | Pipelines and data flow |
| Python API | MemoryClient reference |
| CLI | All subcommands |
| Recall | Four strategies + fusion |
| Lifecycle | Cleanup, consolidation, pruning, LLM maintenance |
| Backends | SQLite vs pgvector |
| Hermes integration | Provider, config, installer |
| Roadmap | v0.2.6 → v1.0.0 |
| Benchmarks | 230 ms recall @ 5k, 0 LLM tokens |
License
Apache-2.0 © 2026 Dwiky Candra
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file luminary_memory-0.2.6.tar.gz.
File metadata
- Download URL: luminary_memory-0.2.6.tar.gz
- Upload date:
- Size: 153.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
311ff90751b98beb01408ae83265094d940ff6d629e0f6b2ba0399bfd30a4c0f
|
|
| MD5 |
3f03febb145b4eac156a8309af06d25a
|
|
| BLAKE2b-256 |
7b4dea7329b8308317b5e800bf0c6538a0752e8e0c65df7f974f05f75110dbc2
|
Provenance
The following attestation bundles were made for luminary_memory-0.2.6.tar.gz:
Publisher:
publish.yml on alertxsto/luminary-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
luminary_memory-0.2.6.tar.gz -
Subject digest:
311ff90751b98beb01408ae83265094d940ff6d629e0f6b2ba0399bfd30a4c0f - Sigstore transparency entry: 2499946961
- Sigstore integration time:
-
Permalink:
alertxsto/luminary-memory@1f36f35ce28fb94b77a00c83b2b47997705b68ac -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/alertxsto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f36f35ce28fb94b77a00c83b2b47997705b68ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file luminary_memory-0.2.6-py3-none-any.whl.
File metadata
- Download URL: luminary_memory-0.2.6-py3-none-any.whl
- Upload date:
- Size: 58.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d53695a6fffbee47d395ab1dfc82d7e05bb76faff9520adc09100d7d7ed1133
|
|
| MD5 |
ea37976cbd9f398c270ad8f8b146b670
|
|
| BLAKE2b-256 |
47ce919744eddc1358ee5f39aa229956c2654f00bba9b072d220114740fc9a73
|
Provenance
The following attestation bundles were made for luminary_memory-0.2.6-py3-none-any.whl:
Publisher:
publish.yml on alertxsto/luminary-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
luminary_memory-0.2.6-py3-none-any.whl -
Subject digest:
5d53695a6fffbee47d395ab1dfc82d7e05bb76faff9520adc09100d7d7ed1133 - Sigstore transparency entry: 2499946964
- Sigstore integration time:
-
Permalink:
alertxsto/luminary-memory@1f36f35ce28fb94b77a00c83b2b47997705b68ac -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/alertxsto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1f36f35ce28fb94b77a00c83b2b47997705b68ac -
Trigger Event:
push
-
Statement type: