Use this file to discover all available pages before exploring further.
AG-Kit’s memory system is designed to seamlessly integrate with AI agents, providing automatic context management, persistent knowledge storage, and intelligent memory operations. This guide covers integration patterns, framework-specific implementations, and best practices.
// ❌ Wrong: Memory instance not sharedconst agent1 = new Agent({ memory: new InMemoryMemory() });const agent2 = new Agent({ memory: new InMemoryMemory() });// ✅ Correct: Shared memory instanceconst sharedMemory = new InMemoryMemory();const agent1 = new Agent({ memory: sharedMemory });const agent2 = new Agent({ memory: sharedMemory });
Session Isolation Issues
// ❌ Wrong: Same session for different usersconst agent = new Agent({ memory, sessionId: 'default' });// ✅ Correct: Unique session per userconst agent = new Agent({ memory, sessionId: `user-${userId}`});