Quivr + MemPalace
This is the first project slice for a future pip package. It gives a Quivr application a local, persistent memory layer backed by MemPalace.
The package deliberately keeps the model provider separate from memory. It can therefore be connected to Quivr, OpenAI, Anthropic, Ollama, or any other responder that accepts a question and a context string.
Install locally
From this directory:
python -m pip install -e ".[dev,models,ui]"
MemPalace uses a local palace by default. You can select another palace with
--palace or MEMPALACE_PALACE_PATH.
The models extra adds LangChain integrations for Groq, NVIDIA AI Endpoints
(including compatible local NVIDIA NIM servers), and Hugging Face. These
provider versions intentionally use the LangChain 0.3 generation required by
the current Quivr Core package. The Hugging Face full extra also installs the
Transformers and sentence-transformers dependencies needed for local
pipelines and embeddings.
The ui extra adds Gradio for the browser-based RAG test interface.
Run the Gradio RAG UI
From CMD:
quivr-rag-ui
Then open http://127.0.0.1:7860. Choose Groq or NVIDIA NIM, enter a question,
and click Ask. The interface displays the retrieved MemPalace context and
stores the completed user/assistant turn. Click Recall memories to test only
the retrieval stage without making an LLM request.
If the quivr-rag-ui command is not recognized, run it as a Python module:
python -m quivr_mempalace.gradio_app
To run the Quivr Core RAG test separately:
cd /d C:\Users\GauravSarma\Downloads\quivr-main\quivr-main
python -m pip install -e core
python -m pytest core\tests\test_quivr_rag.py -v
The Core install is required because the RAG tests import Quivr Core's full
dependency set, including rapidfuzz.
Configure Groq and NVIDIA NIM
The project includes a local .env file with empty credential placeholders and
an .env.example template. Edit the local file from CMD:
if not exist .env copy .env.example .env
notepad .env
Set GROQ_API_KEY for Groq. For NVIDIA, set NVIDIA_API_KEY when using the
hosted NVIDIA API Catalog, or set NVIDIA_BASE_URL to your self-hosted NIM URL,
such as http://localhost:8000/v1. Keep .env private; it is excluded by
.gitignore.
Try the memory CLI
quivr-memory remember \
--wing quivr-demo \
--room preferences \
"I prefer concise answers with Python examples."
quivr-memory search "How should answers be written?" --wing quivr-demo
quivr-memory wake-up --wing quivr-demo
Memories are stored verbatim. The same wing, room, and content produce the same ID, so retrying a write does not create a duplicate drawer.
Use it from Python
from quivr_mempalace import MemoryAwareAssistant, MempalaceMemoryStore
store = MempalaceMemoryStore(palace_path="~/.mempalace/palace", wing="my-app")
assistant = MemoryAwareAssistant(
store=store,
wing="my-app",
room="conversation",
responder=lambda question, context: my_model(question, context),
)
answer = assistant.ask("What style do I prefer?")
print(answer)
responder is intentionally a two-argument callable. A Quivr adapter can
be created with QuivrBrainResponder(brain); it forwards question to
Brain.ask(...) and places the recalled context in the system prompt. The
memory package does not force a particular LLM or API key.
For LangChain models, use LangChainResponder. It works with any LangChain
model that exposes invoke, including ChatGroq, ChatNVIDIA,
HuggingFacePipeline, and ChatHuggingFace.
from langchain_groq import ChatGroq
from quivr_mempalace import LangChainResponder
model = ChatGroq(model="llama-3.3-70b-versatile", temperature=0)
assistant = MemoryAwareAssistant(
store=store,
wing="my-app",
responder=LangChainResponder(model),
)
For NVIDIA, use:
from quivr_mempalace import create_nvidia_model
model = create_nvidia_model()
For Groq, use:
from quivr_mempalace import create_groq_model
model = create_groq_model()
Both models can be passed to LangChainResponder(model).
For Hugging Face, create a HuggingFacePipeline or ChatHuggingFace from
langchain_huggingface and pass it to LangChainResponder.
from quivr_mempalace import QuivrBrainResponder
assistant = MemoryAwareAssistant(
store=store,
wing="my-app",
responder=QuivrBrainResponder(brain),
)
Next packaging step
Before publishing, choose your final distribution/import name, add project
metadata such as author and repository URLs, and add the LLM adapter you want
to support. The package is already structured as a standalone Hatch project so
that the later python -m build / twine upload flow is straightforward.
Metadata
Release files for quivr-mempalace 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quivr_mempalace-0.1.0.tar.gz | 11.3 kB | Without provenance | Details for quivr_mempalace-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quivr_mempalace-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for quivr_mempalace-0.1.0-py3-none-any.whl |
Total release size: 25.1 kB
Release files / quivr_mempalace-0.1.0.tar.gz
| Download URL | quivr_mempalace-0.1.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1f595260d2c8a193842190a4d787805c2e77503765bba75552c63f4fa164196
|
|
BLAKE2b-256 checksum How to use checksums |
54c142b8d822ff98f044cb7b7f0ba7d94d76be5fc0f2a754b579ca36f6c94605
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / quivr_mempalace-0.1.0-py3-none-any.whl
| Download URL | quivr_mempalace-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49ae37b5b2bd415a42560a8856562bfd6ba94cfef7d8efab7bcf2e6cb1bbb121
|
|
BLAKE2b-256 checksum How to use checksums |
f2f7294ebfd771102b85492d81082f3efe4d0ebf3b9bcee885c2c6b4e99f28cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for quivr-mempalace 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.