Skip to main content

Overview

EpisodicMemory represents a specific moment or interaction stored in the system. It includes the actual text content, who said it, and its relevance score when returned in a search.

Properties

PropertyTypeDescription
uidstringThe unique identifier for this memory entry.
contentstringThe raw text of the memory.
scorenumberThe relevance score (usually 0 to 1) from a semantic search.
producer_idstringThe ID of the user or system that created this memory.
producer_rolestringThe role (e.g., user, assistant) of the producer.
episode_typestringThe classification of the interaction.
created_atstringISO timestamp of when the memory was ingested.
metadataRecord<string, any>Optional. Key-value pairs of additional context.
produced_for_idstringOptional. The ID of the recipient of the interaction.

Usage Example

const { short_term_memory } = searchResponse.content.episodic_memory;
const firstHit = short_term_memory.episodes[0];

console.log(`[${firstHit.score}] ${firstHit.producer_role}: ${firstHit.content}`);