{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mnemoverse-com/json-schema/mnemoverse-com-write-batch-response-schema-schema.json",
  "title": "WriteBatchResponseSchema",
  "description": "Response after batch write.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mnemoverse-com-memory-v1-api-openapi.yml#/components/schemas/WriteBatchResponseSchema",
  "properties": {
    "total_count": {
      "type": "integer",
      "title": "Total Count",
      "description": "Total number of atoms processed."
    },
    "stored_count": {
      "type": "integer",
      "title": "Stored Count",
      "description": "Number of atoms stored."
    },
    "results": {
      "items": {
        "$ref": "#/$defs/WriteBatchItemResult"
      },
      "type": "array",
      "title": "Results",
      "description": "Per-atom results in request order."
    }
  },
  "type": "object",
  "required": [
    "total_count",
    "stored_count",
    "results"
  ],
  "$defs": {
    "WriteBatchItemResult": {
      "properties": {
        "index": {
          "type": "integer",
          "title": "Index",
          "description": "Position in the request items list."
        },
        "stored": {
          "type": "boolean",
          "title": "Stored",
          "description": "True if the atom was stored."
        },
        "atom_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Atom Id",
          "description": "UUID of stored atom, or None."
        },
        "importance": {
          "type": "number",
          "title": "Importance",
          "description": "Legacy computed importance score; 1.0 with exact-content admission enabled.",
          "default": 0.0
        },
        "reason": {
          "type": "string",
          "title": "Reason",
          "description": "Engine-provided reason when the item was filtered instead of stored.",
          "default": ""
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error",
          "description": "Error message if item failed."
        },
        "duplicate_of": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duplicate Of",
          "description": "Existing live atom when this item was refused as an exact_duplicate."
        }
      },
      "type": "object",
      "required": [
        "index",
        "stored"
      ],
      "title": "WriteBatchItemResult",
      "description": "Per-item result in a batch write response."
    }
  }
}