graph LR
    subgraph "~/.openclaw/ 存储结构"
        subgraph "设备层"
            DI[device-identity.json<br/>Ed25519 密钥对]
            CRED[credentials/<br/>设备 Token]
        end

        subgraph "配置层"
            CONFIG[config.json<br/>全局配置]
            SECRETS[secrets/<br/>API Key 引用]
        end

        subgraph "Agent 层 (per-agent)"
            subgraph "agents/main/"
                SESS[sessions.json<br/>会话元数据]
                TRANS[sessions/*.jsonl<br/>会话转录]
                WS[workspace/<br/>工作区文件]
                HMD2[HEARTBEAT.md]
                MEMDB[memory.sqlite<br/>向量+全文索引]
            end
        end
    end

    style DI fill:#E67E22,color:#fff
    style CONFIG fill:#3498DB,color:#fff
    style SESS fill:#2ECC71,color:#fff
    style MEMDB fill:#9B59B6,color:#fff