Interface IConversation

Represents a stored conversation with metadata.

IConversation

Example

const conversation: IConversation = {
id: 'conv-123',
userId: 'user-456',
agentId: 'agent-coding',
createdAt: Date.now(),
lastActivity: Date.now(),
title: 'Build a React component',
metadata: { tags: ['coding', 'react'], starred: true }
};
interface IConversation {
    id: string;
    userId: string;
    agentId?: string;
    createdAt: number;
    lastActivity: number;
    title?: string;
    metadata?: Record<string, any>;
}

Properties

id: string

Unique identifier for the conversation (UUID recommended)

userId: string

User who owns this conversation

agentId?: string

Optional agent ID if conversation is tied to specific agent

createdAt: number

Unix timestamp (milliseconds) when conversation was created

lastActivity: number

Unix timestamp (milliseconds) of last message in conversation

title?: string

Optional human-readable title for the conversation

metadata?: Record<string, any>

Arbitrary metadata object for extensibility