What is an agentic workflow?
An agentic workflow blends deterministic steps with model-driven decisions, giving an AI freedom where judgment is needed and structure everywhere else.
What is an agentic workflow?
An agentic workflow is a system that combines predefined structure with model-driven decisions. Parts of the process run as fixed steps written in code, and at the points where judgment is needed, a language model decides what to do next. It sits between a rigid automation script, which always follows the same path, and a fully autonomous agent, which chooses every step on its own. For most real work, that middle ground is exactly where reliable AI systems live.
The distinction comes straight from how practitioners describe agents. The Anthropic guide to building effective agents separates workflows, where models and tools are orchestrated through predefined paths, from agents, where models dynamically direct their own process. An agentic workflow deliberately mixes the two: deterministic where determinism is safer, agentic where flexibility is worth more.
Why the middle ground wins
Teams often assume the goal is maximum autonomy: an agent that figures out everything. In practice, autonomy is a cost as much as a feature. Every decision you hand to the model is a decision you can no longer predict, test exhaustively, or guarantee. Every step you keep in code is a step that behaves the same way every time.
The skill is putting autonomy only where it earns its keep. Parsing a date from an email, validating a field, or writing to a database are deterministic problems; a model adds risk without adding value. Deciding whether an inbound message is a complaint or a routine request, or how to phrase a reply in a firm's voice, is a judgment problem where the model shines. An agentic workflow draws that line on purpose, step by step, rather than handing the whole process to the model and hoping.
What it looks like in practice
Consider an email intake system. A rigid script could route messages by keyword, but it breaks the moment language varies. A fully autonomous agent could handle everything, but it is hard to constrain and audit. An agentic workflow splits the difference:
The model handles classification and drafting, the parts that need understanding. The workflow handles routing, gating, sending, and record-keeping, the parts that need to be exact. A person approves the consequential step. Each component does what it is best at.
The building blocks
Agentic workflows are usually assembled from a small set of patterns, often combined:
- Routing. A model classifies an input and the workflow sends it down the right branch. Good when inputs fall into categories that each deserve different handling.
- Chaining. A task is broken into a sequence of steps, each one a focused model call, with code validating between them. Good when a single prompt would be doing too much at once.
- A bounded agent step. At one point in the workflow, the model is given a goal and a set of tools and allowed to loop until done, but inside limits the workflow enforces. Good when the path cannot be predefined.
- Human review. The workflow pauses for human-in-the-loop approval before an irreversible action. Good for anything you cannot take back.
The art is choosing the least autonomy that still solves the problem. A routing-and-chaining workflow with no open-ended agent step is often more reliable than a free-running agent, and easier to test.
Where frameworks come in
You can build an agentic workflow by hand, but orchestration frameworks exist to make the structure explicit and durable. LangGraph models the workflow as a graph: nodes do the work, edges decide what runs next, and shared state carries information through the process, with built-in support for loops, branching, persistence, and human interrupts. Mastra gives TypeScript teams a similar set of primitives (agents, tools, workflows, and memory) close to their application code.
These frameworks matter because an agentic workflow has more moving parts than a single prompt. It has state to carry, branches to manage, retries to handle, and review points to coordinate. Doing that ad hoc gets fragile fast. The comparison pieces on LangGraph vs LangChain and Mastra vs Flue go deeper on how different tools approach the same orchestration problem.
When a workflow grows to involve multiple specialized agents, the question shifts from orchestration to communication. MCP and A2A describe the two connections involved: an agent reaching tools and data, and an agent delegating to another agent.
How XY Space builds them
Almost every XY Space deployment is an agentic workflow, not a free-running agent. The systems pair a deterministic core, which owns routing, gating, permissions, and record-keeping, with model-driven steps where judgment is required, and a person in the loop on anything consequential.
The insurance claims pipeline is a clear example. A model reads inbound email and extracts structured fields, which is the judgment step. The workflow validates those fields, routes edge cases to a quarantine queue, requires adjuster sign-off, and commits to the CRM, all deterministic. The model does what only a model can; the workflow does everything that should be exact and auditable. The same shape appears in the legal email work, where the model classifies and drafts while the workflow enforces approval before anything sends.
This is also why these systems are testable. Because the deterministic parts are code and the agentic parts are bounded, the team can evaluate each model step against real cases, scoring graded quality with an LLM-as-a-judge where exact-match checks fall short, and trust the structure around it. A fully autonomous agent is far harder to pin down.
A working definition
An agentic workflow is the practical answer to "how much should the model decide?" The answer is: as much as the task needs, and no more. Give the model freedom where understanding and judgment matter, keep deterministic structure where exactness matters, and put a person at the irreversible steps. That balance is what makes AI dependable enough to run on real operations.
If you are designing a system and trying to find that line between automation and control, it is most of what XY Space does. Talk to us.
Sources
Book a discovery call.Leave with a plan you can act on.
A paid map, a fixed-fee pilot on one workflow, then a build we run. Your people still decide. Everything we build stays yours.