Agentic Workflow

Agentic workflows are iterative patterns where AI models perform tasks through planning, tool use, and self-correction, rather than single-shot prompts.

AI agentagentic workflowtask automationiterative reasoningAI engineeringworkflow automation

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.

Frequently Asked Questions

An agentic workflow is a design pattern where an AI model is used iteratively to solve a problem. Instead of a single-shot prompt, the model follows a loop of planning, executing, and refining its work until a goal is met.
Traditional usage is often 'zero-shot'—you ask a question and get an answer. Agentic workflows involve multiple steps, often with the model 'talking to itself' or using tools to gather information before providing a final result.

Continue Learning

Explore our lessons and prompts to deepen your AI knowledge.