{
  "id": "memory-engramx",
  "kind": "memory",
  "name": "Memory (EngramX)",
  "description": "Hybrid memory: local SQLite search + EngramX canister as source of truth + periodic backup",
  "uiHints": {
    "canisterId": {
      "label": "Engram Canister ID",
      "placeholder": "xxxxx-xxxxx-xxxxx-xxxxx-xxx",
      "help": "Your engram canister ID (or use ${ENGRAM_CANISTER_ID})"
    },
    "sessionKeyPath": {
      "label": "Session Key Path",
      "placeholder": "~/.engramx/session.key",
      "help": "Path to Ed25519 operator session key",
      "advanced": true
    },
    "host": {
      "label": "ICP Host",
      "placeholder": "https://ic0.app",
      "help": "ICP replica host (use http://localhost:4943 for local dev)",
      "advanced": true
    },
    "memoryDir": {
      "label": "Memory Directory",
      "placeholder": "memory",
      "help": "Local directory for memory markdown files (synced with engram)",
      "advanced": true
    },
    "sync.onStartup": {
      "label": "Sync on Startup",
      "help": "Pull memory files from engram canister when OpenClaw starts"
    },
    "sync.intervalMinutes": {
      "label": "Sync Interval (minutes)",
      "placeholder": "60",
      "help": "How often to sync memory files with the engram canister (0 = disabled)",
      "advanced": true
    },
    "sync.pushOnWrite": {
      "label": "Push on Write",
      "help": "Write memory changes to both engram canister and local disk"
    },
    "backup.enabled": {
      "label": "SQLite Backup",
      "help": "Periodically backup the local SQLite database to the engram canister"
    },
    "backup.intervalMinutes": {
      "label": "Backup Interval (minutes)",
      "placeholder": "360",
      "help": "How often to backup the SQLite database (minimum 30)",
      "advanced": true
    },
    "git.enabled": {
      "label": "Git Versioning",
      "help": "Auto-commit memory files to a git repo after each sync"
    },
    "git.pushOnSync": {
      "label": "Push on Sync",
      "help": "Push to remote after each sync commit (default: off)",
      "advanced": true
    },
    "git.pushOnStop": {
      "label": "Push on Stop",
      "help": "Push to remote when OpenClaw shuts down (default: on)",
      "advanced": true
    }
  },
  "configSchema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "canisterId": {
        "type": "string"
      },
      "sessionKeyPath": {
        "type": "string"
      },
      "host": {
        "type": "string"
      },
      "memoryDir": {
        "type": "string"
      },
      "sync": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "onStartup": {
            "type": "boolean"
          },
          "intervalMinutes": {
            "type": "number",
            "minimum": 0
          },
          "pushOnWrite": {
            "type": "boolean"
          }
        }
      },
      "backup": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "intervalMinutes": {
            "type": "number",
            "minimum": 30
          },
          "dbLabel": {
            "type": "string"
          }
        }
      },
      "git": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "pushOnSync": {
            "type": "boolean"
          },
          "pushOnStop": {
            "type": "boolean"
          }
        }
      }
    },
    "required": ["canisterId"]
  }
}
