.curt

An open format for AI conversations — spec v1, kept by Curtis

The .curt format.

.curt is an open, single-file format for AI chat conversations: one file, one conversation, full fidelity — images and tool calls ride verbatim. Born in Curtis AI Chat, specified openly so any app can read and write it. Your history is files, not hostages.

$ npm install curt-format
.CURT — THE GUARANTEE
WHY THE FORMAT CAN BE TRUSTED
shapeone file, one conversation, UTF-8 JSON
fidelitybase64 images and tool calls survive verbatim
validationstrict — a corrupted file is rejected whole, never half-imported
round-tripunknown fields preserved ✓ — your data survives foreign readers
licenseBUSL-1.1 — zero dependencies in the reference reader

File shape.

A .curt file is UTF-8 JSON (tab-indented by convention). The generator field lets your app sign what it wrote — readers must ignore it.

{
	"curt": "curtis-conversation",
	"version": 1,
	"generator": "your-app@1.2.3",
	"conversation": {
		"id": "conv_001",
		"title": "Thursday's thread",
		"createdAt": 1760000000000,
		"updatedAt": 1760000600000,
		"messages": [
			{ "id": "m1", "role": "user",
			  "content": "hello", "timestamp": 1760000000000 },
			{ "id": "m2", "role": "assistant",
			  "content": "hi back", "timestamp": 1760000001000 }
		]
	}
}

The envelope, field by field:

fieldrequiredmeaning
curtyesmagic — must be exactly "curtis-conversation"
versionyesformat version; this spec is 1
generatornoprovenance, "writer-name@version" — readers must ignore
conversationyesid, title, createdAt, updatedAt, messages
roleyesuser · assistant · system · tool
modelnoprovider model id, typically on assistant messages

Writers may attach extra fields anywhere — tokens, images, tool-call linkage — and readers must preserve them on round-trip and never fail on them. The full field tables live in the spec.

Validation, version 1.

A reader accepts a file when, and only when:

  1. 01
    The body parses as JSON — after ignoring at most one leading UTF-8 BOM, because Windows editors prepend one anyway.
  2. 02
    curt is exactly "curtis-conversation" and version is exactly the number 1 — a string "1" is a rejection.
  3. 03
    The conversation carries id and title as strings, timestamps as numbers, and a messages array in which every entry passes message validation.

Anything else is a rejection — whole-file, not a best-effort parse. Multiple conversations travel as a zip of .curt files. Versions change rarely and only additively within a version; version-1 files stay readable forever.

Read and write it.

The reference implementation is TypeScript, zero dependencies, BUSL-1.1 — source-available, Apache-2.0 on 2030-10-12. parseCurt returns the conversation or null — null means invalid:

import { serializeCurt, parseCurt, curtFilename } from 'curt-format';

const body = serializeCurt(conversation, 'my-app@1.0.0');
const back = parseCurt(body); // CurtConversation | null
const name = curtFilename(back!); // 2025-10-09 my-thread 001.curt

curt-format on npm · dot_curt repository · SPEC.md · round-trip fixtures

THE FILING CONVENTION
SORTABLE, COLLISION-SAFE, DERIVED FROM IMMUTABLE FIELDS ONLY
2025-10-09 fixture-conversation 001.curt
2025-10-09createdAt as a UTC date — 1970-01-01 when the timestamp isn't finite.
fixture-conversationtitle slug, lowercased, capped at 50 characters — untitled when nothing remains.
001.curtthe part of id after the last underscore; the last 8 characters of id when there is none.
Exposed as curtFilename() — the name survives title edits and later updates.
NOT YET

Bindings beyond TypeScript. The validation predicates are small and the spec is BUSL-1.1 — Rust, Python, Go, Swift: pick one and keep it in lockstep with SPEC.md.

PRs to dot_curt are welcome.