Documentation Index
Fetch the complete documentation index at: https://docs.memmachine.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheAddMemoryOptions interface defines the optional configuration used when adding a new memory via the MemMachineMemory.add() method. It allows for detailed categorization, role assignment, and metadata tagging.
Properties
All properties in this interface are optional, allowing for flexible memory ingestion depending on your use case.| Property | Type | Description |
|---|---|---|
producer | string | The ID of the entity that produced the memory. |
role | MemoryProducerRole | The role of the producer (e.g., user, assistant). |
produced_for | string | The ID of the target entity the memory was produced for. |
episode_type | string | A custom classification for the type of interaction episode. |
timestamp | string | The specific time the memory occurred (ISO 8601 string). |
metadata | Record<string, string> | Key-value pairs for additional custom contextual data. |
types | MemoryType[] | The classification of memories to be created (e.g., episodic). |
Usage Example
The following example shows how to useAddMemoryOptions to provide context when saving a user preference.

