The Memory class from superagentx.memory is designed to provide a persistent storage mechanism for storing and retrieving context, data, and state during interactions with agents in a pipeline. Memory allows the system to “remember” information across agent actions and queries, which is particularly useful for complex workflows or tasks that span multiple steps.

The Memory class is initialized with a configuration that defines how it interacts with the agent pipeline. It can be used to persist important data, store intermediate results, or maintain context across different stages of the agent’s execution.

Memory config Parameters

AttributeParametersDescription
Vector Store (optional)vector_storeConfiguration for the vector store. Default is Chroma db.
DB Path (optional)db_pathPath to the history database. Default Sqlite memory.
LLM Clientllm_clientConfiguration for the LLM.

Parameters

AttributeParametersDescription
Memory Configmemory_configMemory configuration
from superagentx.memory import Memory

memory = Memory(memory_config={"llm_client": llm_client})