October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

When AI Agents Need an LLM—and When Code Is Better

AI agents do not need an LLM for every step. Use code for known rules and fixed paths, and models for ambiguity, unstructured input, and dynamic choices.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AI agents do not need an LLM for every step. When a task has known rules, a predictable path, and a verifiable result, deterministic code or a fixed workflow is usually the better fit. Use a model when the work depends on interpreting ambiguity, handling unstructured information, or choosing actions dynamically; combine the two when a task needs both.

What “skipping the LLM” means

It does not mean removing AI from every system. It means avoiding a model call for operations that ordinary code can perform reliably: checking required fields, applying a known rule, transforming a value, routing by a fixed condition, enforcing permissions, or executing an approved action.

As an Amazon Associate I earn from qualifying purchases.

A useful distinction is between a workflow and an agent. In a workflow, code defines the steps and their order; an LLM may help with one or more steps, but it does not choose the process dynamically. In an agent, the model directs its process and tool use in response to the task. Anthropic describes this distinction in its December 19, 2024 article, while noting that some tooling details have changed since publication: Building Effective AI Agents.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Terminology varies across providers, so focus on the actual behavior: Does code prescribe what happens next, or does a model decide based on the request and results so far?

Choose the simplest architecture that fits the task

Approach Best fit Main trade-off
Deterministic code or rules Known inputs, rules, paths, and outcomes Cannot interpret genuinely ambiguous requests without additional logic
Fixed sequential or parallel workflow Steps are known in advance, either in a stable order or as independent branches Less adaptable when the task changes or a step must be chosen dynamically
Single LLM agent Requests require interpretation, multiple steps, external information, or model-directed tool selection More runtime uncertainty and operational complexity than a predefined path
Multi-agent system Work can be divided into distinct specialist responsibilities that benefit from coordination More coordination, evaluation, security, reliability, and cost considerations
Hybrid system Some parts require judgment while other parts have known rules and safe, constrained actions Requires a clear boundary between model decisions and code-enforced controls

OpenAI recommends considering agents for complex decisions, rules that are difficult to maintain, and workflows that rely heavily on unstructured data; when those conditions are absent, a deterministic solution may suffice. Its practical guide to building agents is a useful starting point. Google Cloud likewise describes predefined sequential and parallel patterns as options when steps are known in advance: Choose a design pattern for your agentic AI system.

Ask these questions before adding an agent

  • Are the inputs structured and predictable? If the system receives known fields and clear values, ordinary validation and branching may be enough. If it must infer meaning from free-form text, documents, or other unstructured material, a model may help.
  • Is the correct path known before execution? If the same steps apply on each run, encode the sequence in a workflow. If the next action depends on interpretation or newly discovered information, model-directed planning may be justified.
  • Does the task need flexible tool choice? A fixed, approved set of operations can be called directly by code. A model is more useful when it must select among tools based on the request and intermediate results.
  • What happens if the system is wrong? For consequential actions, reduce the model’s authority: validate its output, enforce permissions in code, and require confirmation or human review where appropriate.
  • Can you observe and recover from failure? Known code paths are generally easier to test, inspect, and recover than open-ended decisions. Use an agent only when its flexibility is worth the added uncertainty.

Where each approach tends to work

Use deterministic code for known answers

When the system needs to check a date, verify a required field, apply a threshold, convert a format, or authorize an operation under explicit rules, code can produce a repeatable result without asking a language model to rediscover the rule on every run. Microsoft’s AI Decision Framework identifies predictability, observability, and recoverability as strengths of deterministic approaches; AWS recommends coded logic for deterministic execution. See Microsoft’s Capability Model and AWS Prescriptive Guidance on system design and security recommendations for agentic AI systems.

Use a fixed workflow when the sequence is stable

If a request always follows the same steps—such as collecting required inputs, checking them, and then producing a result—predefined orchestration avoids asking a model to plan a process that is already known. Independent tasks can also run in parallel when their outputs do not depend on one another. Google Cloud notes that sequential patterns can reduce latency and operational costs compared with model orchestration, but trade away flexibility.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use an LLM agent when the next step cannot be prescribed reliably

An agent can be useful when a request needs several steps, relies on external information, or requires choosing which tool to use after interpreting the request or results. OpenAI’s guidance also points to complex decisions, hard-to-maintain rules, and heavy reliance on unstructured data as factors favoring an agent. That flexibility is not a reason to hand the model every decision: keep deterministic checks and safety boundaries outside the model.

Use multiple agents only when the work divides cleanly

Separate agents can make sense when distinct specialist responsibilities genuinely need separate handling. They also introduce coordination overhead and additional evaluation, security, reliability, and cost concerns, as Google Cloud’s architecture guidance explains. Start with one agent when an agent is needed; add another only when the decomposition solves a concrete problem that a single agent or fixed workflow does not.

Build a hybrid system with clear boundaries

A robust design lets the model handle interpretation where it adds value while code governs known operations and controls. For example, a service that processes a customer request could use a model to identify intent in free-form text, but leave field validation, permission checks, routing rules, and the actual approved operation to deterministic code.

  1. Normalize and validate inputs in code. Check required fields, data types, size limits, and other conditions that have explicit rules.
  2. Call the model only for the uncertain part. Ask it to classify intent, extract meaning from unstructured material, or propose a next step where the answer cannot be reliably encoded as a rule.
  3. Validate the model’s result. Check that it matches an expected format and permitted values. Treat the model’s output as a proposal, not as proof that an action is safe.
  4. Enforce permissions and execute with constrained tools. Keep authorization and business rules in code. If model output can trigger tools, restrict access to an allow list of approved tools and operations.
  5. Record outcomes and handle failures explicitly. Make errors visible, define recovery paths, and use human review for actions whose consequences warrant it.

Microsoft’s framework says not every step in an agent architecture warrants an LLM call and recommends deterministic code for known tasks. AWS similarly advises using AI only where it adds value that deterministic code cannot provide. Its guidance states: “Implement coded logic for deterministic execution. Use AI functionality where it provides value that deterministic code cannot.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the “10,000 agents, zero tokens” headline does—and does not—establish

The architectural case for avoiding unnecessary model calls is well supported by the guidance above. But the sources cited here do not substantiate a measured deployment of 10,000 agents using zero tokens. Treat that number as headline rhetoric, not a verified scale result or benchmark. “Zero tokens” also cannot describe a system that uses an LLM for any step; it can only apply to steps handled without a model call.

The practical goal is not to maximize the number of agents or minimize model use at all costs. It is to use models for work that benefits from interpretation and dynamic decisions, and use code for work whose rules and outcomes are already known.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.