From Loops to Graphs: The Architecture Playbook for Reliable AI Agents | NexusAi