{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "memory_remember",
  "type": "object",
  "properties": {
    "entityName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "key": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "default": "fact",
      "type": "string",
      "enum": ["fact", "constraint", "lesson", "preference", "procedure"]
    },
    "source": {
      "default": "unspecified",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "confidence": {
      "default": 0.5,
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "pinned": {
      "default": false,
      "type": "boolean"
    },
    "expiresAt": {
      "default": null,
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "supersedes": {
      "default": [],
      "description": "IDs of memories that this one replaces because they say something else. They are archived, with their history kept.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    }
  },
  "required": [
    "entityName",
    "content",
    "kind",
    "source",
    "confidence",
    "pinned",
    "expiresAt",
    "supersedes"
  ],
  "additionalProperties": false
}
