Install
What’s included
synap-langchain provides four drop-in components:
| Class | Purpose |
|---|---|
SynapChatMessageHistory | Persistent chat history via BaseChatMessageHistory |
SynapCallbackHandler | Auto-records every LLM turn via LangChain callbacks |
SynapRetriever | Semantic retriever that returns Synap memories as Document objects |
SynapSearchTool, SynapStoreTool | Agent-callable tools for explicit memory read/write |
SynapChatMessageHistory
Plug intoRunnableWithMessageHistory to give any chain persistent memory across sessions.
SynapCallbackHandler
Attach to any chain or agent to automatically ingest every conversation turn without changing your application logic.ERROR level and do not raise — your chain always completes.
SynapRetriever
Use as a standard LangChain retriever in RAG pipelines orConversationalRetrievalChain.
SynapSearchTool and SynapStoreTool
Give agents explicit control over memory read and write.Next steps
LangGraph
Checkpointer and store for LangGraph state graphs.
SDK Ingestion
Direct ingestion API for custom pipelines.