YeagerAI Docs
  • 🤖General
    • Welcome To Yeager.ai
    • Features
    • Getting Started
    • Use Case Ideas
    • API Reference and Documentation
    • FAQ
  • 🧩Modules
    • Agents
    • Interfaces
    • Memory
    • Toolkit
Powered by GitBook
On this page
  1. Modules

Memory

Memory in YeagerAI plays a crucial role in maintaining context and storing information generated by AI agents. It is designed to be scalable and efficient, ensuring that your AI agents have access to the information they need when they need it.

YeagerAI uses a YeagerAIContext class to manage the memory of an agent. It is responsible for loading and saving session message history and creating "shadow clones" to facilitate memory management.

from yeagerai.memory import YeagerAIContext

context_memory = YeagerAIContext(username="John Doe", session_id="example_session", session_path="path/to/sessions")
context_memory.load_session_message_history()

The KageBunshinNoJutsu class serves as a callback handler to manage safe loading and memory tasks. It initializes with a YeagerAIContext instance and handles various events, such as agent finish, LLM (Language Model) end, and chain end, to ensure proper memory management throughout the agent's lifecycle.

from yeagerai.memory import KageBunshinNoJutsu

kage_bunshin = KageBunshinNoJutsu(context_memory=context_memory)

In summary, YeagerAI's memory management system ensures that your AI agents have a reliable and efficient way to store and retrieve information, facilitating learning and improvement over time.

PreviousInterfacesNextToolkit

Last updated 2 years ago

🧩