Haystack
A memory store for Haystack agents
A Haystack MemoryStore backed by your own Recallic server. The agent searches before it answers and adds the conversation after.
pip install "recallic-haystack[agent] @ git+https://github.com/Recallic/Recallic#subdirectory=integrations/haystack"
Python
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") # key from RECALLIC_API_KEY
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"})- Follows the MemoryStore protocol of haystack-experimental: add, search, delete, and serialization with a Secret.
- When nothing answers, search returns no memories instead of near-misses for the model to guess from.
- The agent hands over the whole conversation after each run; Recallic stores each message once.
- Tested with a real Haystack Agent run (haystack-ai 2.23 with haystack-experimental 0.19).
Settings
| Option | Default | What it does |
|---|---|---|
agent_id | haystack | Recallic agent id; each agent reads back what it wrote |
mode | server's | cautious, balanced or helpful |
store_roles | ("user",) | which message roles are stored |
Needs a running Recallic server: set one up with Docker, or deploy it to your own Render account in one click. Nothing goes through us; your data stays on your server.