{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/h2o-ai/main/json-schema/h2o-ai-memory-block-create-request-schema.json",
  "title": "MemoryBlockCreateRequest",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/h2o-ai-memory-blocks-api-openapi.yml#/components/schemas/MemoryBlockCreateRequest",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the memory block."
    },
    "content": {
      "type": "string",
      "description": "Initial content of the memory block."
    },
    "system_prompt_amendment": {
      "type": "string",
      "description": "System prompt amendment for agent mode that drives changes to the memory block."
    },
    "injection_mode": {
      "type": "string",
      "description": "Where memory content is injected. 'system_prompt' (default) adds it to the LLM system prompt; 'user_instruction' prepends it to the user message; 'agent_file' makes it only available as AGENTS.md in agent mode; 'agent_tool' exposes content lazily via the read_memory_block / update_memory_block tools (no pre-injection).",
      "enum": [
        "system_prompt",
        "user_instruction",
        "agent_file",
        "agent_tool"
      ]
    },
    "access_mode": {
      "type": "string",
      "description": "Controls whether the LLM/agent can read the memory, write to it, or both.",
      "enum": [
        "read",
        "write",
        "read_write"
      ]
    },
    "max_content_length": {
      "type": "integer",
      "default": 10000,
      "description": "Maximum number of characters allowed in memory content. Set to 0 for unlimited. In LLM mode, new memories are appended and oldest content is trimmed when this limit is exceeded."
    }
  }
}