Skip to main content

LangChain Integration

Z3rno provides two LangChain adapters: Z3rnoChatMessageHistory for conversation memory and Z3rnoRetriever for RAG retrieval.

Installation

This installs the Z3rno SDK along with langchain-core as a dependency.

Setup

Chat Message History

Use Z3rnoChatMessageHistory as a drop-in replacement for any LangChain chat history backend. Messages are stored as episodic memories in Z3rno.

With RunnableWithMessageHistory

RAG Retriever

Use Z3rnoRetriever to search agent memories by semantic similarity and feed results into a RAG chain.

In a RAG chain

Document Metadata

Each document returned by Z3rnoRetriever includes rich metadata:

Next Steps