Agents are Just While Loops

Agents are Just While Loops

From MLOps.community by Demetrios

May 15, 2026 · 41 min

About this episode

Hamza Tahir discusses the simplicity of agents in ML, comparing them to while loops and introducing ZenML's new execution runtime, Kitaru.

Hamza Tahir , co-founder of ZenML, joins the show to cut through the hype around long-running agents — arguing that at the end of the day, an agent is just a while loop that talks to a model, calls a tool, and writes to a file system. He covers the architecture of agent harnesses (inner and outer), what durable execution actually guarantees (and what it doesn't), and why the ML pipeline paradigm is a cleaner mental model than transactions for most agent workloads. Hamza also announces Kitaru — ZenML's new open-source execution runtime for async Python agents — built on five years of running ML workloads in enterprise environments. What we get into: Agents are while loops: The surprising simplicity under all the tooling: a brain (LLM), hands (tool calls), and a file system, stacked recursively Inner harness vs outer harness: Why Pydantic AI owns the inner loop while production deployment needs a separate runtime layer What "long-running" actually means: Why the infrastructure we need to build is about extrapolating the future, not defining a time window today Durable execution demystified: What checkpointing actually guarantees (infra failures, pod death, network drops)…

People in this episode

Host: Demetrios

Guest: Hamza Tahir

Topics covered

  • long-running agents
  • ML pipelines
  • agent architecture
  • durable execution
  • async Python agents

Keywords

  • agents
  • while loops
  • ML pipeline
  • Kitaru
  • durable execution
  • async Python
  • agent workloads
  • Pydantic AI

Mentioned in this episode

Organizations: ZenML, Pydantic AI, Anthropic

Products: Kitaru

More episodes of MLOps.community

Explore listener stats, chart rankings, contacts and more on the MLOps.community podcast page.