Definition
An agentic workflow is an architectural pattern in AI system design where a model is given the autonomy to plan, execute, and iterate on a task until it achieves a desired outcome.
Key Patterns
According to industry research (notably by Andrew Ng), agentic workflows typically follow four main patterns:
1. Reflection
The model reviews its own work and makes improvements. For example, a model might write code, find bugs in its own code, and then fix them.
2. Tool Use
The model is given access to external tools (search engines, calculators, code executors) to perform tasks beyond its internal training data.
3. Planning
The model breaks down a complex goal into a series of smaller, manageable steps before executing them.
4. Multi-agent Collaboration
Different models or "agents" work together, playing different roles (e.g., a "Coder" and a "Reviewer") to achieve a higher-quality result.
Benefits
- Higher Quality: Iterative refinement consistently leads to better results than single-shot prompting.
- Handling Complexity: Can solve problems that are too large for a single context window or prompt.
- Reliability: Self-correction loops help identify and fix hallucinations or errors.
Applications
Agentic workflows are used in:
- Autonomous Coding: Tools like Claude Code that can browse files, run tests, and fix errors.
- Data Analysis: Agents that can write SQL, execute it, and provide a summary of the results.
- Research: Systems that can search the web, synthesize multiple sources, and write a report.