addEventsToMemory

suspend fun addEventsToMemory(events: List<Event>, customMetadata: Map<String, Any?>? = null)

Adds an explicit list of events to the memory service, scoped to the current session's app/user/session ids.

Unlike addSessionToMemory, this persists only the given events (e.g. the latest turn) as an incremental update rather than re-ingesting the full session.

Parameters

events

The events to add to memory.

customMetadata

Optional metadata forwarded to the configured memory service. Supported keys are implementation-specific.

Throws

if no memory service is configured on the invocation.