{
  "$defs": {
    "MemoryField": {
      "description": "Declaration of a single typed memory field, loaded from ``memory.yml``.\n\nDefines what the field is \u2014 its type, description, and privacy.\nStatic: shared across all conversations, never changes after model load.",
      "properties": {
        "anonymization": {
          "anyOf": [
            {
              "$ref": "#/$defs/MemoryFieldAnonymization"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "enum_values": {
          "items": {},
          "title": "Enum Values",
          "type": "array"
        },
        "initial_value": {
          "default": null,
          "title": "Initial Value"
        },
        "llm_settable": {
          "default": false,
          "title": "Llm Settable",
          "type": "boolean"
        },
        "mutable": {
          "default": false,
          "description": "Project-only flag: allow overwrites after the first write. Default false (write-once). Invalid on skill memory.yml entries.",
          "title": "Mutable",
          "type": "boolean"
        },
        "pii": {
          "default": false,
          "title": "Pii",
          "type": "boolean"
        },
        "privacy_rules": {
          "items": {
            "type": "string"
          },
          "title": "Privacy Rules",
          "type": "array"
        },
        "seed": {
          "default": false,
          "title": "Seed",
          "type": "boolean"
        },
        "type": {
          "default": "any",
          "title": "Type",
          "type": "string"
        },
        "writable_by": {
          "description": "Project-only skill directory ids (skills/<id>/) allowed to write this field. Empty or omitted: any skill. Independent of mutable. Train checks each id against the agent catalog.",
          "items": {
            "type": "string"
          },
          "title": "Writable By",
          "type": "array"
        }
      },
      "title": "MemoryField",
      "type": "object"
    },
    "MemoryFieldAnonymization": {
      "additionalProperties": false,
      "description": "How a ``pii: true`` memory field is anonymized on published events.\n\nSame keys as a classic privacy-rule ``anonymization`` block. Omitted on a\nPII field means mask the whole value.",
      "properties": {
        "keep_left": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Keep Left"
        },
        "keep_right": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Keep Right"
        },
        "redaction_char": {
          "default": "*",
          "maxLength": 1,
          "minLength": 1,
          "title": "Redaction Char",
          "type": "string"
        },
        "type": {
          "enum": [
            "redact",
            "mask"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "MemoryFieldAnonymization",
      "type": "object"
    }
  },
  "additionalProperties": {
    "$ref": "#/$defs/MemoryField"
  },
  "description": "Project ``memory.yml``: a flat map of field name to declaration.",
  "title": "memory.yml",
  "type": "object"
}
