{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cadencz-com/json-schema/cadencz-com-brain-conversation-detail-schema.json",
  "title": "BrainConversationDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cadencz-com-brain-conversations-api-openapi.yml#/components/schemas/BrainConversationDetail",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "brain_id": {
      "type": "string",
      "title": "Brain Id"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "message_count": {
      "type": "integer",
      "title": "Message Count"
    },
    "user_message_count": {
      "type": "integer",
      "title": "User Message Count"
    },
    "current_draft": {
      "type": "string",
      "title": "Current Draft"
    },
    "current_platform": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Current Platform"
    },
    "last_message_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Message At"
    },
    "summary_through_sequence": {
      "type": "integer",
      "title": "Summary Through Sequence"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "summary": {
      "additionalProperties": true,
      "type": "object",
      "title": "Summary"
    },
    "messages": {
      "items": {
        "$ref": "#/$defs/BrainMessageRead"
      },
      "type": "array",
      "title": "Messages"
    }
  },
  "type": "object",
  "required": [
    "id",
    "brain_id",
    "title",
    "status",
    "message_count",
    "user_message_count",
    "current_draft",
    "current_platform",
    "last_message_at",
    "summary_through_sequence",
    "created_at",
    "updated_at",
    "summary"
  ],
  "$defs": {
    "BrainMessageRead": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "conversation_id": {
          "type": "string",
          "title": "Conversation Id"
        },
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant"
          ],
          "title": "Role"
        },
        "sequence": {
          "type": "integer",
          "title": "Sequence"
        },
        "content": {
          "type": "string",
          "title": "Content"
        },
        "intent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Intent"
        },
        "provider": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Provider"
        },
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model"
        },
        "agent_run_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Agent Run Id"
        },
        "metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Metadata"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "conversation_id",
        "role",
        "sequence",
        "content",
        "intent",
        "provider",
        "model",
        "agent_run_id",
        "metadata",
        "created_at"
      ],
      "title": "BrainMessageRead"
    }
  }
}