agents.memory_v2.multi_react_memory_system

Multi-ReactAgent Memory System with specialized agents.

This advanced example shows how to coordinate multiple ReactAgents, each with specialized memory responsibilities.

Classes

MemoryType

Types of specialized memory.

MultiReactMemorySystem

Coordinate multiple specialized ReactAgents for comprehensive memory management.

Functions

example_advanced_memory_operations()

Advanced memory operations example.

example_multi_memory_system()

Example of using the multi-memory system.

Module Contents

class agents.memory_v2.multi_react_memory_system.MemoryType

Bases: str, enum.Enum

Types of specialized memory.

Initialize self. See help(type(self)) for accurate signature.

class agents.memory_v2.multi_react_memory_system.MultiReactMemorySystem(user_id='default_user', engine=None, memory_base_path=None)

Coordinate multiple specialized ReactAgents for comprehensive memory management.

This system uses: - Episodic Memory Agent: Personal experiences, events, conversations - Semantic Memory Agent: Facts, concepts, general knowledge - Procedural Memory Agent: Skills, procedures, how-to knowledge - Working Memory Agent: Current context, active tasks, short-term goals - Memory Router Agent: Determines which memory system to use

Init .

Parameters:
  • user_id (str) – [TODO: Add description]

  • engine (haive.core.engine.aug_llm.AugLLMConfig | None) – [TODO: Add description]

  • memory_base_path (str | None) – [TODO: Add description]

async consolidate_memories()

Consolidate memories across systems (move from working to long-term).

Return type:

str

async get_memory_stats()

Get statistics about memory usage.

Return type:

dict[str, Any]

async process_query(query)

Process a query using the appropriate memory systems.

Parameters:

query (str) – User query

Returns:

Dictionary with response and metadata

Return type:

dict[str, Any]

async store_memory(content, memory_type=None)

Store a memory in the appropriate system.

Parameters:
  • content (str) – Memory content to store

  • memory_type (MemoryType | None) – Optional specific memory type, otherwise auto-classified

Returns:

Confirmation message

Return type:

str

async agents.memory_v2.multi_react_memory_system.example_advanced_memory_operations()

Advanced memory operations example.

async agents.memory_v2.multi_react_memory_system.example_multi_memory_system()

Example of using the multi-memory system.