State machines for agent logic are extremely slept-on: LEGO bricks agents can rearrange

DavidKPiano · x · 2026-10-19

David Khourshid argues that using state machines for agent logic is severely underrated.

Rather than treating them as static workflows, he sees them as LEGO bricks that agents can autonomously rearrange and improve, in a human-readable way. The alternative — freeform prompt/markdown logic — is like "shaping markdown Play-Doh and hoping it holds." The quoted tweet from Steve Ruiz notes the approach has been running for a month with only two restarts.

Original post →

More from coding & agent

coding & agent channel →