agents.memory_v2¶
Memory V2 System - BaseRAGAgent-based Memory Architecture.
This package provides memory-capable agents built on BaseRAGAgent as requested:
Working Components (BaseRAGAgent-based): - UnifiedMemoryRAGAgent: Complete memory system using BaseRAGAgent - ConversationMemoryAgent: Conversation history with BaseRAGAgent - FactualMemoryAgent: Factual storage with BaseRAGAgent - PreferencesMemoryAgent: User preferences with SimpleRAGAgent - StandaloneMemoryItem: Memory model without broken dependencies
Key Features: - Real BaseRAGAgent integration with vector stores - Time-weighted retrieval for temporal queries - Multi-modal memory storage (conversation, facts, preferences) - Agent-as-tool pattern support - No mocks - all real components
Quick Start:
from haive.agents.memory_v2 import create_unified_memory_agent from langchain_core.messages import HumanMessage
# Create unified memory agent using BaseRAGAgent agent = create_unified_memory_agent(user_id=”user123”) await agent.initialize()
# Process conversation and extract memories messages = [HumanMessage(“I work at Google as a software engineer”)] result = await agent.process_conversation(messages)
# Retrieve context context = await agent.retrieve_context(“Where do I work?”)
Agent-as-Tool Pattern:
# Use memory as a tool in other agents memory_tool = UnifiedMemoryRAGAgent.as_tool(
name=”user_memory”, description=”Search user memory”
)
# Use in ReactAgent or other agents coordinator = ReactAgent(tools=[memory_tool])
Submodules¶
- agents.memory_v2.advanced_rag_memory_agent
- agents.memory_v2.conversation_memory_agent
- agents.memory_v2.extraction_prompts
- agents.memory_v2.graph_memory_agent
- agents.memory_v2.integrated_memory_system
- agents.memory_v2.kg_memory_agent
- agents.memory_v2.long_term_memory_agent
- agents.memory_v2.memory_models_standalone
- agents.memory_v2.memory_state
- agents.memory_v2.memory_state_original
- agents.memory_v2.memory_state_with_tokens
- agents.memory_v2.memory_tools
- agents.memory_v2.message_document_converter
- agents.memory_v2.multi_memory_agent
- agents.memory_v2.multi_memory_coordinator
- agents.memory_v2.multi_react_memory_system
- agents.memory_v2.rag_memory_agent
- agents.memory_v2.react_memory_agent
- agents.memory_v2.react_memory_coordinator
- agents.memory_v2.simple_memory_agent
- agents.memory_v2.simple_memory_agent_deepseek
- agents.memory_v2.standalone_memory_agent_free
- agents.memory_v2.standalone_rag_memory
- agents.memory_v2.time_weighted_retriever
- agents.memory_v2.token_tracker