Memory Boot Inject (bundled plugin, off by default)
On the first agent turn of each session after a gateway start, the configured files are read
and prepended to the prompt through the before_agent_start hook (prependContext). The agent
sees them as a block headed Boot context (injected by memory-boot-inject):, one section per
file, with a trailing line naming files that were missing or over budget.
once: true(default): one injection per session per gateway life; agateway_starthook resets the bookkeeping so a restarted gateway injects again.once: falseinjects on every turn (use small files).- Each file is capped at
maxBytesPerFilekeeping its tail (the newest diary entries), the whole block atmaxTotalBytes. - Paths accept
~; relative paths resolve against the state root. agentsrestricts injection to those agent ids.
Every injection is audited (memory.boot_injected, with the files and whether each was read).
Config
Section titled “Config”{ plugins: { entries: { "memory-boot-inject": { enabled: true, config: { files: ["~/notes/diary.md", "agents/main/inbox/latest.md", "~/notes/HANDOFF.md"], maxBytesPerFile: 16384, maxTotalBytes: 65536, agents: ["main"], once: true, header: "Boot context:", }, }, }, },}- The plugin never writes the files; it only reads them at injection time, so an updated handoff
is picked up on the next gateway start (or next turn with
once: false). - Reloading the plugin (
kurahi plugins reload memory-boot-inject) resets the per-session bookkeeping: the next turn injects again. - Audit source:
plugin:memory-boot-inject.