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
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:
| field | required | meaning |
|---|---|---|
| curt | yes | magic — must be exactly "curtis-conversation" |
| version | yes | format version; this spec is 1 |
| generator | no | provenance, "writer-name@version" — readers must ignore |
| conversation | yes | id, title, createdAt, updatedAt, messages |
| role | yes | user · assistant · system · tool |
| model | no | provider 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:
-
01
The body parses as JSON — after ignoring at most one leading UTF-8 BOM, because Windows editors prepend one anyway.
-
02
curtis exactly"curtis-conversation"andversionis exactly the number1— a string"1"is a rejection. -
03
The conversation carries
idandtitleas strings, timestamps as numbers, and amessagesarray 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
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.