Loading patterns…
Graph State Machines
Finite state machines implemented as graphs for workflow control
In 30 seconds
- What
- Models workflow as states connected by guarded transitions, executing deterministic paths based on events and validation rules.
- When to use
- Multi-stage processes with clear state boundaries, rollback needs, and conditional branching based on step outcomes.
- Watch out
- State explosion and maintenance burden grow quickly as edge cases and error paths multiply beyond initial design.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Graph State Machines: Overview
Finite state machines implemented as graphs for workflow control
- State transition management
- Event-driven execution
- Deterministic flow control
- State validation and guards
- Rollback capabilities
- Visual workflow representation
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
- Harel (1987): Statecharts - A Visual Formalism for Complex Systems
- Murata (1989): Petri Nets - Properties, Analysis and Applications
- Workflow Patterns (van der Aalst et al.)
From the engineer behind this catalog
Get your agent architecture reviewed
This page documents one pattern. Your system runs dozens, and most failures live in how they fit together. Have the whole design reviewed against the 288 patterns in this catalog: architecture, reliability, evaluation and cost, every finding mapped to the pattern that fixes it.
€750 instead of €1,500, one week, written report and walkthrough call, until 30 September