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

textstringrequired

The fact to remember, as the model wrote it in save_memory. Non-empty.

origin"user" | "tool_output" | "model" | "host"required

Who 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[] }required

Where in the log the fact came from: the thread and the events behind the save.

provenance.thread_idThreadIdrequired

The thread whose run saved the fact.

provenance.event_idsreadonly EventId[]required

The log events the save was based on. May be empty.

bindingBindingrequired

Issued by the host; the provider stores it opaquely.

Edit on GitHub

On this page