Skip to main content

recallic-haystack: Recallic memory for Haystack agents

Formerly recallix-haystack (0.1.x); renamed with the project, nothing else changed.

RecallicMemoryStore plugs a self-hosted Recallic 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 Recallic'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; Recallic stores each message once.
  • Your data stays on your server, separated per user and per agent.

Install

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

Run Recallic (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 RECALLIC_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 recallic_haystack import RecallicMemoryStore

store = RecallicMemoryStore(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 RECALLIC_API_KEY A Haystack Secret. Role service; delete_all_memories needs role admin.
agent_id haystack Recallic 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 Recallic's relevance, trust and receipt. Without a query it returns the user's most recent memories.
  • Haystack filters are not supported (Recallic 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 Recallic server 0.2.5 or newer. add_memories sends the messages in one request per 100 on server 0.2.6 or newer, and one request per message before that.
  • 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 Recallic: RECALLIC_URL=... RECALLIC_SERVICE_KEY=rx_... [RECALLIC_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 recallic-haystack 0.2.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 recallic-haystack 0.2.0
File Size Uploaded Provenance Actions
recallic_haystack-0.2.0.tar.gz 6.6 kB Without provenance Details for recallic_haystack-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for recallic-haystack 0.2.0
File Interpreter ABI Platform Actions
recallic_haystack-0.2.0-py3-none-any.whl Python 3 none any Details for recallic_haystack-0.2.0-py3-none-any.whl

Total release size: 12.6 kB

Release files / recallic_haystack-0.2.0.tar.gz

Download URL recallic_haystack-0.2.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f078cb730fc90cfff328a73e7395461e4156db8ecf12deea3185687bda13f1c4
BLAKE2b-256 checksum
How to use checksums
f5c99e7311c0be0facfe51c34b9ff3d29424104e340217be003fe6840f5ddefb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / recallic_haystack-0.2.0-py3-none-any.whl

Download URL recallic_haystack-0.2.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b54d6ccab67b2594babec924be212695dfcab3443a19f2cc0ab2641647366e6f
BLAKE2b-256 checksum
How to use checksums
91b28cee879c2d7bbf49cd9512453342660b631e67bf65f781f5ccd490f0cf4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for recallic-haystack 0.2.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.2.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