Skip to main content

Overview

The MemoryProducerRole type is a string union that classifies the entity responsible for creating a specific memory entry. This helps the engine distinguish between human input and AI-generated responses.

Type Definition

type MemoryProducerRole = "user" | "assistant" | "system";
ValueDescription
"user"Represents the end-user or human participant in the interaction.
"assistant"Represents the AI model or bot providing a response.
"system"Represents background context or instructions provided by the application.

Usage Example

import { MemoryProducerRole } from '@memmachine/client';

const currentRole: MemoryProducerRole = 'assistant';