World's Fair 2025
Agents vs Workflows: Why Not Both? — Sam Bhagwat, Mastra.ai
Overview
This talk explores the synergy between AI agents and workflows, arguing that they are not mutually exclusive but rather complementary tools for building robust AI applications. The core thesis is that combining agentic capabilities with structured workflows offers a more powerful and flexible approach than relying on either in isolation. The speaker critiques the tendency for some to advocate for one approach exclusively, emphasizing the practical benefits of integrating both.
Who should watch
- AI engineers and builders
- Product Managers working on AI features
- Developers seeking to improve AI system reliability and structure
- Those interested in the debate between agent-based and workflow-based AI architectures
- Individuals facing challenges with AI application performance and reliability
Key takeaways
- The debate between agents and workflows often presents a false dichotomy; both can be effectively combined.
- Complex AI tasks can benefit from breaking down single large language model calls into multiple, more manageable calls, enhancing reliability.
- Workflow frameworks should prioritize readability and ease of understanding, avoiding overly complex patterns like graph theory for basic operations.
- Agents can be viewed as turn-based interactions, while workflows resemble rule engines or dependency chains, like those in game development or data pipelines.
- The emergent properties of agents include memory and conversational threads, while workflows offer branching, parallelism, conditions, and loops.
- Combining agents and workflows unlocks significant power, where an agent can be a step in a workflow, or a workflow can serve as a tool for an agent.
- The agent supervisor model, where agents call other agents as tools, is a powerful composition pattern.
- Dynamic tool injection, where specific tools are provided to an agent based on the task, can improve performance and prevent failures.
Notable quotes
*The real alpha comes from sort of like using these patterns together in the right sort of way.*
*The practice is evolving faster than the theory.*
Unofficial community note. Prefer the recording for nuance.