{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/raku-so/json-schema/raku-so-memory-response-schema.json",
  "title": "MemoryResponse",
  "description": "API response for a single memory.\n\nEXCLUDED always (never add these fields):\n    - embedding vector (RAKU-3 — can be reverse-engineered)\n    - tenant_id (OWASP-MT §3 — no cross-tenant data)\n    - raw metadata (may contain sensitive data)",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/raku-so-openapi.json#/components/schemas/MemoryResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "content": {
      "type": "string",
      "title": "Content"
    },
    "source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source"
    },
    "memory_type": {
      "type": "string",
      "title": "Memory Type"
    },
    "importance": {
      "type": "number",
      "title": "Importance"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "title": "Updated At"
    },
    "last_accessed": {
      "type": "string",
      "title": "Last Accessed"
    },
    "access_count": {
      "type": "integer",
      "title": "Access Count"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags",
      "default": []
    },
    "confidence_score": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Confidence Score"
    },
    "source_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Type"
    },
    "evidence_count": {
      "type": "integer",
      "title": "Evidence Count",
      "default": 0
    },
    "contradiction_count": {
      "type": "integer",
      "title": "Contradiction Count",
      "default": 0
    },
    "confidence_decay_rate": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Confidence Decay Rate"
    },
    "last_validated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Validated At"
    },
    "valid_from": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Valid From"
    },
    "valid_to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Valid To"
    },
    "tx_from": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tx From"
    },
    "tx_to": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tx To"
    },
    "superseded_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Superseded By"
    },
    "is_current": {
      "type": "boolean",
      "title": "Is Current",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "id",
    "content",
    "memory_type",
    "importance",
    "created_at",
    "updated_at",
    "last_accessed",
    "access_count"
  ]
}