MemoryRecord
One fact to store, as the framework hands it to MemoryProvider.remember: the text, where it came from, the log events behind it, and the host-issued binding.
Fields
textstringrequiredThe fact to remember, as the model wrote it in save_memory. Non-empty.
origin"user" | "tool_output" | "model" | "host"requiredWho the fact comes from, decided by the host from the log, never by the model: user when a verified principal started the turn and nothing untrusted is in context, tool_output when untrusted content is in context, model otherwise. host is for records the host writes itself.
provenance{ thread_id: ThreadId; event_ids: readonly EventId[] }requiredWhere in the log the fact came from: the thread and the events behind the save.
provenance.thread_idThreadIdrequiredThe thread whose run saved the fact.
provenance.event_idsreadonly EventId[]requiredThe log events the save was based on. May be empty.
bindingBindingrequiredIssued by the host; the provider stores it opaquely.