Skip to content

MemoryEntry

Types for the cross-session long-term memory system.

These types define the data structures used by MemoryService implementations for storing, searching, and managing cross-session knowledge.

optional author?: string;

Who authored the original content: ‘user’ | ‘assistant’ | agent name


content: string;

The memory content (extracted fact, summary, or raw text)


createdAt: Date;

When the memory was created


id: string;

Unique identifier for this memory


optional metadata?: Record<string, unknown>;

Structured metadata for filtering


optional score?: number;

Relevance score (populated by search, not storage)


sessionId: string;

The session this memory was derived from


userId: string;

The user this memory belongs to