How an agentic workflow is built

A standard LLM request is one cycle: the user asks a question, the model generates an answer. An
agentic workflow breaks that linearity: the agent receives a goal — a task, not a question — and
builds its own plan for reaching it, calling tools, checking interim results and changing approach
where needed.

User goal
  ↓
Planning → list of subtasks
  ↓
Execute a step → function calling / MCP
  ↓
Reflection → goal reached?
  ├── No  → adjust the plan → next step
  └── Yes → answer the user

The four key patterns

Planning: the agent breaks a high-level goal into concrete steps before it starts executing. The
quality of that plan is the single biggest factor in how reliable the workflow turns out.

Tool use (function calling): the agent calls external APIs, databases and services through
function calling or MCP. That gives it access to current data beyond the model’s own knowledge.

Reflection: after each step the agent evaluates the result and decides whether a correction is
needed. Reflection is what stops errors from compounding.

Multi-agent delegation: complex tasks are handed to specialised agents over A2A, with an
orchestrator tracking overall progress.

An e-commerce workflow example

The task: “find me running shoes under $100 that can be delivered by Friday”.

  1. Planner: search → filter by price → filter by delivery → compare → select → order
  2. Search agent (MCP plus catalogue): 47 candidates
  3. Filter agent: 12 candidates under $100 with delivery by Friday
  4. Recommender agent: top 3 by rating and reviews
  5. Human-in-the-loop: shows the top 3, waits for the user to choose
  6. Checkout agent (ACP/YCP): places the order through a payment token

Risks and limits

Risk How to mitigate it
Hallucinations at intermediate steps Verification against external sources, explicit checks
Infinite loops A cap on the number of iterations
Irreversible actions Human-in-the-loop before critical steps
Context leaking between agents Minimise the data passed along

Tip: the more complex the workflow, the more important it is to log every step. That is the only
way to debug a scenario in which the agent made the wrong call at step three out of seven.