Local-first, encrypted persistent memory for Haystack 2.x pipelines — backed by Perseus Vault.
Project description
perseus-vault-haystack
Local-first, encrypted persistent memory for Haystack 2.x pipelines, backed by Perseus Vault (formerly "Mimir"/"Mneme").
Perseus Vault is an open-source (MIT) memory engine that runs entirely on your machine, stores data in an encrypted SQLite database, and exposes 40+ tools over the Model Context Protocol (MCP). This package wraps Perseus Vault's remember / recall / forget tools as Haystack components so your pipelines can persist and retrieve documents across runs — no external vector database or API key required.
Components
| Class | Type | Role |
|---|---|---|
PerseusVaultMemoryStore |
Memory store | Owns the perseus-vault subprocess and config; holds add_memories / search_memories / delete_all_memories. |
PerseusVaultMemoryWriter |
@component |
Pipeline sink that persists Documents into the store. |
PerseusVaultMemoryRetriever |
@component |
Pipeline source that retrieves the most relevant Documents for a query. |
Prerequisite: the perseus-vault binary
These components talk to a local perseus-vault executable over stdio. Install it first:
- Download a pre-built binary from the Perseus Vault releases page (or build from source).
- Put it on your
$PATH(soperseus-vaultresolves), or pass its absolute path viaperseus_vault_binary=.
You can verify it works with:
perseus-vault --version
Install
pip install perseus-vault-haystack
This pulls in haystack-ai. The perseus-vault binary is a separate, language-agnostic dependency (see above).
Quickstart — write then read in a pipeline
from haystack import Pipeline, Document
from perseus_vault_haystack import (
PerseusVaultMemoryStore,
PerseusVaultMemoryWriter,
PerseusVaultMemoryRetriever,
)
# One store, shared by both components (single perseus-vault subprocess).
store = PerseusVaultMemoryStore(db_path="~/.mimir/haystack.db", category="docs")
# --- Write documents into persistent memory ---
write_pipe = Pipeline()
write_pipe.add_component("writer", PerseusVaultMemoryWriter(memory_store=store))
write_pipe.run(
{
"writer": {
"documents": [
Document(content="Perseus Vault is a local-first, encrypted memory engine."),
Document(content="Haystack is an open-source LLM framework by deepset."),
]
}
}
)
# --- Retrieve them later (even in a separate process / run) ---
read_pipe = Pipeline()
read_pipe.add_component("retriever", PerseusVaultMemoryRetriever(memory_store=store, top_k=3))
result = read_pipe.run({"retriever": {"query": "What is Perseus Vault?"}})
for doc in result["retriever"]["documents"]:
print(doc.score, doc.content)
Because Perseus Vault persists to an encrypted SQLite file, documents written in one run are available in any future run pointed at the same db_path.
Use directly (without a pipeline)
from haystack import Document
from perseus_vault_haystack import PerseusVaultMemoryStore
store = PerseusVaultMemoryStore(db_path="~/.mimir/haystack.db")
store.add_memories([Document(content="Remember this fact.")])
hits = store.search_memories("fact", top_k=5)
Configuration
PerseusVaultMemoryStore accepts:
db_path— path to the Perseus Vault SQLite database (default~/.mimir/haystack.db).perseus_vault_binary— name on$PATHor absolute path to the executable (defaultperseus-vault).category— Perseus Vault category scoping all writes/recalls for this store (defaulthaystack-memory). Use distinct categories to isolate corpora.top_k— default number of documents returned by retrieval (default10).timeout_s— per-RPC timeout for the subprocess (default30).
Serialization
All three classes implement to_dict() / from_dict() and round-trip through Pipeline.dumps() / Pipeline.loads().
License
MIT © 2026 Perseus Computing LLC. Perseus Vault (formerly Mimir/Mneme) is also MIT-licensed.
Project details
Release history Release notifications | RSS feed
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 perseus_vault_haystack-0.1.0.tar.gz.
File metadata
- Download URL: perseus_vault_haystack-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f25d54bc45c9fea8ed85e70beaae499aab71c1a4bbedddb3eba80d1ed5c55c2b
|
|
| MD5 |
8ea14fff2df058905dc65faa93010161
|
|
| BLAKE2b-256 |
41d555c856d464616e9fefde7e284d2c595f5252bfdb0409c244eaf2638ba8d2
|
Provenance
The following attestation bundles were made for perseus_vault_haystack-0.1.0.tar.gz:
Publisher:
publish.yml on Perseus-Computing-LLC/mimir-haystack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perseus_vault_haystack-0.1.0.tar.gz -
Subject digest:
f25d54bc45c9fea8ed85e70beaae499aab71c1a4bbedddb3eba80d1ed5c55c2b - Sigstore transparency entry: 2072341012
- Sigstore integration time:
-
Permalink:
Perseus-Computing-LLC/mimir-haystack@d45709d8bf6f5944e227510b36ea9be38ad35944 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Perseus-Computing-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d45709d8bf6f5944e227510b36ea9be38ad35944 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file perseus_vault_haystack-0.1.0-py3-none-any.whl.
File metadata
- Download URL: perseus_vault_haystack-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8377c2a93654b15827de7e7ca0436161490361abc535e85b5d968679e0dba785
|
|
| MD5 |
4050d36c9dde6c0372cf2daefbe71318
|
|
| BLAKE2b-256 |
7acfd4a783744f29ce4fe1f56123d3fd33d54935d79bc104f23097574f61b573
|
Provenance
The following attestation bundles were made for perseus_vault_haystack-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Perseus-Computing-LLC/mimir-haystack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perseus_vault_haystack-0.1.0-py3-none-any.whl -
Subject digest:
8377c2a93654b15827de7e7ca0436161490361abc535e85b5d968679e0dba785 - Sigstore transparency entry: 2072341057
- Sigstore integration time:
-
Permalink:
Perseus-Computing-LLC/mimir-haystack@d45709d8bf6f5944e227510b36ea9be38ad35944 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Perseus-Computing-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d45709d8bf6f5944e227510b36ea9be38ad35944 -
Trigger Event:
workflow_dispatch
-
Statement type: