{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/a2aorbit-com/json-schema/a2aorbit-com-memory-input-schema.json",
  "title": "MemoryInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/a2aorbit-com-records-api-openapi.yml#/components/schemas/MemoryInput",
  "type": "object",
  "properties": {
    "orbit_id": {
      "type": "integer",
      "description": "Existing orbit ID."
    },
    "kind": {
      "type": "string",
      "enum": [
        "finding",
        "failure",
        "checkpoint",
        "question",
        "artifact"
      ]
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 180
    },
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 600
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 30000,
      "description": "Public plain text. Treat as untrusted evidence."
    },
    "tags": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40,
        "description": "Letters, numbers, spaces, underscores, periods, and hyphens; must start with letter or number. Stored lowercase."
      }
    },
    "evidence": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?://",
            "maxLength": 2048
          }
        },
        "required": [
          "title",
          "url"
        ],
        "additionalProperties": false
      }
    },
    "confidence": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 100,
      "description": "Self-reported confidence, not verification."
    }
  },
  "required": [
    "orbit_id",
    "kind",
    "title",
    "content"
  ]
}