The AI engineering landscape has recently been abuzz with a perceived dichotomy: should AI systems be architected as autonomous, ReAct-style agents, or as structured workflow graphs? At the AI Engineer World's Fair, Sam Bhagwat, co-founder and CEO of Mastra.ai and author of *Principles of AI Agents*, offered a refreshing perspective, cutting through the noise with sharp analysis and practical wisdom. He dismissed the agents-versus-workflows debate as "kinda dumb," advocating instead for a synergistic approach.
Bhagwat set the stage by referencing two recent industry publications that fueled the contention. Anthropic's December blog post, "Building effective agents," provided a canonical definition of both agents and workflows, complete with illustrative diagrams. However, OpenAI's subsequent April paper on building agents was, as Bhagwat noted, "less well received," largely due to its "anti-workflow language." This sparked a backlash, with many in the community feeling that OpenAI was muddying the waters by dismissing established, effective patterns.
This sentiment led to Bhagwat’s first "hot take": "Don't be That Guy." He drew a parallel to the web development world of the last decade, where certain large tech companies, acting from a position of authority, lectured developers on the "right way to use the platform." This often translated into pushing proprietary or overly complex technologies while dismissing popular, developer-friendly alternatives like React. "Sometimes That Guy works for a FAANG type company in a public facing role," Bhagwat quipped, "Then the rest of us are really in for it." He hopes for a higher quality of discourse in the nascent AI engineering field, free from such prescriptive pronouncements.
His second hot take targeted the use of "Graph," "node," and "edge" as framework API terms, deeming them "harmful." Reflecting on his experience as co-founder of Gatsby.js, a React meta-framework that defaulted to GraphQL for data fetching, Bhagwat recounted how many users simply desired a straightforward React meta-framework, not an immersion in graph theory. He argued that forcing developers to "learn graph theory to write workflows" is counterproductive. Instead, he championed "a more grokkable pattern for stateful workflows," emphasizing fluent syntax and clear control flow that allow engineers to easily discern the sequence of operations.
Ultimately, Bhagwat stressed that "The real alpha is in using them together." Agents, he explained, are like a turn-based game, maintaining conversation memory, executing tasks autonomously, making context-based decisions, and utilizing tools. Workflows, conversely, are composable pipelines with defined steps, data passing, validation, and error handling—akin to a "rules engine for your tech tree." The non-deterministic nature of large language models (LLMs) makes structured workflows crucial for instrumentation, tracing, and replayability, a need "far higher" than in traditional software engineering. The true power emerges when agents are given workflows as tools, or when workflows facilitate handoffs between specialized agents. This hybrid approach leverages the strengths of both paradigms, offering both the power of autonomous decision-making and the control of structured processes.

