Skip to main content

recallix-haystack: Recallix memory for Haystack agents

RecallixMemoryStore plugs a self-hosted Recallix server into Haystack agents as their memory store. It follows Haystack's MemoryStore protocol (haystack_experimental.memory_stores), so it drops in where the Mem0 store goes.

  • No LLM calls for memory. Storing and searching use Recallix's local models.
  • Honest search. When nothing answers the query, search_memories returns no memories instead of near-misses for the model to guess from.
  • Re-adding is safe. The agent hands over the whole conversation after each run; Recallix stores each message once.
  • Your data stays on your server, separated per user and per agent.

Install

pip install "recallix-haystack[agent]"     # haystack-ai, haystack-experimental (for Agent) and the recallix SDK

Run Recallix (quickstart) and create a key with role service (it acts for each user):

python -m backend.tools.keys create --user my-haystack-app --role service
export RECALLIX_API_KEY=rx_...

Use with a Haystack agent

from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.dataclasses import ChatMessage
from haystack_experimental.components.agents import Agent
from recallix_haystack import RecallixMemoryStore

store = RecallixMemoryStore(base_url="http://localhost:8000", mode="balanced")   # or "cautious" / "helpful"
agent = Agent(chat_generator=OpenAIChatGenerator(), memory_store=store, system_prompt="You are a helpful assistant.")

agent.run(messages=[ChatMessage.from_user("I moved to Pune in March.")], memory_store_kwargs={"user_id": "alice"})
agent.run(messages=[ChatMessage.from_user("Where did I move?")], memory_store_kwargs={"user_id": "alice"})

Or on its own: store.add_memories(messages=[...], user_id="alice"), store.search_memories(query="Where did I move?", user_id="alice", top_k=5).

Parameter Default What it does
api_key RECALLIX_API_KEY A Haystack Secret. Role service; delete_all_memories needs role admin.
agent_id haystack Recallix agent id; each agent reads back what it wrote. Can also be passed per call.
mode server's recall.mode cautious checks every answer twice; helpful answers more counting, ordering and "how long between" questions and adds a worked-out result first.
store_roles ("user",) Which message roles are stored. The default stores what users said, not the model's replies.

Notes:

  • search_memories returns system ChatMessages, like the Mem0 store; with include_memory_metadata=True each carries Recallix's relevance, trust and receipt. Without a query it returns the user's most recent memories.
  • Haystack filters are not supported (Recallix scopes by user and agent) and are ignored with a warning.
  • A message's original time can be given as meta={"timestamp": <unix seconds>}.
  • Needs Recallix server 0.2.5 or newer.
  • Tested with haystack-ai 2.23 + haystack-experimental 0.19 (store and Agent), and with haystack-ai 3.5 (store; the experimental Agent does not yet run on Haystack 3.x, which is a Haystack-side pairing, not this package). If the Agent import fails, pin haystack-ai to the release matching your haystack-experimental.

Tests

Against a running Recallix: RECALLIX_URL=... RECALLIX_SERVICE_KEY=rx_... [RECALLIX_ADMIN_KEY=rx_...] pytest tests. They include a real haystack_experimental Agent run with a scripted model.

Licence: Apache-2.0.

Metadata

Release files for recallix-haystack 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recallix-haystack 0.1.0
File Size Uploaded Provenance Actions
recallix_haystack-0.1.0.tar.gz 6.4 kB Without provenance Details for recallix_haystack-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for recallix-haystack 0.1.0
File Interpreter ABI Platform Actions
recallix_haystack-0.1.0-py3-none-any.whl Python 3 none any Details for recallix_haystack-0.1.0-py3-none-any.whl

Total release size: 12.3 kB

Release files / recallix_haystack-0.1.0.tar.gz

Download URL recallix_haystack-0.1.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
322b5393349bc1a3adab16207fe54f1cd3d159ec1768edae198704b984a62fe1
BLAKE2b-256 checksum
How to use checksums
39f2078227b00f13c54521a11fa37d2ac627fff4b6f772677b35c470fb0f4280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / recallix_haystack-0.1.0-py3-none-any.whl

Download URL recallix_haystack-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04909da3ed024fff15608edfcbbf4311d766deaae9ce676aa37fa9dccbbe2a16
BLAKE2b-256 checksum
How to use checksums
aa550f642de1f4697c0fc252b8a3b7cb9f6c91a129fc462953dcd860bfb18f25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for recallix-haystack 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page