Skip to main content

JSON Format

This file is a digital representation of a conversation between a customer and a service agent (or AI). It contains all the important details of the conversation, including when it started, who participated, what was said, what actions occurred, and feedback given during the conversation.

What's Inside the File​

FieldTypeRequiredDescription
conversation_idstringYesUnique identifier for each conversation
timestampstringYesStart time in ISO 8601 format
agent_idstringYesAgent or bot identifier
is_resolvedbooleanNoWhether the conversation was resolved (true/false)
csat_scorenumberNoCustomer satisfaction rating (0–5 scale)
missing_infobooleanNoFlag for incomplete conversation data
user_dataobjectNoUser metadata — account type, subscription tier, preferences, etc. When provided and Personal Data profiles are configured, the system can match this data against profiles to provide personalized context (matched live when viewed or validated)
additional_infoobjectNoFlexible metadata container for any extra information about the conversation. All keys are displayed in the "More Information" panel in the UI. See Additional Info for details
messagesarrayYesArray of exchanged messages (see below)

Message Object​

FieldTypeRequiredDescription
message_idstringYesUnique message identifier
conversation_idstringYesParent conversation reference
rolestringYesSender type: "customer", "agent", or "system"
sender_idstringYesUnique sender identifier
contentstringYesMessage text
timestampstringYesISO 8601 send time
logsarrayNoArray of log entries documenting actions taken during message generation
feedbackobjectNoThumbs-up/thumbs-down reaction with optional note

Both JSON array ([{...}, {...}]) and JSONL (one object per line) formats are accepted.

JSON Format Example​

[
{
"conversation_id": "conv-001",
"timestamp": "2026-03-10T09:00:00.000Z",
"agent_id": "support-agent",
"is_resolved": true,
"csat_score": 4.5,
"user_data": {
"subscription_tier": "premium",
"customer_name": "Sarah Johnson",
"renewal_date": "April 15, 2026"
},
"additional_info": {
"language": "en",
"agent_version": "2.1.0",
"channel": "web_chat"
},
"messages": [
{
"message_id": "msg-01",
"conversation_id": "conv-001",
"role": "customer",
"sender_id": "user-sarah",
"content": "Hi, can you help me with my billing? I want to know my plan details and how to reset my password.",
"timestamp": "2026-03-10T09:00:00.000Z"
},
{
"message_id": "msg-02",
"conversation_id": "conv-001",
"role": "agent",
"sender_id": "support-agent",
"content": "Hello Sarah! You're on our Premium plan at $99/month. Your renewal date is April 15, 2026. To reset your password, go to Settings > Security > Change Password. Your new password must be at least 8 characters with one uppercase letter and one number.",
"timestamp": "2026-03-10T09:00:15.000Z",
"logs": [
{
"name": "tool_call_1",
"tool": "GetAccountDetails",
"status": "completed",
"content": {
"account_id": "acct-sarah-001",
"plan": "Premium",
"monthly_price": 99,
"currency": "USD",
"renewal_date": "2026-04-15"
}
},
{
"name": "context",
"content": [
{
"id": "kb-pw-reset-001",
"content": "Password Reset Guide: Navigate to Settings > Security > Change Password. Requirements: minimum 8 characters, at least one uppercase letter and one number."
}
]
},
{"name": "personal_data"}
],
"feedback": {
"value": "positive",
"note": "Helpful and accurate response"
}
},
{
"message_id": "msg-03",
"conversation_id": "conv-001",
"role": "customer",
"sender_id": "user-sarah",
"content": "Thank you, that's exactly what I needed!",
"timestamp": "2026-03-10T09:01:00.000Z"
}
]
}
]

Logs​

Each log entry documents an action or step that occurred during message generation. Log entries use name and content fields.

FieldTypeRequiredDescription
namestringYesLabel for the logged action
contentstring, array, or nullNoDetails or result of the action
"logs": [
{"name": "Account Lookup", "content": "Found account: Premium tier, active since 2024"},
{"name": "Database Query", "content": "Retrieved 3 matching records"},
{"name": "Processing", "content": null}
]

Context Logs​

Context logs are a special category of log entries that carry the knowledge sources (retrieved documents) the agent used to generate its response. Send them so the agent's answers can be checked against the sources it used.

A log entry is a context log when its name contains "context" (case-insensitive), for example "context".

Plain text format​

A single string with all context content. It displays as a plain text block in the UI (no source cards).

{
"name": "context",
"content": "All the context the agent used to generate the response..."
}

When content is an array of objects with id and content fields, each item renders as an expandable knowledge source card in the UI:

{
"name": "context",
"content": [
{
"id": "kb-article-001",
"content": "Password Reset Guide: Navigate to Settings > Security > Change Password. Requirements: minimum 8 characters, at least one uppercase letter and one number."
},
{
"id": "kb-article-002",
"content": "Account Security: We recommend enabling two-factor authentication for all accounts."
}
]
}

The structured format is recommended because:

  • Each source displays as an individual expandable card in the conversation detail view
  • Sources are easier to review and audit

Personal Data Log​

The personal_data log indicates that an agent message used personalized data from the Personal Data Engine (PDE) to generate its response.

{
"name": "personal_data"
}

No content is needed: the log only marks that this message used the user's personal data.

How it works: When a conversation has user_data, the system matches it against configured Personal Data profiles live (when the conversation is viewed or validated — not at ingestion time).

Tool Call Logs​

Tool call logs record the tools (functions) your agent called and their responses during message generation. Send them so the agent's answers can be checked against the data its tools returned.

Log entry fields​

FieldTypeRequiredDescription
namestringYesLog name with a "tool_call" prefix (e.g. "tool_call_1", "tool_call_GetBalance")
toolstringNoThe tool/function name (e.g. "GetBalance", "SearchOrders"). Used for display and filtering. Falls back to name if not provided
step_namestringNoThe step's name, if it differs from tool (e.g. "lookup_balance" when tool is "http_request"). When present, it is used instead of tool as the name of the step, both in the UI and in validation
statusstringNoCompletion status. Use "completed" or "success" for a successful call. Logs with "error", "skipped", or other values are not used for validation. If omitted, the log is treated as successful. In the UI, "error" renders the action in red with an error badge
contentobject, array, or stringYesThe tool's response data. Can be a JSON object, array, JSON-encoded string, or plain text. Empty content causes the log to be skipped. Also shown as the Output JSON viewer in the UI when result is not provided
stepstringNoAlternative tool-call marker with the same "tool_call" prefix (e.g. "tool_call_1"). Either step or name can mark the entry as a tool call in the UI
argsobjectNoThe arguments the agent passed to the tool. Rendered as the searchable Input JSON viewer in the UI
resultobject or stringNoThe tool's response for display. Rendered as the Output JSON viewer (object) or text block (string). Takes precedence over content for display; validation always uses content
summarystringNoOne-line description shown under the tool name (e.g. "Executed GetBalance"). Defaults to "<tool> <status>"
duration_msnumberNoTool execution time in milliseconds, shown as a duration badge

Example​

"logs": [
{
"name": "tool_call_1",
"tool": "GetAccountDetails",
"status": "completed",
"content": {
"account_id": "acct-001",
"plan": "Premium",
"monthly_price": 99,
"currency": "USD"
}
},
{
"name": "tool_call_2",
"tool": "SearchKnowledgeBase",
"status": "completed",
"content": [
{"title": "Password Reset Guide", "body": "Navigate to Settings > Security > Change Password."}
]
}
]

How tool calls render in the UI​

In the conversation detail view, tool call logs are grouped under an expandable Agent Actions section. Each tool call renders as a card with the tool name, status badge, optional duration, and a collapsible Details panel containing searchable JSON viewers:

  • args → the Input viewer
  • result (or content when result is absent) → the Output viewer

The minimal format from the example above renders fine — content doubles as the Output. To also show the tool's input and a duration, provide the display fields:

"logs": [
{"step": "external_request", "status": "completed"},
{
"name": "tool_call_1",
"step": "tool_call_1",
"tool": "GetAccountDetails",
"status": "completed",
"summary": "Executed GetAccountDetails",
"duration_ms": 850,
"args": {"account_id": "acct-001"},
"result": {"plan": "Premium", "monthly_price": 99},
"content": {"plan": "Premium", "monthly_price": 99}
}
]

Notes:

  • The optional {"step": "external_request"} entry renders as the parent card that the Agent Actions nest under. Without it, tool calls are grouped under a generic "Agent Execution" step.
  • result and content usually carry the same data: the UI prefers result for display, while validation uses only content. If they are identical, you can provide just content.
  • A log with status: "error" renders in red and counts toward the error badge on the Agent Actions header, but is not used for validation.

How the name prefix works​

A log entry is recognized as a tool call when its name starts with "tool_call", so any of these names will match:

  • "tool_call_1", "tool_call_2", ...
  • "tool_call_GetBalance"
  • "tool_call" (the prefix itself)

Content formats​

The content field accepts several formats:

JSON object (recommended) — structured tool response data:

{
"content": {
"balance": 500,
"currency": "USD",
"last_transaction": "2026-03-10"
}
}

JSON array — list of results:

{
"content": [
{"id": "order-1", "status": "shipped"},
{"id": "order-2", "status": "processing"}
]
}

Plain text string — when the tool returns a simple text response:

{
"content": "Transfer completed successfully. Reference: TXN-12345"
}

Multiple tool calls per message​

An agent message can have multiple tool call logs, one per call:

"logs": [
{
"name": "tool_call_1",
"tool": "GetBalance",
"status": "completed",
"content": {"balance": 500, "currency": "USD"}
},
{
"name": "tool_call_2",
"tool": "GetTransactions",
"status": "completed",
"content": [
{"date": "2026-03-09", "amount": -50, "description": "Coffee Shop"},
{"date": "2026-03-08", "amount": 1000, "description": "Salary Deposit"}
]
}
]

Attach each tool call log to the agent message that used it.

Additional Info​

The additional_info field is a flexible metadata container — a key-value object where you can store any extra information about the conversation. All keys are displayed in the "More Information" panel in the UI, each as its own expandable section.

"additional_info": {
"language": "en",
"agent_version": "2.1.0",
"channel": "web_chat",
"department": "billing",
"session_duration_seconds": 340
}

You can use any keys you want. Common examples:

KeyDescription
languageConversation language code
agent_versionVersion of the agent that handled the conversation
channelCommunication channel (web_chat, phone, email, etc.)
departmentDepartment or team that handled the conversation
regionGeographic region of the customer
session_duration_secondsTotal session duration

Values can be strings, numbers, booleans, or nested objects. Nested objects are rendered as key-value tables in the UI.

Note: The additional_info field is purely for your custom metadata. Personal Data profile matching happens live when the conversation is viewed or validated — no system-generated keys are added to this field during ingestion.

Feedback​

Message-level feedback captures user reactions to agent responses.

FieldTypeRequiredDescription
valuestringYes"positive" or "negative"
notestringNoFree-text explanation
"feedback": {
"value": "positive",
"note": "Helpful and accurate response"
}

You need to update the agent_id field in your JSON to match the ID of the agent you want to link. You can find the agent's ID in their settings: click the three-dot menu next to the agent and look under the General section to see the Agent ID. Enter that ID in the agent_id field in your JSON file.