Why Production Systems Should Not Fully Switch to General-Purpose Agents

    General-purpose agents are stronger at open-ended tasks, but replacing an entire production path with model-driven planning often loses control of cost, latency, and availability. This article contrasts deterministic orchestration with agent loops, explains where each belongs, and outlines budgets, contracts, evaluation, and a layered migration that keeps writes on workflows.

    Technical choices should be judged by how low the floor is under harsh production conditions, not by how smooth the best demo looks. Around 2026, a new generation of general-purpose agents is genuinely stronger at semantic understanding, long-context memory, and function calling through model-native interfaces. Given one vague instruction, an agent can break down the task, look up data, fill missing values, and produce a chart. That experience fits product demos and personal assistants. If an existing production path is replaced end to end with “the model decides the next step,” cost, latency, and availability often get out of control together.

    Separate the problems the two systems solve

    Deterministic orchestration answers this: given known inputs, known dependencies, known timeouts, and known permissions, complete the business step by step. Those steps can be versioned, replayed, and reconciled. A general-purpose agent answers a different question: when the goal is not precise enough, the model plans subtasks and calls tools. It optimizes coverage and interaction, not the predictability of a single call.

    The two capabilities can coexist, but they should not impersonate each other. Turning tightly constrained flows—reports, reconciliation, ticket routing, batch jobs—into “the model plans freely” moves the control plane from a rules engine to a probabilistic model. Every decomposition may add another retrieval, another code-generation step, and another round of self-correction. In a demo, that looks intelligent. On the bill and in the SLA, it is a multiplier.

    Why best-case demos mislead

    A typical demo instruction is something like: “Summarize last quarter’s sales for a region and show the trend.” The agent can:

    1. Map natural language to metrics, a time window, and a region filter.
    2. Choose a data interface and page through results.
    3. Use a script to handle nulls and outliers.
    4. Generate a chart and an explanation.

    That path looks excellent when the data is clean, the interfaces are stable, and the question has one correct answer. In production, the same sentence meets conflicting metric definitions, insufficient permissions, delayed partitions, duplicate primary keys, and downstream timeouts. The model retries, switches tools, widens the query, and may even write unreviewed processing logic just to “finish the task.” One success does not represent behavior at a hundred thousand runs a day across multiple systems and tenants.

    Where the three risks come from

    Cost. General-purpose agents are usually billed not per business transaction, but across multi-turn reasoning, long context, and repeated tool round trips. The longer the context, the more it costs to keep stuffing history back into the window. Without a hard budget, one vague question can fan out into many queries. Production should encode, as policy, the model-call limit, tool-call limit, scanned data volume, and maximum token budget for a single request—not discover them on the invoice.

    Latency. The critical path of an orchestrated system is often a few fixed RPCs plus cache. An agent path is plan, call, observe, and plan again. Tail latency at any step stacks. An interactive assistant can wait several seconds. A batch window, synchronous order placement, or real-time risk check cannot hand P99 to an unbounded number of thinking rounds. Keep the critical path synchronous, short-timeout, and low-hop. Put exploratory steps on an async queue and call back when they finish.

    Availability. Model output is unstable. When a tool schema changes, planning may pick the wrong interface or fill the wrong parameters. Add dependency failures, and the system can enter a retry storm. An orchestration failure can fall into an explicit compensating transaction. A failed autonomous loop often stops halfway: a temp table half written, a notification half sent. Without idempotency keys and transaction boundaries, a rerun repeats side effects.

    When an agent fits, and when orchestration must stay

    An agent, or a constrained agent layer, fits when:

    • The goal is open-ended and a person can review the result, such as drafts, retrieval summaries, and internal Q&A.
    • There are few tools, narrow permissions, and the actions are read-only or reversible.
    • The cost of failure is “a poor answer,” not an error in money, inventory, or compliance.
    • There is a clear step limit and a path for human takeover.

    Deterministic orchestration must remain for:

    • Changes to amounts, inventory, or permissions, and notifications sent outside the system.
    • Batch processing that requires strong consistency or reconciliation.
    • Approval flows that require a regulatory audit trail.
    • Interfaces whose latency and error budgets are already fixed in an SLO.

    In practice, layer the systems instead of replacing one with the other. The entry point can be natural language, but before it reaches a domain service it must become a structured intent: action, entity, time range, permission principal, and idempotency key. The planner may choose only from an allowlisted set of tools. Parameters are validated against a schema, and free-form query concatenation is rejected. Writes must be confirmed again by a policy engine; the model must not execute them directly.

    A sketch of that boundary (pseudocode that marks control points, not the interface of any particular product):

    1. request_budget:
    2. max_model_rounds: 4
    3. max_tool_calls: 6
    4. max_scan_rows: 100000
    5. deadline_ms: 2500
    6. on_intent(text, principal):
    7. intent = parse_to_schema(text) # on failure, ask again; do not execute
    8. assert authz(principal, intent)
    9. if intent.mode == "read_explore":
    10. return agent_loop(intent, request_budget)
    11. else:
    12. return workflow_engine.run(intent) # fixed DAG, compensation, audit

    Read-and-explore work can enter a budgeted loop. The write path enters a workflow. Both share the same identity, audit, and rate limits, so the agent cannot bypass the gateway.

    Engineering has to hold up the floor

    Tool contracts. Every tool declares side effects, idempotency, timeout, pagination, and error codes. The model does not see an arbitrary code-execution environment. If data processing is truly required, use only a controlled runtime in a sandbox, with size limits on input and output, and with no access to unauthorized networks or secrets.

    Observability. Record planning steps, tool names, parameter summaries, duration, tokens, and final state, and redact logs. Aggregate by business transaction, not merely by whether the model returned 200. Alert on the share of requests over budget, retry rate, half-successful transactions, and human-takeover rate. Those metrics say more about production readiness than whether an answer feels fluent.

    Evaluation. Use a fixed regression set that covers ambiguous metric definitions, empty data, permission denials, downstream timeouts, and duplicate submissions. Compare cost, P95/P99, correctness, and rollback ability—not the feel of a single demo. Before a new model or planning strategy goes live, run shadow traffic: record what it would call, and do not actually write to production.

    Degradation. When the budget is exhausted, tools fail repeatedly, or confidence is too low, switch immediately to a templated flow or a human queue, and give the user a clear status. Do not let the loop “try once more” at the edge of a timeout. Cache stable queries. Mark volatile data with timestamps so the model does not invent a trend from stale results.

    Data and permissions. An agent’s context is another data path. Use least privilege and tenant isolation, and do not put data from different customers in the same window. Object storage should hold only authorized intermediate results and should have a lifecycle. A message queue should carry asynchronous steps. Monitoring and alerts should be bound to budget and error budget. These are ordinary cloud capabilities. What matters is that the policy closes on the business side, not that the model is expected to restrain itself.

    Migration order

    Do not “replace everything.” Start with one read-only, reviewable, traffic-controlled scenario. Measure calls per transaction and tail latency, then decide whether to expand. Existing orchestration continues to own the state machine. The agent only handles intent understanding and read-only assistance. Every new write tool needs idempotency, compensation, and audit. Over the next two or three years, model planning will keep getting stronger. That does not change what production requires: repeatability, rate limits, and accountability. Give the ceiling to a controlled agent layer, and the floor to workflows, permissions, and budgets. Semantic understanding can then be used without letting cost, latency, and availability fail at the same time.