Skip to content

Data Formats

HAEVN uses a canonical internal format called HAEVN.Chat to represent conversations from all platforms. This is the format used in JSON exports.

{
"id": "uuid-v4",
"source": "chatgpt",
"sourceId": "original-platform-id",
"title": "Conversation title",
"createdAt": "2024-01-15T14:23:00.000Z",
"modifiedAt": "2024-01-15T15:47:00.000Z",
"messages": {
"message-id-1": {
"id": "message-id-1",
"parentId": null,
"timestamp": "2024-01-15T14:23:00.000Z",
"request": {
"kind": "request",
"parts": [
{ "type": "text", "text": "Hello, can you help me with..." }
]
},
"responses": [
{
"kind": "response",
"parts": [
{ "type": "text", "text": "Of course! I'd be happy to help..." }
]
}
]
}
}
}

Each message part has a type field:

TypeDescription
textPlain or Markdown text content
codeCode block with optional language field
imageImage — either url (external) or data (base64)
documentFile attachment with name, mimeType, and optionally data
audioAudio file or URL
videoVideo file or URL
thinkingModel thinking/reasoning block
tool_callTool invocation with name and input
tool_resultTool output with name and output

When exporting multiple conversations, HAEVN creates a ZIP with this layout:

export.zip
├── chats/
│ ├── {chat-id}.json (or .md for Markdown export)
│ └── ...
└── attachments/
├── {chat-id}/
│ ├── image-filename.png
│ └── document-filename.pdf
└── ...

HAEVN Markdown imports use YAML frontmatter followed by role-delimited message sections.

---
title: Example Chat
source: Gemini
conversation_id: optional-stable-id
created_at: 2026-03-26T16:05:00.000Z
modified_at: 2026-03-26T16:10:00.000Z
system: optional-system-message
models_used:
- gemini-2.5-pro
---
<!-- HAEVN: role="user" -->
User message text
<!-- HAEVN: role="assistant" -->
Assistant message text
  • title (required): chat title
  • source (recommended): provider name
  • conversation_id (optional): stable source identifier; when omitted, HAEVN computes an ID from file content
  • created_at (optional): chat creation timestamp (ISO 8601 string, milliseconds, or numeric string)
  • modified_at (optional): source/provider last-modified timestamp (same accepted formats as created_at)
  • system (optional): system prompt/context
  • models_used (optional): list of model names; defaults to unknown when omitted
  • Each section starts with exactly one role marker:
    • <!-- HAEVN: role="user" -->
    • <!-- HAEVN: role="assistant" -->
    • <!-- HAEVN: role="system" --> (optional, captured as system context)
  • A new section starts at each role marker (<!-- HAEVN: role="..." -->)
  • Role marker must be the first non-whitespace line of that message block
  • --- separators between messages are optional (legacy style still tolerated)
  • Keep body content as valid Markdown