Skip to content

docs: add Synap managed memory integration#471

Open
visy-ani wants to merge 6 commits into
deepset-ai:mainfrom
visy-ani:add-synap-memory-integration
Open

docs: add Synap managed memory integration#471
visy-ani wants to merge 6 commits into
deepset-ai:mainfrom
visy-ani:add-synap-memory-integration

Conversation

@visy-ani
Copy link
Copy Markdown

@visy-ani visy-ani commented May 4, 2026

Adds Synap to the Haystack integrations hub as a Memory Store.

Synap is a managed memory layer for AI agents. The Haystack integration provides two native @component classes:

  • SynapRetriever: retrieves facts, preferences, and episodes from the user's Synap memory and returns them as Haystack Document objects
  • SynapMemoryWriter: records conversation turns to Synap so they are available for retrieval in future sessions

Memory is scoped to user_id and customer_id, ensuring strict isolation in multi-tenant applications.

Install: pip install maximem-synap-haystack
PyPI: https://pypi.org/project/maximem-synap-haystack/
Docs: https://docs.maximem.ai/integrations/haystack
Open source: Integration package source at maximem-ai/maximem_synap_sdk — contributions welcome

@visy-ani visy-ani requested a review from a team as a code owner May 4, 2026 08:55
Copilot AI review requested due to automatic review settings May 4, 2026 08:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new integration page to the Haystack integrations hub to document Synap as a managed “Memory Store” backend for cross-session agent memory.

Changes:

  • Adds integrations/synap.md with front matter metadata (name, repo, PyPI, issue tracker, etc.).
  • Documents installation and usage for SynapRetriever and SynapMemoryWriter, plus a “Full Pipeline Example”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread integrations/synap.md Outdated
Comment thread integrations/synap.md Outdated
Comment on lines +99 to +103
from haystack import Document, Pipeline
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from maximem_synap import MaximemSynapSDK
from synap_haystack import SynapMemoryWriter, SynapRetriever
Comment thread integrations/synap.md Outdated
Comment on lines +96 to +110
A complete retrieval-augmented pipeline that loads Synap context before the LLM and records turns afterward:

```python
from haystack import Document, Pipeline
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from maximem_synap import MaximemSynapSDK
from synap_haystack import SynapMemoryWriter, SynapRetriever

sdk = MaximemSynapSDK(api_key="sk-...")

retriever = SynapRetriever(sdk=sdk, user_id="user_123", customer_id="acme_corp")
writer = SynapMemoryWriter(
sdk=sdk, conversation_id="session_1", user_id="user_123", customer_id="acme_corp"
)
Comment thread integrations/synap.md Outdated
Comment on lines +96 to +114
A complete retrieval-augmented pipeline that loads Synap context before the LLM and records turns afterward:

```python
from haystack import Document, Pipeline
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from maximem_synap import MaximemSynapSDK
from synap_haystack import SynapMemoryWriter, SynapRetriever

sdk = MaximemSynapSDK(api_key="sk-...")

retriever = SynapRetriever(sdk=sdk, user_id="user_123", customer_id="acme_corp")
writer = SynapMemoryWriter(
sdk=sdk, conversation_id="session_1", user_id="user_123", customer_id="acme_corp"
)

pipeline = Pipeline()
pipeline.add_component("memory", retriever)
pipeline.add_component("llm", OpenAIChatGenerator(model="gpt-4o"))
Comment thread integrations/synap.md Outdated
Comment on lines +99 to +105
from haystack import Document, Pipeline
from haystack.components.builders import ChatPromptBuilder
from haystack.components.generators.chat import OpenAIChatGenerator
from maximem_synap import MaximemSynapSDK
from synap_haystack import SynapMemoryWriter, SynapRetriever

sdk = MaximemSynapSDK(api_key="sk-...")
@visy-ani
Copy link
Copy Markdown
Author

visy-ani commented May 4, 2026

Hi @kacperlukawski and @bilgeyucel — would love a review when you have a moment! This adds a SynapRetriever and SynapMemoryWriter integration page to the Haystack integrations hub.

All Copilot-flagged issues have been addressed: hardcoded API keys replaced with os.environ, unused imports removed, and the Full Pipeline Example simplified to a clean, runnable retrieval snippet. Happy to iterate on anything. Thanks!

@visy-ani
Copy link
Copy Markdown
Author

visy-ani commented May 7, 2026

Hi @kacperlukawski and @bilgeyucel 👋 — gentle follow-up on this whenever you get a moment. The page is ready for review and all bot feedback has been addressed. Happy to make any further changes you'd like. Thanks!

@visy-ani
Copy link
Copy Markdown
Author

Hi @kacperlukawski @bilgeyucel 👋 — checking in once more on this. Happy to iterate on anything that would help it land, or close it out if a Synap page isn't the right fit for the integrations hub right now. Whatever's easiest for you. Thanks!

@kacperlukawski kacperlukawski self-requested a review May 15, 2026 14:23
Copy link
Copy Markdown
Member

@kacperlukawski kacperlukawski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@visy-ani, thank you for contributing this!

I left some comments, but more generally, I think this integration should use the same interface like Mem0. We support memory stores natively, so it would be also better for our users to see Synap Memory being one of the available options, not something they cannot use directly.

Comment thread integrations/synap.md Outdated
github: maximem-ai
linkedin: https://www.linkedin.com/company/maximem/
pypi: https://pypi.org/project/maximem-synap-haystack/
repo: https://github.com/maximem-ai/maximem_synap_sdk/tree/main/packages/integrations
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we link the actual haystack integration?

Suggested change
repo: https://github.com/maximem-ai/maximem_synap_sdk/tree/main/packages/integrations
repo: https://github.com/maximem-ai/maximem_synap_sdk/tree/main/packages/integrations/synap-haystack

Comment thread integrations/synap.md
Comment on lines +18 to +25
### Table of Contents

- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)
- [SynapRetriever](#synapretriever)
- [SynapMemoryWriter](#synapmemorywriter)
- [Full Pipeline Example](#full-pipeline-example)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license of the package is missing.

@visy-ani
Copy link
Copy Markdown
Author

Thanks for the review @kacperlukawski! Both addressed in the latest push:

  • repo: now points to the synap-haystack subdirectory directly
  • Added a ## License section noting the package is Apache 2.0 (with a link to LICENSE in the SDK monorepo), plus a corresponding entry in the Table of Contents

Let me know if there's anything else.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants