Function: exportSubjectMemory()
exportSubjectMemory(
options):Promise<UserMemoryExport>
Defined in: packages/agentos/src/cognition/memory/io/userMemoryExport.ts:55
One subject's memory as JSON: every live conversation trace filed under the subject's own key, oldest first, with who spoke it, and every page compiled from them. It reads that key alone, by equality: the operator's pages, other subjects' memory and a session's own message history are not in it. A forgotten subject's export is empty.
Parameters
options
agentId
string
legacy?
{ forms: readonly string[]; pages: Promise<WikiPage[]>; }
The memory from before per-user scope attributed to this subject (legacyMemory), passed for its owner alone:
the written forms of the agent's plain scope id its traces sit under, and its compiled pages.
legacy.forms
readonly string[]
legacy.pages
memory
subject
wiki
{ storeFor: { listPages: Promise<WikiPage[]>; }; }
wiki.storeFor
Returns
Promise<UserMemoryExport>
Throws
TypeError when the subject has another kind or no id, or an id no conversation key can be built from.