memhq-llamaindex
MemHQ adapter for LlamaIndex (Python). Drop-in chat memory and retriever backed by the MemHQ hosted API. Sync and async both supported.
Install
pip install memhq-llamaindex
Quickstart — Chat memory
import os
from llama_index.llms.openai import OpenAI
from llama_index.core.agent import ReActAgent
from memhq_llamaindex import MemHQMemory
memory = MemHQMemory(
api_key=os.environ["MEMHQ_API_KEY"],
session_id="conv_42",
user_id="user_42",
)
agent = ReActAgent.from_tools(
tools=[],
llm=OpenAI(model="gpt-4o-mini"),
memory=memory,
)
reply = agent.chat("What's my favorite coffee order?")
Quickstart — Retriever
from llama_index.core.query_engine import RetrieverQueryEngine
from memhq_llamaindex import MemHQRetriever
retriever = MemHQRetriever(
api_key=os.environ["MEMHQ_API_KEY"],
user_id="user_42",
limit=8,
)
engine = RetrieverQueryEngine.from_args(retriever)
answer = engine.query("Summarize pricing discussion")
Configuration
| Argument | Description |
|---|---|
api_key |
MemHQ project API key. Falls back to MEMHQ_API_KEY. |
user_id |
External user id. Required. |
session_id |
Thread anchor for the memory adapter. |
recall_limit |
Memories surfaced per memory read. Default 10. |
limit |
Memories returned per retriever query. Default 10. |
mode |
"hybrid" (default), "vector", or "lexical". |
base_url |
Override the API base. |
Reference
Full reference: https://docs.memhq.ai/sdks/llamaindex-py
Metadata
Release files for memhq-llamaindex 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 |
|---|---|---|---|---|
| memhq_llamaindex-0.1.0.tar.gz | 8.8 kB | Without provenance | Details for memhq_llamaindex-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memhq_llamaindex-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for memhq_llamaindex-0.1.0-py3-none-any.whl |
Total release size: 18.9 kB
Release files / memhq_llamaindex-0.1.0.tar.gz
| Download URL | memhq_llamaindex-0.1.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d45ea545219775ee785b7485daab38f48f24d9f31b88c18ae3b20b044768f56
|
|
BLAKE2b-256 checksum How to use checksums |
a4a1161b6253744304b9e0049da359328048b74bb1aafb9855b744746262876f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Release files / memhq_llamaindex-0.1.0-py3-none-any.whl
| Download URL | memhq_llamaindex-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cbdd1a9549c77419442cde1cf9e825f80d1820e9fd393e137f14de2775d4193
|
|
BLAKE2b-256 checksum How to use checksums |
9166c33f1dac3b27bdcb8e2725a1075d53d1c46b9210a3a9a65f85e46e72168e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.8
|
Security for memhq-llamaindex 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.