Function attachMemoryWiki

  • Construct the wiki store + compiler over an agent's memory/ directory, attach the write-back loop to the Memory facade, boot-index the markdown into the store, and append the read_memory_page tool to the agent's tool list.

    Call this from the layer that owns the Memory facade and the loaded soul: the agent factory consumes an AgentMemoryProvider hook, not the facade itself, so the wiring lives one level up.

    Parameters

    Returns Promise<AttachMemoryWikiResult>

    The store (for direct reads) and the augmented tools array.