Most agent tutorials show you how to build a prototype in twenty lines of code. Almost none show you how to make it survive production traffic. When you build stateful, cyclical workflows in LangGraph, you need three non-negotiable architectural anchors:
An LLM is a probabilistic token generator. It should never decide whether a loop terminates or which branch executes. Pure Python checks boolean policies, score thresholds, and iteration ceilings.
Rule 2: Channel Reducers over Shared Variables. Under Pregel execution, parallel nodes do not mutate a shared dictionary in memory. They emit delta updates during a superstep. If two parallel evaluator judges return updates to the same channel without an explicit reducer (Annotated[dict, merge_evaluations]), the last node silently erases the first.
Rule 3: Side-Effect Isolation. External mutations—sending emails, charging cards, calling webhooks—belong in the host wrapper that invokes the graph, never inside node bodies. Otherwise, those side-effects fire repeatedly during test runs, rollbacks, and replays.