/** * Interface for memory systems that agents can use to store and retrieve information */ export interface MemoryInterface { /** * Stores a memory entry * * @param memory - The memory to store * @returns Promise that resolves when storage is complete */ store(memory: MemoryEntry): Promise; /** * Retrieves memories relevant to a query * * @param query - The query to find relevant memories for * @param limit - Optional limit on number of memories to retrieve * @returns Promise resolving to an array of memory content strings */ retrieve(query: string, limit?: number): Promise; /** * Get all stored memories * * @returns Promise resolving to all memory entries */ getAll(): Promise; /** * Delete a specific memory by ID * * @param id - ID of the memory to delete * @returns Promise resolving to true if deleted, false if not found */ delete(id: string): Promise; /** * Clear all memories * * @returns Promise resolving when all memories are cleared */ clear(): Promise; } /** * Structure for a memory entry */ export interface MemoryEntry { id?: string; input: string; output: string; importance?: number; metadata?: { source?: string; category?: string; [key: string]: any; }; timestamp: number; }