agents.memory_v2.multi_memory_agentΒΆ
MultiMemoryAgent - Coordinates different memory strategies.
This agent acts as a meta-coordinator that routes queries to different specialized memory agents based on query type, context, and memory strategy optimization.
ClassesΒΆ
Priority levels for memory processing. |
|
Rule for routing queries to specific memory strategies. |
|
Types of memory strategies available. |
|
Agent that coordinates multiple memory strategies. |
|
Configuration for MultiMemoryAgent. |
|
Extended state for MultiMemoryAgent with routing information. |
|
Classifies queries to determine appropriate memory strategy. |
|
Types of queries that determine memory routing. |
|
Synthesizes responses from multiple memory agents. |
FunctionsΒΆ
|
Factory function to create a MultiMemoryAgent with sensible defaults. |
Module ContentsΒΆ
- class agents.memory_v2.multi_memory_agent.MemoryPriorityΒΆ
-
Priority levels for memory processing.
Initialize self. See help(type(self)) for accurate signature.
- class agents.memory_v2.multi_memory_agent.MemoryRoutingRuleΒΆ
Rule for routing queries to specific memory strategies.
- class agents.memory_v2.multi_memory_agent.MemoryStrategyΒΆ
-
Types of memory strategies available.
Initialize self. See help(type(self)) for accurate signature.
- class agents.memory_v2.multi_memory_agent.MultiMemoryAgent(config)ΒΆ
Bases:
haive.agents.simple.agent.SimpleAgent
Agent that coordinates multiple memory strategies.
This agent acts as a smart router and coordinator for different memory approaches, automatically selecting the best strategy based on query analysis and combining responses when appropriate.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
config (MultiMemoryConfig)
- async classify_query(query)ΒΆ
Classify the query to determine appropriate memory strategy.
- async execute_strategy(strategy, query, context=None)ΒΆ
Execute the selected memory strategy.
- get_comprehensive_status()ΒΆ
Get comprehensive status of the MultiMemoryAgent.
- get_coordination_stats()ΒΆ
Get statistics about query coordination and routing.
- async query_memory_agent(agent_key, query, context=None)ΒΆ
Query a specific memory agent.
- route_query(query_type, confidence, context=None)ΒΆ
Route query to appropriate memory strategy based on classification.
- class agents.memory_v2.multi_memory_agent.MultiMemoryConfig(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Configuration for MultiMemoryAgent.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.memory_v2.multi_memory_agent.MultiMemoryStateΒΆ
Bases:
agents.memory_v2.memory_state_with_tokens.MemoryStateWithTokens
Extended state for MultiMemoryAgent with routing information.
- class agents.memory_v2.multi_memory_agent.QueryClassifier(llm_config)ΒΆ
Classifies queries to determine appropriate memory strategy.
- Parameters:
llm_config (haive.core.engine.aug_llm.AugLLMConfig)
- class agents.memory_v2.multi_memory_agent.QueryTypeΒΆ
-
Types of queries that determine memory routing.
Initialize self. See help(type(self)) for accurate signature.
- class agents.memory_v2.multi_memory_agent.ResponseSynthesizer(llm_config)ΒΆ
Synthesizes responses from multiple memory agents.
- Parameters:
llm_config (haive.core.engine.aug_llm.AugLLMConfig)
- agents.memory_v2.multi_memory_agent.create_multi_memory_agent(name='multi_memory_coordinator', enable_graph=HAS_GRAPH_MEMORY, enable_rag=HAS_RAG_MEMORY, **kwargs)ΒΆ
Factory function to create a MultiMemoryAgent with sensible defaults.
- Parameters:
- Return type: