---
type: folder-readme
tags: [meta, chats]
author: alexandria
---

# Chats

**Conversation records** — one `.chat` file per chat session with the agent, written by clients (the desktop app, vault-mcp seats) so conversations are durable, git-synced brain memory instead of opaque per-app databases.

## The `.chat` format (v1)

- **Filename:** `YYYY-MM-DD <title>.<sid8>.chat` — date-led like the rest of the vault; `sid8` is the first 8 hex characters of the session UUID and is the stable lookup key (titles and dates may change on retitle, `sid8` never does).
- **Content:** JSON Lines. Line 1 is the header, written once: `{"chat": 1, "id": "<session-uuid>", "title": "…", "created_at": "<ISO8601Z>", "client": "…", "model": "<model-id at creation>", "meta": {…}}`. Every following line is one opaque JSON record (a message, a tool event — client-defined). Appends only add lines; nothing rewrites the header except a retitle.
- **Vacuum:** append-only has one escape hatch — a client may periodically rewrite a session's records to a compact replay-equivalent snapshot (its latest checkpoint records + state), so files don't grow without bound and oversized legacy records get retired. The header line still never changes outside a retitle.
- **Model attribution:** every message-bearing record carries a required `"model"` field — for assistant records, the id of the model that generated that message. When the session's model changes mid-chat, clients log the switch as a state record. The server never looks inside records (JSON-parseability is its only check); the *format* requires the field, so a transcript without it is an incomplete record of the conversation.

## Records, not notes

These files are **machine-generated records**, not notes: don't hand-edit them, don't file them, don't expect the digest, the graph, or the note tools to read them — `.chat` isn't `.md`, so transcripts stay out of search, links, and digests by construction. Substance worth keeping goes into the pillars as real notes (the debrief and ingestion flows do this); the transcript stays here as the verbatim record.

## Sensitive by default

Chats quote whatever was discussed, so treat this folder as sensitive: anyone holding a seat key for this brain can read it, the same as the rest of the vault.
