Production-grade AI agents: keep the logic deterministic
Asking an LLM whether a value changed significantly turns a cheap comparison into a slow, untestable guess. Here is the split I use in WordPress: PHP thresholds decide when to act, and the model only writes the message.