Exploring Finite State Machines: A Foundation for AI Governance in 2025
Join Adam Charlson as he explores how finite state machines provide a structured and reliable foundation for building applications, including AI agents, in this video that delves into the intersection of AI governance and State machines.
- 1. Adam Charlson talks about how finite state machines can provide a structured, reliable foundation for building applications, including AI agents.
- 2. As AI becomes more autonomous, the challenge is not just intelligence or model performance, but also building systems with predictability, observability, and control.
- 3. In 2025, Gartner lists genetic AI and AI governance platforms as top trends; state machines can play a foundational role in building platforms that effectively govern agent decision-making and beha
- 4. A finite state machine is a computational model of a system with states and transitions triggered by events.
- 5. The example used is the game of rock, paper, scissors, which has five key components: state definitions, transition logic, guard for enforcing valid transitions, actions/effects, and context.
- 6. A state chart is an extension of a state machine with a richer vocabulary, including hierarchical and parallel states; the terms are used interchangeably in this presentation.
- 7. The actor model complements state charts by providing a framework for concurrent, distributed, and encapsulated execution.
- 8. Actors are autonomous entities that interact with other actors via message passing; finite state machines can be used to define an actor's internal behavior or logic.
- 9. State machines bring significant advantages, including predictability, traceability, reliability, recoverability, low latency, ease of testing, modularity, adaptability, scalability, and handling c
- 10. Challenges of state machines include limited flexibility, potential for a large state explosion, explicit modeling of transitions, event handling for unmodeled events, concurrency/parallelism hand
- 11. Combining LLMs (large language models) and state machines can build a system that leverages the strengths of one to mitigate the weaknesses of the other.
- 12. The building blocks of agentic systems are actors, which enable autonomy and communication, and state machines, which provide structure and enforce predictable behaviors, with LLMs enabling dynami
- 13. The agentic state machines pattern showcases how these building blocks can be put into action in tool use, human-in-the-loop, feedback, collaboration, agentic orchestration, and agentic chartering
- 14. Tool use is the foundational pattern, giving LLMs the ability to act; a description of available tools is passed to the LLM, which then expects the next message in the flow to be the tool response
- 15. Human-in-the-loop is natural for state machines; an intermediate approval step can be added to control an LLM's use of tools.
- 16. Feedback involves iterating with feedback from another agent, human, or both to improve response quality; this can dramatically enhance the LLM's output.
- 17. Collaboration involves multiple agents working together to achieve a broader outcome, motivated by training limitations and prompting challenges for LLMs.
- 18. Agentic orchestration allows an LLM to determine the next state in a sequence of states; this is helpful when context-based reasoning is required to determine the next state.
- 19. Agentic chartering involves giving the whole state chart over to the LLM and asking it to generate a new process; this can be used for separating planning from execution phases.
- 20. Emergence, a pattern not yet expressible with a state chart, may be achieved through building agentic systems that feel like building with Legos, where specialized units are composed together into
- 21. The humble state machine may have a foundational role to play for the next 70 years in technology that allows for composing specialized units into a greater whole.
- 22. XState library was used for all state charts and visualizations in this presentation.
- 23. A demo, "Red vs Blue," explores more about the operational side of state machines, with an emergent surprise at the end.
- 24. Reach out to Adam Charlson on LinkedIn for questions, feedback, or just to connect.
Source: AI Engineer via YouTube
❓ What do you think? What is the most significant challenge facing AI governance platforms, and how can finite state machines help address this challenge? Feel free to share your thoughts in the comments!