import { IMemoryUnit, MemoryFilter } from './base'; import { z } from 'zod'; /** * Main entry point for the agent's memory system. * Provides a simple interface for agents to store and retrieve memories, * while handling the complexity of memory management internally. */ export declare class AgentMemorySystem { private workingMemory; private episodicMemory; private semanticMemory; private proceduralMemory; private ephemeralMemory; private transitionManager; private contextManager; private logger; constructor(); private setupEventHandlers; /** * Remember something. The memory system will automatically determine * where and how to store it based on its characteristics. * All input first goes to ephemeral memory, then gets processed by memory handlers * based on events from MemoryTransitionManager. * @param content The content to remember * @param schema Optional schema for the content * @param metadata Optional metadata for the content * @param sessionId Optional session ID to associate with the memory */ remember(content: C | string, schema?: z.ZodSchema, metadata?: Map, sessionId?: string): Promise; /** * Update agent's session context with new information */ updateContext(key: string, value: any): Promise; /** * Recall memories based on a query. The memory system will search * across all relevant memory stores. */ recall(query: string | MemoryFilter): Promise; /** * Rank memories by their relevance, recency, and contextual alignment */ private rankMemories; /** * Calculate how well a memory aligns with current context */ private calculateContextualAlignment; /** * Forget a specific memory or set of memories */ forget(idOrFilter: string | MemoryFilter): Promise; /** * Process a user's message/action, marking the end of a user turn */ processUserTurn(input: string): Promise; /** * Process assistant's response, marking the end of an assistant turn */ processAssistantTurn(response: string): Promise; /** * Recall recent messages in OpenAI chat completion format * @param sessionId Optional session ID to filter messages by * @param limit Optional number of messages to return * @returns Array of messages in OpenAI format {role, content} */ recallRecentMessages(sessionId?: string, limit?: number): Promise>; /** * Start the memory system */ start(): void; /** * Stop the memory system */ stop(): void; }