Skip to main content

Chat Import Schema

Reference for the graph schema produced by the Claude AI and ChatGPT chat history import connectors.

Entity Types​

Conversation​

One node per imported conversation.

PropertyTypeDescription
namestringConversation title (from export) or conv-{uuid} fallback
conversation_idstringOriginal platform UUID
sourcestring"claude-ai" or "chatgpt"
created_atstringISO 8601 timestamp of conversation creation
updated_atstringISO 8601 timestamp of last update
message_countintegerNumber of messages in the conversation
model_slugstringDefault model used (ChatGPT only, e.g. "gpt-4o")

Message​

One node per message within a conversation.

PropertyTypeDescription
namestringmsg-{uuid[:12]} identifier
rolestring"user", "assistant", or "tool"
contentstringMessage text (truncated to 2,000 characters)
created_atstringISO 8601 timestamp
conversation_idstringParent conversation UUID
has_tool_callsbooleanWhether this message contains tool use blocks (Claude AI)
has_tool_resultsbooleanWhether this message contains tool results (ChatGPT)
model_slugstringModel used for this specific message (ChatGPT only)

Document​

One document per conversation, containing the full concatenated text for search and RAG.

PropertyTypeDescription
titlestring"Claude AI: {title}" or "ChatGPT: {title}"
contentstringFull conversation text with role labels
template_idstringAlways "chat-import"
template_namestring"Claude AI Conversation" or "ChatGPT Conversation"
conversation_idstringSource conversation UUID
sourcestring"claude-ai" or "chatgpt"
created_atstringISO 8601 timestamp

DecisionTrace (deep mode only)​

Tool call sequences captured as reasoning traces.

PropertyTypeDescription
idstring"claude-ai-trace-{uuid}" or "chatgpt-trace-{uuid}"
taskstring"Tool usage in: {conversation title}"
outcomestringSummary of tool call count

TraceStep (deep mode only)​

Individual steps within a decision trace.

PropertyTypeDescription
thoughtstringWhat triggered the tool call
actionstringTool name and type (tool_use: or tool_result:)
observationstringTool input or output (truncated to 500 chars)

Relationships​

RelationshipFromToDescription
HAS_MESSAGEConversationMessageConversation contains this message
NEXTMessageMessageSequential message ordering within a conversation
HAS_STEPDecisionTraceTraceStepTrace contains this reasoning step

Platform Differences​

Claude AI Export Format​

  • File: conversations.jsonl (one JSON object per line, streamed)
  • Messages: Flat chat_messages array with sender: "human" or "assistant"
  • Content blocks: Array of {type, text} objects; supports text, tool_use, tool_result, thinking
  • Timestamps: ISO 8601 strings
  • Tool calls: Inline tool_use content blocks with name, id, input
  • Thinking: Extended thinking captured in thinking content blocks (Claude AI exclusive)

ChatGPT Export Format​

  • File: conversations.json (single JSON array)
  • Messages: Tree-structured mapping with parent/children references; the importer walks the tree following the last child at each branch point
  • Author roles: user, assistant, system (filtered), tool
  • Content types: text, code, execution_output, multimodal_text
  • Timestamps: Unix float (seconds since epoch), converted to ISO 8601
  • Hidden messages: Nodes with is_visually_hidden_from_conversation: true are filtered out
  • System messages: Root and intermediate system messages are excluded from import

Example Cypher Queries​

All conversations from a specific platform:

MATCH (c:Conversation)
WHERE c.source = 'claude-ai'
RETURN c.name, c.message_count, c.created_at
ORDER BY c.created_at DESC

Full message thread for a conversation:

MATCH path = (first:Message)-[:NEXT*]->(last:Message)
WHERE first.conversation_id = $conv_id
AND NOT ()-[:NEXT]->(first)
RETURN [n IN nodes(path) | {role: n.role, content: left(n.content, 200)}] AS thread

Cross-platform conversation count:

MATCH (c:Conversation)
RETURN c.source, count(c) AS conversations, sum(c.message_count) AS total_messages

Search across all imported conversations:

MATCH (d:Document)
WHERE d.template_id = 'chat-import'
AND d.content CONTAINS $search_term
RETURN d.title, d.source, d.created_at
ORDER BY d.created_at DESC