// concepts · 08

Sessions, context and continuity

Gateway sessions use a two-layer store: small metadata written atomically, plus an append-only transcript tree. This keeps chats persistent, resumable and crash-res…

Store + transcript

filerole
.okami/sessions/sessions.jsonsmall chat_id -> metadata map: last node, counters, yolo, overlay, usage and timestamps
.okami/sessions/<chat>.jsonlappend-only transcript: one line per turn, with id and parentId
.okami/groups/<chat>.jsonlsame shape for multi-agent group conversations

SUMMARY compaction

When context grows, Okami appends a SUMMARY node. Rebuilding the prompt uses that summary as the prefix replacement, while the full transcript remains on disk.

Archive, resume, export

/newarchives the active transcript and starts clean
/sessionslists archived sessions for the chat
/resume <n>resumes an archive after archiving the active session
/export [file]exports the active transcript as Markdown
/title <name>names the active conversation

Open this page in the interactive docs