Number of older entries evicted so far to stay within MaxSeedChars.
Number of turn/event entries currently retained in memory (bounded by MaxSeedChars). Reserved turns still waiting for text do not count.
Number of active replaceable keyed state snapshots currently held in MaxStateChars.
Forgets everything.
Adds an entry. Blank text is ignored (and releases the user turn reserved for its ItemId); ephemeral notes are
ignored; keyed state notes replace the prior value for that StateKey in a separate budget; long payloads are
truncated and older entries exceeding MaxSeedChars are trimmed immediately.
Gives up a reserved user turn that will get no text (for example its transcription failed). A filled turn stays.
Reserves the conversation position of a user turn whose text is not final yet (for example audio the provider
committed but has not transcribed). A later Record of a user entry with the same ItemId fills it. A reserved
turn that never gets text is left out of the seed; at most REALTIME_MEMORY_MAX_PENDING_USER_TURNS wait at once.
Reserving an id that is already in memory does nothing.
The retained entries (pinned opening turns, newest turns fitting MaxSeedChars, then active keyed state), oldest first. Pure.
Provider-neutral notebook of final turns. A realtime provider that loses its session (for example Gemini Live at its connection limit) reseeds the new session from
Seed(). Pure data: no I/O, no timers.Entries are kept in conversation order, which is not always the order their text is final in: a provider that transcribes the user's speech asynchronously (OpenAI) can finish the transcript after the model has answered or called a tool. Such a driver reserves the user turn's place with
ReserveUserTurnwhen the provider commits the audio, and the transcript fills that place later. Without it, the seed would put the request after its answer, and the resumed model could act on the request a second time.