WhoBuilt

Agents vs Workflows: Why Not Both?

Aug 1, 2025· 16 min· 24K views·Watch on YouTube

Speaker

Sam Bhagwat, co-founder of Mastra.ai and former Gatsby co-founder, discusses how to combine agents and workflows at an AI Engineer talk.

Keep the debate useful

Bhagwat discusses the debate sparked by Anthropic’s “Building Effective Agents” post and an OpenAI paper, arguing that prominent model providers should be careful because their views carry weight. He also warns that workflow APIs built around nodes and edges can be hard for teams to read and use.

Make workflow control flow readable

Bhagwat says teams should not need to learn graph theory to build production workflows. He points to Mastra’s fluent workflow syntax, where the sequence of steps is visible from top to bottom, as an example of code colleagues can understand.

Choose where to add structure

Bhagwat compares agents to turn-based games, with back-and-forth turns and possible tool calls, and workflows to dependency chains such as a technology tree. Workflows can add branching, parallelism, conditions, loops, suspension, resumption, and replay; they are especially useful in AI systems where tracing nondeterministic behavior matters. He frames the choice as a trade-off between power and control, adding structure where reliability is weak.

Combine agents and workflows

Bhagwat describes agents as tools or workflow steps, and workflows as tools for agents. Examples include a supervisor agent calling research and summary agents, a workflow that plans a location, checks weather, and plans a trip, and nested workflows. He also suggests limiting or dynamically choosing tools when an agent struggles with many options.

Let practice guide the theory

In the Q&A, Bhagwat says that if an agent works for the task at hand, teams should use it, even when it does not fit current theory. He describes the field as young, with practice evolving faster than theory.

Takeaways

  • Use workflows to make important control flow visible and easier to trace.
  • When reliability suffers, break a large LLM task into smaller, structured calls.
  • Give agents only the tools they need for the current task when tool overload causes failures.
  • Combine agents and workflows as tools or steps to fit the application.
  • Treat working practice as evidence when theory has not caught up.

Mentioned in this talk

Search inside this talk

What was claimed 6

Related talks