A Log-Structured Merge-Tree (LSM Tree) is a write-optimized data structure used in storage engines for databases and key-value stores. It achieves high write throughput by batching updates in an in-memory memtable and sequentially flushing them to disk as sorted, immutable SSTables (Sorted String Tables). This design minimizes random disk I/O, making it ideal for workloads with frequent inserts and updates, such as in time-series data or agentic memory systems managing rapid state changes.
