{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mengram-io/json-schema/mengram-io-add-request-schema.json",
  "title": "AddRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mengram-io-openapi.json#/components/schemas/AddRequest",
  "properties": {
    "user_id": {
      "type": "string",
      "title": "User Id",
      "default": "default"
    },
    "messages": {
      "items": {
        "$ref": "#/$defs/Message"
      },
      "type": "array",
      "maxItems": 500,
      "title": "Messages"
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id"
    },
    "run_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Run Id"
    },
    "app_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "App Id"
    },
    "source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    },
    "expiration_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expiration Date"
    },
    "dry_run": {
      "type": "boolean",
      "title": "Dry Run",
      "default": false
    },
    "prompt_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt Version"
    },
    "agent_mode": {
      "type": "boolean",
      "title": "Agent Mode",
      "default": false
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "messages"
  ],
  "$defs": {
    "Message": {
      "properties": {
        "role": {
          "type": "string",
          "title": "Role"
        },
        "content": {
          "type": "string",
          "maxLength": 100000,
          "title": "Content"
        }
      },
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "title": "Message"
    }
  }
}