KDL basics
A layout is a text file that describes an arrangement of panes and tabs. They're written in KDL, a small, readable config language. A layout is just nested pane and tab nodes, with a split_direction where you want to control how children divide the space.
Read that top to bottom: one pane, then a vertically-split region holding two panes, the second of which runs htop on load. A pane with a command starts that program instead of a bare shell. Tabs work the same way, one level up.
Try it yourself
Write and load a layout
Create a small layout file and boot a session from it.
Tick every step to confirm you did it.
A pane that runs a command
Add a command-driven pane and confirm it launches on load.
A pane command="htop" (or any installed command) in your layout starts that program automatically when the session opens, instead of an empty shell.