Skip to content

feat: add dakera-haystack integration — self-hosted persistent memory for Haystack pipelines#3515

Open
ferhimedamine wants to merge 4 commits into
deepset-ai:mainfrom
ferhimedamine:feat/dakera-integration
Open

feat: add dakera-haystack integration — self-hosted persistent memory for Haystack pipelines#3515
ferhimedamine wants to merge 4 commits into
deepset-ai:mainfrom
ferhimedamine:feat/dakera-integration

Conversation

@ferhimedamine

@ferhimedamine ferhimedamine commented Jul 1, 2026

Copy link
Copy Markdown

Closes #3516

Summary

Adds a new integration package integrations/dakera/ providing self-hosted persistent vector memory for Haystack pipelines via Dakera.

Package name: dakera-haystack (following mem0-haystack, opensearch-haystack naming)
Version tag: integrations/dakera-v*

This follows the exact structure of integrations/mem0/: same pyproject.toml with hatch-vcs versioning, same src/haystack_integrations/ namespace layout, same respx-based tests (no live server needed for CI).

Components

Class Type Description
DakeraMemoryStore Store httpx REST client for Dakera API; API key via Secret or DAKERA_API_KEY env var
DakeraMemoryRetriever @component Wraps search_memories() for pipeline use; outputs memories=List[str]
DakeraMemoryWriter @component Wraps store_memories() for pipeline use; outputs memories_written=int

Usage in a Haystack pipeline

from haystack import Pipeline
from haystack.components.generators import OpenAIGenerator
from haystack_integrations.memory_stores.dakera import DakeraMemoryStore
from haystack_integrations.components.retrievers.dakera import DakeraMemoryRetriever
from haystack_integrations.components.writers.dakera import DakeraMemoryWriter

store = DakeraMemoryStore(base_url="http://localhost:3000")
retriever = DakeraMemoryRetriever(memory_store=store, top_k=5)
writer = DakeraMemoryWriter(memory_store=store)

# Retrieve relevant memories before generation
memories = retriever.run(query="What did Alice ask about?", user_id="alice")

# After generation, write the exchange back
writer.run(messages=["User: ...", "Assistant: ..."], user_id="alice")

Why Dakera vs existing memory integrations

Dakera is the only fully self-hosted option — mem0-haystack requires a cloud API key:

mem0-haystack Dakera
Hosting Cloud SaaS Self-hosted only
Data residency External Your infrastructure
Decay weighting No Yes
GDPR / air-gap No Yes

Self-host: docker run -p 3000:3000 -e DAKERA_API_KEY=key dakera/dakera:latest

Tests

Unit tests in integrations/dakera/tests/ use respx for HTTP mocking — no live Dakera server needed for CI:

cd integrations/dakera && hatch run test

Package structure

integrations/dakera/
├── pyproject.toml
├── src/haystack_integrations/
│   ├── memory_stores/dakera/
│   │   ├── __init__.py
│   │   └── dakera_memory_store.py
│   └── components/
│       ├── retrievers/dakera/
│       │   ├── __init__.py
│       │   └── retriever.py
│       └── writers/dakera/
│           ├── __init__.py
│           └── writer.py
└── tests/
    └── test_dakera_memory_store.py

New integration package: integrations/dakera/

Provides:
- DakeraMemoryStore: httpx-based client for Dakera REST API
  POST /v1/memories (store) + POST /v1/memories/search (recall)
- DakeraMemoryRetriever: @component wrapping store.search_memories()
- DakeraMemoryWriter: @component wrapping store.store_memories()
- Unit tests using respx HTTP mocking (no live server needed)

Follows the mem0-haystack package structure exactly.
Package name: dakera-haystack (pip install dakera-haystack)
Version tag: integrations/dakera-v*

Self-host: docker run -p 3000:3000 dakera/dakera:latest
@ferhimedamine ferhimedamine requested a review from a team as a code owner July 1, 2026 06:31
@ferhimedamine ferhimedamine requested review from julian-risch and removed request for a team July 1, 2026 06:31
@github-actions github-actions Bot added the type:documentation Improvements or additions to documentation label Jul 1, 2026
@ferhimedamine

Copy link
Copy Markdown
Author

Fixing the test-api-reference-build CI failure — the pyproject.toml referenced readme = "README.md" but the file was missing from the integration directory. Added integrations/dakera/README.md with full component documentation.

@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ferhimedamine

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

…build CI

The CI runs 'hatch run docs:build' which requires:
- haystack-pydoc-tools in [tool.hatch.envs.default] dependencies
- docs script in [tool.hatch.envs.default.scripts]
- pydoc/config_docusaurus.yml pointing to our public module paths

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ferhimedamine

Copy link
Copy Markdown
Author

Fixed the test-api-reference-build CI failure — the hatch run docs command was failing with docs: not found because:

  1. haystack-pydoc-tools was missing from [tool.hatch.envs.default] dependencies
  2. The docs script was missing from [tool.hatch.envs.default.scripts]
  3. pydoc/config_docusaurus.yml did not exist

Added all three in the latest commit, following the pattern from integrations/anthropic/pyproject.toml.

@ferhimedamine

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dakera-haystack integration — self-hosted persistent memory for Haystack pipelines

2 participants