Jonatan Matajonmatum.com
conceptsnotesexperimentsessays
© 2026 Jonatan Mata. All rights reserved.v2.1.1
Concepts

Agentic Workflows

Design patterns where AI agents execute complex multi-step tasks autonomously, combining reasoning, tool use, and iterative decision-making.

evergreen#agentic#workflows#ai-agents#orchestration#automation#llm

What it is

An agentic workflow is a pattern where one or more AI agents execute complex tasks autonomously, making decisions at each step about what action to take, which tool to use, and when to request human intervention. Unlike a fixed pipeline, the agent adapts its behavior based on intermediate results.

Fundamental patterns

Reflection

The agent evaluates its own output and improves it iteratively:

Generate → Evaluate → Refine → Evaluate → Deliver

Useful for: writing, code generation, analysis.

Planning (Plan-and-Execute)

The agent decomposes the task into subtasks before executing:

Analyze task → Create plan → Execute step 1 → ... → Step N → Synthesize

Useful for: research, complex tasks with multiple dependencies.

Tool use (ReAct)

The agent alternates between reasoning and action:

Think → Act → Observe → Think → Act → Observe → Respond

This is the most common pattern in frameworks like Strands Agents.

Multi-agent

Multiple specialized agents collaborate:

Orchestrator → Research agent → Writer agent → Reviewer agent → Result

Autonomy levels

The choice of autonomy level depends on task risk and system maturity:

  1. Assisted: agent suggests, human approves each step. Ideal for high-risk tasks like modifying infrastructure or sending communications
  2. Supervised: agent executes, human reviews key points. Good for code generation or data analysis
  3. Autonomous: agent executes end-to-end, reports results. Appropriate for well-defined repetitive tasks
  4. Collaborative: multiple agents coordinate with minimal human intervention. The most advanced pattern, requires robust guardrails

ReAct flow in detail

Loading diagram...

Example with Strands Agents

from strands import Agent
from strands.tools import tool
 
@tool
def search_docs(query: str) -> str:
    """Search relevant documents in the knowledge base."""
    # Search implementation
    return results
 
agent = Agent(
    model="us.anthropic.claude-sonnet-4-20250514-v1:0",
    tools=[search_docs],
    system_prompt="You are a research assistant. Use search_docs to find information before answering."
)
 
response = agent("What are the best practices for RAG?")

The agent autonomously decides when to invoke search_docs and how many times to iterate before responding.

Anti-patterns

  • Agent for everything: using an agent when a fixed pipeline would suffice — adds unnecessary latency and cost
  • No iteration limit: an agent without max_turns can enter infinite loops
  • Ambiguous tools: if two tools do similar things, the agent will choose inconsistently
  • No fallback: when the agent fails, there should be a clear recovery path

Design considerations

  • Guardrails: define clear boundaries of what the agent can and cannot do
  • Observability: log every decision and action for debugging
  • Error recovery: the agent should handle failures gracefully
  • Cost: each iteration consumes tokens — establish limits
  • Evaluation: measure result quality, not just completion

Connection with MCP

The Model Context Protocol provides the tool layer that agentic workflows need. Without a standard protocol for discovering and using tools, each workflow requires ad-hoc integrations.

Why it matters

Agentic workflows allow LLMs to move from answering questions to executing complex multi-step tasks. Understanding their patterns — ReAct, planning, reflection — is the difference between building chatbots and building assistants that actually complete work.

References

  • The Landscape of Emerging AI Agent Architectures — Masterman et al., 2024. Overview of agent architectures.
  • Building Effective Agents — Anthropic, 2024. Practical guide to agentic patterns.
  • Design Patterns for AI Agents — Zhuge et al., 2024. Taxonomy of design patterns for agents.
  • ReAct: Synergizing Reasoning and Acting in Language Models — Yao et al., 2022. The paper that formalized the ReAct pattern.
  • Strands Agents — Documentation — AWS. SDK for building agents with tools.

Related content

  • AI Agents

    Autonomous systems that combine language models with reasoning, memory, and tool use to execute complex multi-step tasks with minimal human intervention.

  • Model Context Protocol (MCP)

    Open protocol created by Anthropic that standardizes how AI applications connect with external tools, data, and services through a universal interface.

  • Strands Agents

    Open source SDK from AWS for building AI agents with a model-driven approach. Functional agents in a few lines of code, with multi-model support, custom tools, MCP, multi-agent, and built-in observability.

  • AI Orchestration

    Patterns and frameworks for coordinating multiple AI models, tools, and data sources in production pipelines, managing flow between components, memory, and error recovery.

  • Tool Use Patterns

    Design strategies and patterns for AI agents to select, invoke, and combine external tools effectively to complete complex tasks.

  • Content Agent with Strands and Bedrock

    Three-agent system that automates the bilingual MDX content lifecycle: deterministic QA auditing, surgical fixes, and full upgrades — all orchestrated with Strands Agents, Claude Sonnet 4 on Amazon Bedrock, and GitHub Actions with a diamond workflow pattern.

  • Prompt Caching

    Technique that stores the internal computation of reused prompt prefixes across LLM calls, reducing costs by up to 90% and latency by up to 85% in applications with repetitive context.

  • Multi-Agent Systems

    Architectures where multiple specialized AI agents collaborate, compete, or coordinate to solve complex problems that exceed a single agent's capability.

  • Function Calling

    LLM capability to generate structured calls to external functions based on natural language, enabling integration with APIs, databases, and real-world tools.

  • AWS Step Functions

    AWS serverless orchestration service that coordinates multiple services into visual workflows using Amazon States Language (ASL), with built-in error handling, retries, and parallel execution.

Concepts