UNPKG

ai-memory-sdk

Version:

TypeScript SDK for using Letta subagents for pluggable memory management

33 lines (32 loc) 1.28 kB
export interface MemoryConfig { lettaApiKey?: string; } export declare class Memory { private lettaClient; constructor(config?: MemoryConfig); private createSleeptimeAgent; private getMatchingAgent; private createContextBlock; private listContextBlocks; private deleteContextBlock; private deleteAgent; private learnMessages; private formatBlock; private getRunStatus; waitForRun(runId: string): Promise<void>; initializeUserMemory(userId: string, options?: { userContextBlockPrompt?: string; userContextBlockCharLimit?: number; userContextBlockValue?: string; summaryBlockPrompt?: string; summaryBlockCharLimit?: number; reset?: boolean; }): Promise<string>; addMessages(userId: string, messages: Record<string, any>[], skipVectorStorage?: boolean): Promise<string>; addFiles(files: Record<string, any>[]): Promise<never>; getUserMemory(userId: string, promptFormatted?: boolean): Promise<string | null>; getSummary(userId: string, promptFormatted?: boolean): Promise<string | null>; getMemoryAgentId(userId: string): Promise<string | null>; deleteUser(userId: string): Promise<void>; search(userId: string, query: string): Promise<string[]>; }