@@ -212,6 +212,46 @@ engine = AutoSaveEngine(
212212
213213---
214214
215+ ## 🔗 Using Synapse Layer with LangChain
216+
217+ Synapse Layer integrates natively with LangChain as a chat message history backend.
218+ Every message passes through the full Cognitive Security pipeline — PII redaction,
219+ intent validation, and AES-256 encryption — before persistence.
220+
221+ ``` bash
222+ pip install synapse-layer langchain-core
223+ ```
224+
225+ ``` python
226+ from synapse_memory.integrations import SynapseChatMessageHistory
227+
228+ # Drop-in replacement for any LangChain message history
229+ history = SynapseChatMessageHistory(agent_id = " my-agent" )
230+
231+ history.add_user_message(" I prefer concise responses." )
232+ history.add_ai_message(" Got it — keeping it brief." )
233+
234+ # Retrieve messages in LangChain-compatible format
235+ messages = history.messages
236+ ```
237+
238+ Works with ` RunnableWithMessageHistory ` for LCEL chains:
239+
240+ ``` python
241+ from langchain_core.runnables.history import RunnableWithMessageHistory
242+
243+ chain_with_history = RunnableWithMessageHistory(
244+ runnable = your_chain,
245+ get_session_history = lambda sid : SynapseChatMessageHistory(
246+ agent_id = " your-agent" , session_id = sid,
247+ ),
248+ )
249+ ```
250+
251+ > ** Note:** This is the OSS adapter. Advanced scoring, enterprise retrieval
252+ > strategies, and PRO heuristics are available under separate license.
253+ > See [ synapselayer.org/docs] ( https://synapselayer.org/docs ) .
254+
215255## Competitive Comparison
216256
217257| Capability | Synapse Layer | Mem0 | Zep | pgvector (raw) |
@@ -265,7 +305,7 @@ Synapse Layer is not just a library you call — it's **infrastructure your agen
265305| Version | Status | Highlights |
266306| ---| ---| ---|
267307| ** v1.0.7** | ✅ ** Stable** | Auto-Save Engine, Plugin Architecture, MCP Bridge, Smithery listing |
268- | ** v1.1.0** | 🚧 In Progress | LangChain native adapter, CrewAI integration, embedding model selection |
308+ | ** v1.1.0** | 🚧 In Progress | ✅ LangChain native adapter, CrewAI integration, embedding model selection |
269309| ** v1.2.0** | 📋 Planned | Synapse Forge visual debugger, real-time memory inspector |
270310| ** v2.0.0** | 📋 Planned | Multi-tenant vault, team memory spaces, RBAC |
271311
0 commit comments