Uploaded February 2026 | Updated December 2026, 7 hours ago
✨ This talk was recorded at Code BEAM Europe in November 2025. If you're curious about our upcoming event, check codebeameurope.com ✨
---
gen_statem is a rarely talked about and used OTP behaviour. Most BEAM developers reach for GenServer when building processes, but in the world of AI agents, gen_statem is the hidden gem that transforms complex agent loops into declarative state machines. Learn why gen_statem's behaviour aligns with AI agent patterns, enabling developers to easily write cleaner code describing how their agents behave. You'll learn how to build gen_statem processes, using features such as state functions, internal events, and postponing to build ReAct (Reasoning/Actions) AI agent loops. This talk is perfect for anyone building AI agents with Elixir wanting to level up their implementation with OTP behaviours.
---
Let's keep in touch! Follow us on:
💥 Bluesky: / codebeam.bsky.social
💥 Twitter: / codebeamio
💥 LinkedIn: / code-sync
✨ This talk was recorded at Code BEAM Europe in November 2025. If you're curious about our upcoming event, check codebeameurope.com ✨
---
gen_statem is a rarely talked about and used OTP behaviour. Most BEAM developers reach for GenServer when building processes, but in the world of AI agents, gen_statem is the hidden gem that transforms complex agent loops into declarative state machines. Learn why gen_statem's behaviour aligns with AI agent patterns, enabling developers to easily write cleaner code describing how their agents behave. You'll learn how to build gen_statem processes, using features such as state functions, internal events, and postponing to build ReAct (Reasoning/Actions) AI agent loops. This talk is perfect for anyone building AI agents with Elixir wanting to level up their implementation with OTP behaviours.
---
Let's keep in touch! Follow us on:
💥 Bluesky: / codebeam.bsky.social
💥 Twitter: / codebeamio
💥 LinkedIn: / code-sync










