← back

Building Multi agent Systems with Finite State Machines

4.2K views · Feb 22, 2025 · 17:10 min · Watch on YouTube ↗
Takeaway

Pair LLMs with finite state machines + actors to get governable, auditable agentic systems that compensate for LLM unpredictability.

Summary

  • Finite state machines (and statecharts) provide predictability, auditability, recoverability, and modelbased testing — the inverse properties of LLMs.
  • Actor model complements statecharts: autonomous entities communicate via message passing and house FSMs as their internal logic.
  • Patterns ladder: tool use → human-in-the-loop approval → feedback (critic agent) → collaboration (specialized agents) → orchestration where an LLM picks next state.
  • Saga pattern handles compensating transactions for distributed multi-step transactions across agents.
  • Challenges flagged: state explosion, unhandled events, concurrency, versioning of state machines across deployments.
state-machinesmulti-agentgovernance
Original description
State machines and the Actor model are a timeless foundation for designing robust, scalable, and maintainable distributed systems by providing clear abstractions for managing state, concurrency, and message-driven communication. But as foundational AI models grow more intelligent and autonomous, do these tools still have a place?

This talk explores how State machines and the Actor model can be leveraged alongside LLMs to build Agents that reason, plan, and act with observability, reliability, and control. The Agentic patterns of tool use, feedback, collaboration, orchestration, and chartering are all introduced through the clarifying lens of State Charts.

https://github.com/adamterlson/AgenticStateMachines