On this article, you’ll learn to distinguish agentic workflows from autonomous brokers by specializing in who owns management movement — a human writing code upfront, or a mannequin reasoning at runtime.
Subjects we’ll cowl embody:
- Why the true axis separating these methods is predictability versus autonomy, not whether or not an LLM is concerned.
- How deterministic workflows, orchestrated workflows, reactive brokers, and autonomous multi-agent methods differ, with runnable code that makes the control-flow distinction concrete.
- Why workflows, not absolutely autonomous brokers, dominate manufacturing at this time, and why hybrid architectures are the sample that holds up.

Introduction
Deloitte initiatives that by 2027, as much as 50% of firms utilizing generative AI may have launched agentic AI pilots or proofs of idea. That’s a wave of adoption large enough that the phrase “agentic” has began overlaying nearly something with an LLM name in it, from a hard and fast five-step pipeline the place step three occurs to name GPT for a abstract to a totally self-directing system that plans its personal path with no script in any respect.
These will not be the identical factor. Treating them as interchangeable results in one in all two errors: over-engineering a easy, well-understood process with pointless autonomy, or under-engineering a genuinely open-ended downside by forcing it right into a inflexible pipeline that breaks the second actuality deviates from the plan.
Anthropic attracts the foundational line of their extensively cited “Constructing Efficient Brokers” piece: workflows are methods the place LLMs and instruments are orchestrated by way of predefined code paths. Brokers are methods the place LLMs dynamically direct their very own course of and gear utilization, sustaining management over how they accomplish a process. Every part on this article is detailed beneath that one distinction.
This piece maps the complete spectrum of deterministic workflows, orchestrated methods, reactive single brokers, and autonomous multi-agent methods, with code at every stage that makes the control-flow distinction concrete somewhat than summary. The code right here illustrates structure, not a deployable system; the purpose of every snippet is to point out who decides what occurs subsequent, to not ship a characteristic.
The Actual Axis Isn’t “AI vs. No AI”: It’s Predictability vs. Autonomy
Earlier than evaluating architectures, it’s value changing the fallacious query. The query isn’t “does this technique use an LLM.” Virtually every part does now. The 2 questions that really matter, borrowing a framing that’s gained actual traction in structure circles, are: does this course of have to be repeatable, auditable, and explainable step-by-step? And: is the right path even identified upfront, or does the system want to find it at runtime?
A system can lean closely on an LLM and nonetheless be absolutely deterministic in construction — a hard and fast pipeline the place one step occurs to name a mannequin for textual content technology, however the subsequent step is hardcoded no matter what comes again. A system can be “agentic” with little or no actual autonomy: a tightly scripted loop with solely two allowed actions and a tough step restrict. The presence of an LLM name isn’t the sign. Possession of management movement is.
Google Cloud’s personal design-pattern documentation attracts this actual line operationally: deterministic workflows embody duties with a clearly outlined path identified upfront, the place the steps don’t change a lot from one run to the subsequent. Workflows that require dynamic orchestration contain issues the place the agent should decide the easiest way to proceed, and not using a predefined script. That’s the spectrum this text walks by way of, one stage at a time.
Deterministic Workflows
That is the baseline. A deterministic workflow has a identified sequence of steps determined at design time, by a human, in code. An LLM can sit inside any step — producing textual content, classifying enter, drafting a abstract — but it surely doesn’t select what occurs after its personal step runs. The orchestrating code does that, no matter what the mannequin returns.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# deterministic_pipeline.py # Stipulations: none past Python’s customary library # Run: python deterministic_pipeline.py
def mock_llm_classify(textual content: str) -> str: “”“ Mock LLM name — stands in for an actual API name to maintain this instance runnable with out an API key. The purpose is structural: no matter this returns, the NEXT operate that runs is already determined beneath. ““” if “refund” in textual content.decrease() or “cost” in textual content.decrease(): return “billing” return “common”
def extract(raw_input: str) -> str: “”“Step 1 — at all times runs, at all times results in step 2. No branching right here.”“” return raw_input.strip()
def classify(cleaned_text: str) -> str: “”“ Step 2 — calls an LLM to supply a label, however the label has no impact on which operate runs subsequent. That is the deterministic half: the mannequin fills in a bit of knowledge, it does not affect the route. ““” label = mock_llm_classify(cleaned_text) print(f” [classify] LLM returned label=”{label}” (informational solely)”) return cleaned_text
def summarize(cleaned_text: str) -> str: “”“Step 3 — at all times runs after step 2, whatever the label from step 2.”“” return f“Abstract: {cleaned_text[:40]}…”
def notify(abstract: str) -> str: “”“Step 4 — at all times runs final. The trail is mounted at design time.”“” return f“Notification despatched: {abstract}”
def run_deterministic_pipeline(raw_input: str) -> str: “”“ The management movement right here is written solely by a human, upfront. Each run takes the equivalent path: extract -> classify -> summarize -> notify. The LLM name inside classify() produces a label, however that label is rarely used to determine what operate runs subsequent — it is information flowing by way of a hard and fast pipe. ““” step1 = extract(raw_input) step2 = classify(step1) step3 = summarize(step2) step4 = notify(step3) return step4
if __name__ == “__main__”: # Two inputs that the LLM would classify fully in another way result_1 = run_deterministic_pipeline(“I need a refund for my final cost”) result_2 = run_deterministic_pipeline(“What are your corporation hours?”)
print(f“nResult 1: {result_1}”) print(f“Consequence 2: {result_2}”) |
run: python deterministic_pipeline.py, no dependencies required.
Output:
|
[classify] LLM returned label=‘billing’ (informational solely) [classify] LLM returned label=‘common’ (informational solely)
Consequence 1: Notification despatched: Abstract: I need a refund for my final cost... Consequence 2: Notification despatched: Abstract: What are your enterprise hours?... |
Discover what occurred: the mock LLM categorized the 2 inputs fully in another way, billing versus common, and it made zero distinction to the trail both enter took. Each went by way of the very same 4 features in the identical order. That’s the complete definition of deterministic: the route is mounted, even when an LLM is doing actual work inside one of many steps.
Orchestrated Workflows
That is the center floor that will get mislabeled most frequently as “agentic,” and it’s value slowing down right here as a result of it’s the road most individuals really cross after they begin utilizing that phrase loosely.
An orchestrated workflow nonetheless has a graph of doable paths outlined solely upfront, however which path will get taken now will depend on a runtime choice, continuously made by an LLM name. That is nonetheless a workflow. Each department that might be taken was anticipated and written into code by a human earlier than the system ever ran. The LLM picks a department off a menu another person wrote. It doesn’t invent a brand new merchandise on that menu.
That is exactly the “dynamic orchestration” class Google Cloud separates from real brokers — the system must plan and route, however inside a construction {that a} human nonetheless absolutely designed.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# orchestrated_pipeline.py # Stipulations: none past Python’s customary library # Run: python orchestrated_pipeline.py
def mock_llm_classify(textual content: str) -> str: “”“Mock LLM classification name.”“” text_lower = textual content.decrease() if “refund” in text_lower or “cost” in text_lower: return “billing” if “crash” in text_lower or “error” in text_lower or “bug” in text_lower: return “technical” return “common”
def extract(raw_input: str) -> str: return raw_input.strip()
# Three pre-defined downstream handlers. A human wrote all three of those # upfront. The LLM doesn’t invent a fourth path — it may solely choose # amongst branches that exist already on this code. def handle_billing(textual content: str) -> str: return f“[BILLING TEAM] Routed: {textual content[:50]}”
def handle_technical(textual content: str) -> str: return f“[TECH SUPPORT] Routed: {textual content[:50]}”
def handle_general(textual content: str) -> str: return f“[GENERAL QUEUE] Routed: {textual content[:50]}”
# The department map IS the complete choice house. Each key right here was written # by a human forward of time. The LLM’s job is to choose a key — not outline one. ROUTE_MAP = { “billing”: handle_billing, “technical”: handle_technical, “common”: handle_general, }
def run_orchestrated_pipeline(raw_input: str) -> str: “”“ Nonetheless a workflow, not an agent: each doable path was anticipated and coded by a human forward of time, sitting in ROUTE_MAP. The LLM name decides WHICH pre-built department executes for this particular enter, however it can’t invent a department that is not already a key in ROUTE_MAP. ““” cleaned = extract(raw_input) label = mock_llm_classify(cleaned) print(f” [route] LLM categorized as ‘{label}’ -> dispatching to handle_{label}()”)
handler = ROUTE_MAP.get(label, handle_general) return handler(cleaned)
if __name__ == “__main__”: test_inputs = [ “I was charged twice for my refund request”, “The app keeps crashing with an error on startup”, “What are your business hours?”, ] for inp in test_inputs: end result = run_orchestrated_pipeline(inp) print(f” Consequence: {end result}n”) |
run: python orchestrated_pipeline.py, no dependencies required.
Output:
|
[route] LLM categorized as ‘billing’ -> dispatching to handle_billing() Consequence: [BILLING TEAM] Routed: I was charged twice for my refund request
[route] LLM categorized as ‘technical’ -> dispatching to handle_technical() Consequence: [TECH SUPPORT] Routed: The app retains crashing with an error on startup
[route] LLM categorized as ‘common’ -> dispatching to handle_general() Consequence: [GENERAL QUEUE] Routed: What are your enterprise hours? |
Three totally different inputs took three totally different paths this time — that’s new in comparison with the earlier part. However take a look at ROUTE_MAP: each doable vacation spot was already written into the code earlier than any of those inputs arrived. The LLM exercised judgment about which key to make use of. It by no means had the choice to create a key that wasn’t there. That distinction — a hard and fast set of doable paths versus a path that will get invented at runtime — is strictly the place the subsequent part picks up.
Reactive Brokers: The ReAct Loop and a Genuinely Open Path
That is the place actual autonomy begins. The ReAct sample — Reasoning plus Appearing, launched by Yao et al. in 2022 — lets the mannequin itself determine, at every step, what motion to take subsequent based mostly on what it noticed from the earlier motion. There isn’t any pre-written department overlaying each case. The agent operates in an iterative loop of thought, motion, and commentary till an exit situation is met, and the sequence itself — what number of steps, in what order, and which instruments — isn’t knowable upfront. Solely the obtainable actions are mounted; the trail by way of them isn’t.
That is the architectural threshold the earlier two sections have been constructing towards. Within the orchestrated workflow, a human wrote each doable department into ROUTE_MAP earlier than the system ran. Right here, the mannequin decides each the trail and the sequence size at runtime, regardless that the toolset itself continues to be mounted.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# react_loop.py # Stipulations: none past Python’s customary library # Run: python react_loop.py
def search_knowledge_base(question: str) -> str: “”“A device the agent can name. Whether or not and when it will get known as isn’t determined right here — it is determined by the mannequin, at runtime.”“” mock_kb = { “refund coverage”: “Refunds can be found inside 30 days of buy.”, “transport time”: “Normal transport takes 5-7 enterprise days.”, } for key, worth in mock_kb.objects(): if key in question.decrease(): return worth return “No matching data present in data base.”
def escalate_to_human(motive: str) -> str: “”“A second device the agent can name — once more, the choice to name this as an alternative of the search device is made by the mannequin, not by this code.”“” return f“Escalated to human agent. Cause: {motive}”
AVAILABLE_TOOLS = { “search_knowledge_base”: search_knowledge_base, “escalate_to_human”: escalate_to_human, }
def mock_llm_decide_next_step(observations: record[str], user_query: str) -> dict: “”“ Mock LLM name standing in for the REASONING step of ReAct. In an actual system, that is an precise mannequin name that reads the complete Thought -> Motion -> Statement historical past and decides what occurs subsequent. Critically: this operate — not the calling loop beneath — decides which device to name and when to cease. There isn’t any “if question incorporates X, name Y“ department written wherever in run_react_loop(). The choice is made contemporary, from gathered context, on each single iteration. ““” if not observations: return { “thought”: “I must search for the coverage earlier than I can reply.”, “motion”: “search_knowledge_base”, “action_input”: user_query, } last_observation = observations[–1] if “No matching data” in last_observation: # This department was by no means written by a human upfront — the mannequin # determined, based mostly on what it simply noticed, that escalation was wanted. return { “thought”: “The data base has no reply. I ought to escalate this.”, “motion”: “escalate_to_human”, “action_input”: “No KB match for: “ + user_query, } return { “thought”: “I discovered the reply. Job full.”, “motion”: “end”, “action_input”: last_observation, }
def run_react_loop(user_query: str, max_steps: int = 5) -> str: “”“ Thought -> Motion -> Statement, repeated till the mannequin itself decides to cease. Evaluate this straight towards run_orchestrated_pipeline() within the earlier part: there isn’t a ROUTE_MAP right here. There isn’t any human-written department saying “if X occurred, name Y.” Each choice about what occurs subsequent is made by the mannequin, at runtime, based mostly on what it has noticed thus far. ““” observations: record[str] = []
for step in vary(max_steps): choice = mock_llm_decide_next_step(observations, user_query) print(f” Step {step + 1} — Thought: {choice[‘thought’]}”)
if choice[“action”] == “end”: return f“Closing reply: {choice[‘action_input’]}”
tool_fn = AVAILABLE_TOOLS.get(choice[“action”]) if tool_fn is None: return f“Error: mannequin requested unknown device ‘{choice[‘action’]}'”
commentary = tool_fn(choice[“action_input”]) print(f” Step {step + 1} — Motion: {choice[‘action’]}({choice[‘action_input’]!r})”) print(f” Step {step + 1} — Statement: {commentary}n”) observations.append(commentary)
return “Max steps reached with out decision.”
if __name__ == “__main__”: print(“=== Question A: answerable from the data base ===”) result_a = run_react_loop(“What’s the refund coverage?”) print(f“Consequence: {result_a}n”)
print(“=== Question B: not within the data base, ought to set off escalation ===”) result_b = run_react_loop(“Are you able to course of my worldwide tax refund in crypto?”) print(f“Consequence: {result_b}”) |
run: python react_loop.py, no dependencies required.
Output:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
=== Question A: answerable from the data base === Step 1 — Thought: I want to look up the coverage earlier than I can reply. Step 1 — Motion: search_knowledge_base(‘What’s the refund coverage?’) Step 1 — Statement: Refunds are obtainable inside 30 days of buy.
Step 2 — Thought: I discovered the reply. Job full. Consequence: Closing reply: Refunds are obtainable inside 30 days of buy.
=== Question B: not in the data base, ought to set off escalation === Step 1 — Thought: I want to look up the coverage earlier than I can reply. Step 1 — Motion: search_knowledge_base(‘Are you able to course of my worldwide tax refund in crypto?’) Step 1 — Statement: No matching data discovered in data base.
Step 2 — Thought: The data base has no reply. I ought to escalate this. Step 2 — Motion: escalate_to_human(‘No KB match for: Are you able to course of my worldwide tax refund in crypto?’) Step 2 — Statement: Escalated to human agent. Cause: No KB match for: Can you course of my worldwide tax refund in crypto?
Step 3 — Thought: I discovered the reply. Job full. Consequence: Closing reply: Escalated to human agent. Cause: No KB match for: Can you course of my worldwide tax refund in crypto? |
Take a look at what differs between the 2 runs: question A completed in two steps, question B took three, and question B took an motion — escalation — that was by no means hardcoded as “what occurs when refund queries point out crypto.” The identical loop, the identical code, produced two genuinely totally different step counts and sequences as a result of the mannequin determined the trail at runtime based mostly on what it noticed. That’s the precise, concrete that means of “no predefined code path” — not a slogan, however a measurable distinction in what number of steps have been run and what they have been.
Manufacturing implementations of this sample usually wrap the gathered thought/commentary historical past in a “scratchpad” and summarize device outputs earlier than feeding them again into the loop, since dumping uncooked error logs or massive API responses again into context tends to confuse the subsequent reasoning step somewhat than assist it.
Autonomous Multi-Agent Techniques
The far finish of the spectrum builds straight on the ReAct loop above, simply nested. In a multi-agent setup, an orchestrator runs its personal ReAct loop, the place a few of its obtainable “actions” are calls to different brokers, every of which runs its personal full ReAct loop inside. The orchestrator causes about what to delegate, delegates it, observes the end result, and continues — precisely just like the single-agent loop within the earlier part, besides a few of its “instruments” are complete brokers somewhat than easy features.
Image the AVAILABLE_TOOLS dictionary from the earlier instance, besides as an alternative of search_knowledge_base and escalate_to_human, the entries are research_agent, finance_agent, and coding_agent — and calling one in all them doesn’t return a easy string; it kicks off that sub-agent’s personal impartial Thought-Motion-Statement loop, which could run for a number of steps earlier than returning something to the orchestrator. No one wrote down upfront which sub-agent will get known as, in what order, or what number of instances any of them run.
Google Cloud’s documentation labels probably the most excessive model of this the “swarm” sample — a collaborative workforce of brokers with no central orchestrator in any respect, able to producing exceptionally high-quality, inventive options exactly as a result of nothing is constraining how they work together. That very same lack of construction can be the chance: and not using a human-designed sure on the interplay, a swarm can fall into unproductive loops or just fail to converge, and the price of working many brokers by way of many turns compounds shortly.
That is the purpose on the spectrum the place the predictability axis from the primary part swings hardest within the different route. A deterministic pipeline provides you an identical output construction each time, by development. A swarm of autonomous brokers provides you the flexibleness to deal with an issue no one anticipated, at the price of with the ability to predict, upfront, what it should do or how lengthy it should take to do it.
Why This Distinction Truly Issues in Manufacturing
This isn’t an educational distinction. It has a direct, measurable impact on what groups really ship. Regardless of the quantity of hype round autonomous brokers, AI workflows — not absolutely autonomous brokers — gained the manufacturing battle in 2025: workflows stay the dominant sample behind profitable generative AI deployments, whereas absolutely autonomous multi-agent methods are nonetheless largely exploratory outdoors of slim domains.
The rationale maps straight again to the predictability axis from the beginning of this text. Agentic methods are non-deterministic by nature; equivalent inputs can produce totally different outputs throughout separate runs, which is a critical legal responsibility in regulated, auditable, or in any other case high-stakes processes. If a course of should be explainable step-by-step to a compliance workforce or a regulator, that’s not agent territory by default; it wants guardrails and human-in-the-loop checkpoints layered on prime earlier than it may be trusted with actual penalties.
The sample that’s really rising in mature methods is hybrid, not a pick-one choice. A better-level agent units objectives and orchestrates the general process, whereas vital, well-understood computations nonetheless run inside deterministic modules {that a} human has absolutely specified. A medical diagnostics system, for instance, would possibly use an agent to interpret ambiguous signs and determine which checks to order — real autonomy, as a result of the best sequence of checks isn’t knowable upfront — whereas every take a look at itself runs by way of a validated, deterministic pipeline, as a result of that a part of the issue has a identified right path and no motive to introduce variability into it.
Conclusion
“Agentic workflow” and “autonomous agent” describe two ends of 1 spectrum, not two competing applied sciences, and the 4 levels walked by way of right here — deterministic, orchestrated, reactive, and autonomous multi-agent — aren’t a rating from worse to higher. They’re totally different solutions to the identical query: who decides what occurs subsequent, and was that call made by a human writing code upfront, or by a mannequin reasoning at runtime?
Deterministic workflows offer you auditability and repeatability by development; the identical enter takes the identical path each time, full cease. Reactive and multi-agent methods surrender that assure in change for the power to deal with issues whose form genuinely can’t be anticipated forward of time. Neither property is free, and neither structure is right by default.
The methods that maintain up nicely in manufacturing don’t decide one excessive of this spectrum and apply it all over the place. They place every bit of the issue on the level on the spectrum that piece really requires — a hard and fast construction wherever a identified right path exists and repeatability issues, with actual autonomy reserved for the elements of the issue that don’t have any predefined right path to observe within the first place.
On this article, you’ll learn to distinguish agentic workflows from autonomous brokers by specializing in who owns management movement — a human writing code upfront, or a mannequin reasoning at runtime.
Subjects we’ll cowl embody:
- Why the true axis separating these methods is predictability versus autonomy, not whether or not an LLM is concerned.
- How deterministic workflows, orchestrated workflows, reactive brokers, and autonomous multi-agent methods differ, with runnable code that makes the control-flow distinction concrete.
- Why workflows, not absolutely autonomous brokers, dominate manufacturing at this time, and why hybrid architectures are the sample that holds up.

Introduction
Deloitte initiatives that by 2027, as much as 50% of firms utilizing generative AI may have launched agentic AI pilots or proofs of idea. That’s a wave of adoption large enough that the phrase “agentic” has began overlaying nearly something with an LLM name in it, from a hard and fast five-step pipeline the place step three occurs to name GPT for a abstract to a totally self-directing system that plans its personal path with no script in any respect.
These will not be the identical factor. Treating them as interchangeable results in one in all two errors: over-engineering a easy, well-understood process with pointless autonomy, or under-engineering a genuinely open-ended downside by forcing it right into a inflexible pipeline that breaks the second actuality deviates from the plan.
Anthropic attracts the foundational line of their extensively cited “Constructing Efficient Brokers” piece: workflows are methods the place LLMs and instruments are orchestrated by way of predefined code paths. Brokers are methods the place LLMs dynamically direct their very own course of and gear utilization, sustaining management over how they accomplish a process. Every part on this article is detailed beneath that one distinction.
This piece maps the complete spectrum of deterministic workflows, orchestrated methods, reactive single brokers, and autonomous multi-agent methods, with code at every stage that makes the control-flow distinction concrete somewhat than summary. The code right here illustrates structure, not a deployable system; the purpose of every snippet is to point out who decides what occurs subsequent, to not ship a characteristic.
The Actual Axis Isn’t “AI vs. No AI”: It’s Predictability vs. Autonomy
Earlier than evaluating architectures, it’s value changing the fallacious query. The query isn’t “does this technique use an LLM.” Virtually every part does now. The 2 questions that really matter, borrowing a framing that’s gained actual traction in structure circles, are: does this course of have to be repeatable, auditable, and explainable step-by-step? And: is the right path even identified upfront, or does the system want to find it at runtime?
A system can lean closely on an LLM and nonetheless be absolutely deterministic in construction — a hard and fast pipeline the place one step occurs to name a mannequin for textual content technology, however the subsequent step is hardcoded no matter what comes again. A system can be “agentic” with little or no actual autonomy: a tightly scripted loop with solely two allowed actions and a tough step restrict. The presence of an LLM name isn’t the sign. Possession of management movement is.
Google Cloud’s personal design-pattern documentation attracts this actual line operationally: deterministic workflows embody duties with a clearly outlined path identified upfront, the place the steps don’t change a lot from one run to the subsequent. Workflows that require dynamic orchestration contain issues the place the agent should decide the easiest way to proceed, and not using a predefined script. That’s the spectrum this text walks by way of, one stage at a time.
Deterministic Workflows
That is the baseline. A deterministic workflow has a identified sequence of steps determined at design time, by a human, in code. An LLM can sit inside any step — producing textual content, classifying enter, drafting a abstract — but it surely doesn’t select what occurs after its personal step runs. The orchestrating code does that, no matter what the mannequin returns.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# deterministic_pipeline.py # Stipulations: none past Python’s customary library # Run: python deterministic_pipeline.py
def mock_llm_classify(textual content: str) -> str: “”“ Mock LLM name — stands in for an actual API name to maintain this instance runnable with out an API key. The purpose is structural: no matter this returns, the NEXT operate that runs is already determined beneath. ““” if “refund” in textual content.decrease() or “cost” in textual content.decrease(): return “billing” return “common”
def extract(raw_input: str) -> str: “”“Step 1 — at all times runs, at all times results in step 2. No branching right here.”“” return raw_input.strip()
def classify(cleaned_text: str) -> str: “”“ Step 2 — calls an LLM to supply a label, however the label has no impact on which operate runs subsequent. That is the deterministic half: the mannequin fills in a bit of knowledge, it does not affect the route. ““” label = mock_llm_classify(cleaned_text) print(f” [classify] LLM returned label=”{label}” (informational solely)”) return cleaned_text
def summarize(cleaned_text: str) -> str: “”“Step 3 — at all times runs after step 2, whatever the label from step 2.”“” return f“Abstract: {cleaned_text[:40]}…”
def notify(abstract: str) -> str: “”“Step 4 — at all times runs final. The trail is mounted at design time.”“” return f“Notification despatched: {abstract}”
def run_deterministic_pipeline(raw_input: str) -> str: “”“ The management movement right here is written solely by a human, upfront. Each run takes the equivalent path: extract -> classify -> summarize -> notify. The LLM name inside classify() produces a label, however that label is rarely used to determine what operate runs subsequent — it is information flowing by way of a hard and fast pipe. ““” step1 = extract(raw_input) step2 = classify(step1) step3 = summarize(step2) step4 = notify(step3) return step4
if __name__ == “__main__”: # Two inputs that the LLM would classify fully in another way result_1 = run_deterministic_pipeline(“I need a refund for my final cost”) result_2 = run_deterministic_pipeline(“What are your corporation hours?”)
print(f“nResult 1: {result_1}”) print(f“Consequence 2: {result_2}”) |
run: python deterministic_pipeline.py, no dependencies required.
Output:
|
[classify] LLM returned label=‘billing’ (informational solely) [classify] LLM returned label=‘common’ (informational solely)
Consequence 1: Notification despatched: Abstract: I need a refund for my final cost... Consequence 2: Notification despatched: Abstract: What are your enterprise hours?... |
Discover what occurred: the mock LLM categorized the 2 inputs fully in another way, billing versus common, and it made zero distinction to the trail both enter took. Each went by way of the very same 4 features in the identical order. That’s the complete definition of deterministic: the route is mounted, even when an LLM is doing actual work inside one of many steps.
Orchestrated Workflows
That is the center floor that will get mislabeled most frequently as “agentic,” and it’s value slowing down right here as a result of it’s the road most individuals really cross after they begin utilizing that phrase loosely.
An orchestrated workflow nonetheless has a graph of doable paths outlined solely upfront, however which path will get taken now will depend on a runtime choice, continuously made by an LLM name. That is nonetheless a workflow. Each department that might be taken was anticipated and written into code by a human earlier than the system ever ran. The LLM picks a department off a menu another person wrote. It doesn’t invent a brand new merchandise on that menu.
That is exactly the “dynamic orchestration” class Google Cloud separates from real brokers — the system must plan and route, however inside a construction {that a} human nonetheless absolutely designed.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# orchestrated_pipeline.py # Stipulations: none past Python’s customary library # Run: python orchestrated_pipeline.py
def mock_llm_classify(textual content: str) -> str: “”“Mock LLM classification name.”“” text_lower = textual content.decrease() if “refund” in text_lower or “cost” in text_lower: return “billing” if “crash” in text_lower or “error” in text_lower or “bug” in text_lower: return “technical” return “common”
def extract(raw_input: str) -> str: return raw_input.strip()
# Three pre-defined downstream handlers. A human wrote all three of those # upfront. The LLM doesn’t invent a fourth path — it may solely choose # amongst branches that exist already on this code. def handle_billing(textual content: str) -> str: return f“[BILLING TEAM] Routed: {textual content[:50]}”
def handle_technical(textual content: str) -> str: return f“[TECH SUPPORT] Routed: {textual content[:50]}”
def handle_general(textual content: str) -> str: return f“[GENERAL QUEUE] Routed: {textual content[:50]}”
# The department map IS the complete choice house. Each key right here was written # by a human forward of time. The LLM’s job is to choose a key — not outline one. ROUTE_MAP = { “billing”: handle_billing, “technical”: handle_technical, “common”: handle_general, }
def run_orchestrated_pipeline(raw_input: str) -> str: “”“ Nonetheless a workflow, not an agent: each doable path was anticipated and coded by a human forward of time, sitting in ROUTE_MAP. The LLM name decides WHICH pre-built department executes for this particular enter, however it can’t invent a department that is not already a key in ROUTE_MAP. ““” cleaned = extract(raw_input) label = mock_llm_classify(cleaned) print(f” [route] LLM categorized as ‘{label}’ -> dispatching to handle_{label}()”)
handler = ROUTE_MAP.get(label, handle_general) return handler(cleaned)
if __name__ == “__main__”: test_inputs = [ “I was charged twice for my refund request”, “The app keeps crashing with an error on startup”, “What are your business hours?”, ] for inp in test_inputs: end result = run_orchestrated_pipeline(inp) print(f” Consequence: {end result}n”) |
run: python orchestrated_pipeline.py, no dependencies required.
Output:
|
[route] LLM categorized as ‘billing’ -> dispatching to handle_billing() Consequence: [BILLING TEAM] Routed: I was charged twice for my refund request
[route] LLM categorized as ‘technical’ -> dispatching to handle_technical() Consequence: [TECH SUPPORT] Routed: The app retains crashing with an error on startup
[route] LLM categorized as ‘common’ -> dispatching to handle_general() Consequence: [GENERAL QUEUE] Routed: What are your enterprise hours? |
Three totally different inputs took three totally different paths this time — that’s new in comparison with the earlier part. However take a look at ROUTE_MAP: each doable vacation spot was already written into the code earlier than any of those inputs arrived. The LLM exercised judgment about which key to make use of. It by no means had the choice to create a key that wasn’t there. That distinction — a hard and fast set of doable paths versus a path that will get invented at runtime — is strictly the place the subsequent part picks up.
Reactive Brokers: The ReAct Loop and a Genuinely Open Path
That is the place actual autonomy begins. The ReAct sample — Reasoning plus Appearing, launched by Yao et al. in 2022 — lets the mannequin itself determine, at every step, what motion to take subsequent based mostly on what it noticed from the earlier motion. There isn’t any pre-written department overlaying each case. The agent operates in an iterative loop of thought, motion, and commentary till an exit situation is met, and the sequence itself — what number of steps, in what order, and which instruments — isn’t knowable upfront. Solely the obtainable actions are mounted; the trail by way of them isn’t.
That is the architectural threshold the earlier two sections have been constructing towards. Within the orchestrated workflow, a human wrote each doable department into ROUTE_MAP earlier than the system ran. Right here, the mannequin decides each the trail and the sequence size at runtime, regardless that the toolset itself continues to be mounted.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# react_loop.py # Stipulations: none past Python’s customary library # Run: python react_loop.py
def search_knowledge_base(question: str) -> str: “”“A device the agent can name. Whether or not and when it will get known as isn’t determined right here — it is determined by the mannequin, at runtime.”“” mock_kb = { “refund coverage”: “Refunds can be found inside 30 days of buy.”, “transport time”: “Normal transport takes 5-7 enterprise days.”, } for key, worth in mock_kb.objects(): if key in question.decrease(): return worth return “No matching data present in data base.”
def escalate_to_human(motive: str) -> str: “”“A second device the agent can name — once more, the choice to name this as an alternative of the search device is made by the mannequin, not by this code.”“” return f“Escalated to human agent. Cause: {motive}”
AVAILABLE_TOOLS = { “search_knowledge_base”: search_knowledge_base, “escalate_to_human”: escalate_to_human, }
def mock_llm_decide_next_step(observations: record[str], user_query: str) -> dict: “”“ Mock LLM name standing in for the REASONING step of ReAct. In an actual system, that is an precise mannequin name that reads the complete Thought -> Motion -> Statement historical past and decides what occurs subsequent. Critically: this operate — not the calling loop beneath — decides which device to name and when to cease. There isn’t any “if question incorporates X, name Y“ department written wherever in run_react_loop(). The choice is made contemporary, from gathered context, on each single iteration. ““” if not observations: return { “thought”: “I must search for the coverage earlier than I can reply.”, “motion”: “search_knowledge_base”, “action_input”: user_query, } last_observation = observations[–1] if “No matching data” in last_observation: # This department was by no means written by a human upfront — the mannequin # determined, based mostly on what it simply noticed, that escalation was wanted. return { “thought”: “The data base has no reply. I ought to escalate this.”, “motion”: “escalate_to_human”, “action_input”: “No KB match for: “ + user_query, } return { “thought”: “I discovered the reply. Job full.”, “motion”: “end”, “action_input”: last_observation, }
def run_react_loop(user_query: str, max_steps: int = 5) -> str: “”“ Thought -> Motion -> Statement, repeated till the mannequin itself decides to cease. Evaluate this straight towards run_orchestrated_pipeline() within the earlier part: there isn’t a ROUTE_MAP right here. There isn’t any human-written department saying “if X occurred, name Y.” Each choice about what occurs subsequent is made by the mannequin, at runtime, based mostly on what it has noticed thus far. ““” observations: record[str] = []
for step in vary(max_steps): choice = mock_llm_decide_next_step(observations, user_query) print(f” Step {step + 1} — Thought: {choice[‘thought’]}”)
if choice[“action”] == “end”: return f“Closing reply: {choice[‘action_input’]}”
tool_fn = AVAILABLE_TOOLS.get(choice[“action”]) if tool_fn is None: return f“Error: mannequin requested unknown device ‘{choice[‘action’]}'”
commentary = tool_fn(choice[“action_input”]) print(f” Step {step + 1} — Motion: {choice[‘action’]}({choice[‘action_input’]!r})”) print(f” Step {step + 1} — Statement: {commentary}n”) observations.append(commentary)
return “Max steps reached with out decision.”
if __name__ == “__main__”: print(“=== Question A: answerable from the data base ===”) result_a = run_react_loop(“What’s the refund coverage?”) print(f“Consequence: {result_a}n”)
print(“=== Question B: not within the data base, ought to set off escalation ===”) result_b = run_react_loop(“Are you able to course of my worldwide tax refund in crypto?”) print(f“Consequence: {result_b}”) |
run: python react_loop.py, no dependencies required.
Output:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
=== Question A: answerable from the data base === Step 1 — Thought: I want to look up the coverage earlier than I can reply. Step 1 — Motion: search_knowledge_base(‘What’s the refund coverage?’) Step 1 — Statement: Refunds are obtainable inside 30 days of buy.
Step 2 — Thought: I discovered the reply. Job full. Consequence: Closing reply: Refunds are obtainable inside 30 days of buy.
=== Question B: not in the data base, ought to set off escalation === Step 1 — Thought: I want to look up the coverage earlier than I can reply. Step 1 — Motion: search_knowledge_base(‘Are you able to course of my worldwide tax refund in crypto?’) Step 1 — Statement: No matching data discovered in data base.
Step 2 — Thought: The data base has no reply. I ought to escalate this. Step 2 — Motion: escalate_to_human(‘No KB match for: Are you able to course of my worldwide tax refund in crypto?’) Step 2 — Statement: Escalated to human agent. Cause: No KB match for: Can you course of my worldwide tax refund in crypto?
Step 3 — Thought: I discovered the reply. Job full. Consequence: Closing reply: Escalated to human agent. Cause: No KB match for: Can you course of my worldwide tax refund in crypto? |
Take a look at what differs between the 2 runs: question A completed in two steps, question B took three, and question B took an motion — escalation — that was by no means hardcoded as “what occurs when refund queries point out crypto.” The identical loop, the identical code, produced two genuinely totally different step counts and sequences as a result of the mannequin determined the trail at runtime based mostly on what it noticed. That’s the precise, concrete that means of “no predefined code path” — not a slogan, however a measurable distinction in what number of steps have been run and what they have been.
Manufacturing implementations of this sample usually wrap the gathered thought/commentary historical past in a “scratchpad” and summarize device outputs earlier than feeding them again into the loop, since dumping uncooked error logs or massive API responses again into context tends to confuse the subsequent reasoning step somewhat than assist it.
Autonomous Multi-Agent Techniques
The far finish of the spectrum builds straight on the ReAct loop above, simply nested. In a multi-agent setup, an orchestrator runs its personal ReAct loop, the place a few of its obtainable “actions” are calls to different brokers, every of which runs its personal full ReAct loop inside. The orchestrator causes about what to delegate, delegates it, observes the end result, and continues — precisely just like the single-agent loop within the earlier part, besides a few of its “instruments” are complete brokers somewhat than easy features.
Image the AVAILABLE_TOOLS dictionary from the earlier instance, besides as an alternative of search_knowledge_base and escalate_to_human, the entries are research_agent, finance_agent, and coding_agent — and calling one in all them doesn’t return a easy string; it kicks off that sub-agent’s personal impartial Thought-Motion-Statement loop, which could run for a number of steps earlier than returning something to the orchestrator. No one wrote down upfront which sub-agent will get known as, in what order, or what number of instances any of them run.
Google Cloud’s documentation labels probably the most excessive model of this the “swarm” sample — a collaborative workforce of brokers with no central orchestrator in any respect, able to producing exceptionally high-quality, inventive options exactly as a result of nothing is constraining how they work together. That very same lack of construction can be the chance: and not using a human-designed sure on the interplay, a swarm can fall into unproductive loops or just fail to converge, and the price of working many brokers by way of many turns compounds shortly.
That is the purpose on the spectrum the place the predictability axis from the primary part swings hardest within the different route. A deterministic pipeline provides you an identical output construction each time, by development. A swarm of autonomous brokers provides you the flexibleness to deal with an issue no one anticipated, at the price of with the ability to predict, upfront, what it should do or how lengthy it should take to do it.
Why This Distinction Truly Issues in Manufacturing
This isn’t an educational distinction. It has a direct, measurable impact on what groups really ship. Regardless of the quantity of hype round autonomous brokers, AI workflows — not absolutely autonomous brokers — gained the manufacturing battle in 2025: workflows stay the dominant sample behind profitable generative AI deployments, whereas absolutely autonomous multi-agent methods are nonetheless largely exploratory outdoors of slim domains.
The rationale maps straight again to the predictability axis from the beginning of this text. Agentic methods are non-deterministic by nature; equivalent inputs can produce totally different outputs throughout separate runs, which is a critical legal responsibility in regulated, auditable, or in any other case high-stakes processes. If a course of should be explainable step-by-step to a compliance workforce or a regulator, that’s not agent territory by default; it wants guardrails and human-in-the-loop checkpoints layered on prime earlier than it may be trusted with actual penalties.
The sample that’s really rising in mature methods is hybrid, not a pick-one choice. A better-level agent units objectives and orchestrates the general process, whereas vital, well-understood computations nonetheless run inside deterministic modules {that a} human has absolutely specified. A medical diagnostics system, for instance, would possibly use an agent to interpret ambiguous signs and determine which checks to order — real autonomy, as a result of the best sequence of checks isn’t knowable upfront — whereas every take a look at itself runs by way of a validated, deterministic pipeline, as a result of that a part of the issue has a identified right path and no motive to introduce variability into it.
Conclusion
“Agentic workflow” and “autonomous agent” describe two ends of 1 spectrum, not two competing applied sciences, and the 4 levels walked by way of right here — deterministic, orchestrated, reactive, and autonomous multi-agent — aren’t a rating from worse to higher. They’re totally different solutions to the identical query: who decides what occurs subsequent, and was that call made by a human writing code upfront, or by a mannequin reasoning at runtime?
Deterministic workflows offer you auditability and repeatability by development; the identical enter takes the identical path each time, full cease. Reactive and multi-agent methods surrender that assure in change for the power to deal with issues whose form genuinely can’t be anticipated forward of time. Neither property is free, and neither structure is right by default.
The methods that maintain up nicely in manufacturing don’t decide one excessive of this spectrum and apply it all over the place. They place every bit of the issue on the level on the spectrum that piece really requires — a hard and fast construction wherever a identified right path exists and repeatability issues, with actual autonomy reserved for the elements of the issue that don’t have any predefined right path to observe within the first place.















