addMemory

suspend fun addMemory(memories: List<MemoryEntry>, customMetadata: Map<String, Any?>? = null)

Adds explicit memories directly to the memory service, scoped to the current session's app/user ids.

This is for memory services that support direct memory writes, in addition to the event-based generation done by addSessionToMemory / addEventsToMemory.

Parameters

memories

Explicit memory items to add.

customMetadata

Optional, portable metadata forwarded to the memory service.

Throws

if no memory service is configured on the invocation.