haive.core.engine.retriever.providers.ZepRetrieverConfig¶
Zep Retriever implementation for the Haive framework.
from typing import Any This module provides a configuration class for the Zep retriever, which retrieves conversation history and memory from Zep’s long-term memory store. Zep is designed for storing, searching, and enriching conversational AI chat histories with metadata, summaries, and semantic search capabilities.
The ZepRetriever works by: 1. Connecting to a Zep memory store 2. Searching conversation history using semantic similarity 3. Retrieving relevant chat messages and context 4. Providing conversation memory for AI applications
This retriever is particularly useful when: - Building conversational AI applications with long-term memory - Need to retrieve relevant conversation history - Want to maintain context across multiple chat sessions - Building customer support or chatbot applications - Creating personalized AI assistants with memory
The implementation integrates with LangChain’s ZepRetriever while providing a consistent Haive configuration interface with secure API key management.
Classes¶
Configuration for Zep retriever in the Haive framework. |
Module Contents¶
- class haive.core.engine.retriever.providers.ZepRetrieverConfig.ZepRetrieverConfig[source]¶
Bases:
haive.core.common.mixins.secure_config.SecureConfigMixin
,haive.core.engine.retriever.retriever.BaseRetrieverConfig
Configuration for Zep retriever in the Haive framework.
This retriever searches conversational memory stored in Zep and returns relevant chat history and context for AI applications.
- retriever_type¶
The type of retriever (always ZEP).
- Type:
- api_key¶
Zep API key (auto-resolved from ZEP_API_KEY).
- Type:
Optional[SecretStr]
Examples
>>> from haive.core.engine.retriever import ZepRetrieverConfig >>> >>> # Create the Zep retriever config >>> config = ZepRetrieverConfig( ... name="zep_retriever", ... session_id="user-123-session", ... url="http://localhost:8000", ... top_k=10, ... search_type="similarity", ... search_scope="messages" ... ) >>> >>> # Instantiate and use the retriever >>> retriever = config.instantiate() >>> docs = retriever.get_relevant_documents("what did we discuss about machine learning?") >>> >>> # Example for summary search >>> summary_config = ZepRetrieverConfig( ... name="zep_summary_retriever", ... session_id="user-123-session", ... url="http://localhost:8000", ... search_scope="summary", ... top_k=5 ... )
- instantiate()[source]¶
Create a Zep retriever from this configuration.
- Returns:
Instantiated retriever ready for memory search.
- Return type:
ZepRetriever
- Raises:
ImportError – If required packages are not available.
ValueError – If session configuration is invalid.