The world’s first unified interface for agent harnessesOpen Source4.6kPowered by UHP

InsightsNov 30, 20269 min read

Scaling AI Agents: Architecture, Cost and Reliability

How to scale AI agents in production: when more agents help, how to route models and tools, handle concurrency, and measure cost and reliability.

An adjustable inlet controls capacity across several separate execution chambers.
Scale with controlled capacity and task-aware configuration. A conceptual mechanism, not a throughput measurement.

Scaling AI agents means raising throughput, concurrency and task complexity while keeping quality, latency and cost under control, and it rarely means simply adding more agents. The evidence points to a single design rule: match the architecture to the task, route each task to the right harness and model, and measure cost and reliability per completed task. HarnessRouter treats harnesses, models, tools and sandboxes as configurable building blocks behind one API, using the compatible combinations each harness supports, so that rule can be applied per task instead of being hard-wired into an application.

TL;DR

  • More agents do not reliably mean better results: a Google and MIT study of 260 configurations found relative performance ranging from +80.8% to -70.0% depending on architecture and task.
  • Start with a strong single-agent baseline, add coordination only where it shows a measured gain, and prefer diversity (different models, prompts, tools) over copies of the same agent where task-specific tests show a benefit.
  • Tool catalogs and routing decisions become bottlenecks as systems grow, so shortlist candidates and route by quality, latency or cost.
  • Track cost and latency per completed task, repeated-run consistency and recovery rate, not one averaged success number.
  • Concurrency is an infrastructure problem: isolated sandboxes, session management and a single API make bursts manageable.

What scaling an agent system actually involves

There are two separate problems under this keyword. The first is scaling the agent design: how many agents, which models, how they communicate. The second is scaling the workload: more concurrent sessions, variable demand and tasks that run for a long time. Teams that mix the two usually pay for coordination they did not need, or run out of infrastructure they did not plan.

A useful definition: an agent system has scaled when throughput, concurrency or task difficulty grows while cost per completed task and failure rate stay flat or improve. Agent count is an input, not a measure of success.

When adding agents helps, and when it hurts

The Towards a Science of Scaling Agent Systems study evaluated 260 configurations across six benchmarks, five architectures and three LLM families. Its findings are the best available map of when multi-agent designs pay off:

  • Centralized coordination raised Finance Agent performance from 34.9% to 63.1%, according to the MIT Media Lab overview.
  • Every multi-agent variant reduced PlanCraft performance by 39% to 70%.
  • A capability-saturation threshold appears near 45% single-agent success: above it, adding agents predicts zero or negative gains.
  • Trace-level error amplification was 17.2 for independent systems versus 4.4 for centralized ones, so unsupervised parallel agents compound mistakes.

The authors describe an intrinsic coordination tax: global context has to be compressed into lossy messages between agents. Their practical advice is to begin with a strong single-agent baseline, measure coordination costs and keep coordination only where it demonstrates gains.

Diversity beats duplication

A February 2026 paper from Shanghai Jiao Tong University, Understanding Agent Scaling in LLM-Based Multi-Agent Systems via Diversity, shows that homogeneous agents have strongly diminishing returns because their outputs are correlated. In its tested voting and debate setups, heterogeneous agents improved results, and two diverse agents could match or exceed sixteen homogeneous ones. For a team, this changes the scaling question from "how many agents" to "how many distinct evidence channels". It is also the strongest argument for being able to swap models and harnesses per task without rewriting integration code.

Similar observation modules contrast with different evidence sources around the same test object.
Conceptual comparison of correlated and varied evidence channels, not a measured accuracy result or a guarantee that diversity wins.

Parallel teams buy speed, not quality

Paradigm 3's November 2026 study Swarms do not yet raise the roof compared teams of 2, 4 and 8 agents with a single agent at the same token budget across more than 1,100 runs. Teams of 8 finished about 6 times sooner but scored about 7% lower, and on git-to-zig, a single agent allowed to restart with fresh context beat the teams. The reasonable reading: parallelism is a latency tool with a quality trade-off at the same token budget, so use it when time-to-result matters more than marginal quality.

A rule of thumb

SituationLikely best approach
Single agent already succeeds on most tasksKeep one agent, improve prompts, tools and context
Task decomposes into independent, verifiable subtasksCentralized coordination with a validating orchestrator
Sequential dependencies, strict planningSingle agent or a sequential workflow
Deadline pressure, tolerance for extra tokensParallel team, with its token budget checked

Architecture patterns that survive growth

A study of scaling LLM-driven multi-agent systems distills four principles: simplicity, elastic feedback, sequential workflows with optional loops, and summary-based communication. In its Terminal-Bench tests with GPT-5 mini, performance peaked at intermediate complexity (5 agents, 3 feedback loops) and degraded at 7 agents and 5 loops. Scaling also produced roughly linear cost growth with accuracy gains only when the base model exceeded a capability threshold, so establish model adequacy before adding structure.

For enterprise systems, the CEAD architecture paper argues for a small number of durable agents built around business capabilities, each with an explicit capability contract, autonomy levels assigned by action risk and reversibility, and deterministic validation before LLM critique. These are good defaults for any team. Further background is in our guides to AI agent architecture and cloud agent orchestration.

Tool catalogs degrade routing

A June 2026 study of a deployed enterprise assistant with 110 agents and 584 tools, Scaling Enterprise Agent Routing, found that flat tool-routing F1 on implicit requests fell 16 to 23 percentage points as the catalog grew. For one model it dropped from 58.2% to 42.1%. Embedding-based shortlisting to 20 candidate tools recovered 10 to 17 points at full scale on human-annotated production requests. The lesson is to give each agent a narrow, relevant tool set rather than every available tool, a point that matters as plugins and skills multiply.

A large tool catalog is narrowed to candidate tools before final selection.
Shortlist candidates before final routing. This illustrates the mechanism; study-specific accuracy results remain in the text.

Routing models and harnesses by quality, latency or cost

As systems grow, the choice of model and harness per task becomes the main cost lever. A benchmarking study of multi-agent LLM systems shows why: lifting accuracy from 83% (RAG) to 93% (group chat) raised latency from 2.6 seconds to more than 38.7 seconds and energy from 300 J to more than 11 kJ. Up to 44.7% of tested agentic configurations fell below the baseline model's accuracy-latency Pareto frontier, meaning a standalone configuration offered at least as much accuracy with no higher latency.

A workable routing method:

  1. Classify tasks by difficulty and consequence, not by topic.
  2. Define the objective per class: quality for high-stakes work, latency for interactive features, cost for bulk jobs.
  3. Benchmark candidate harness and model pairs on your own tasks.
  4. Route by class and keep a fallback pair.
  5. Re-run the benchmark when new models ship.

Details are in our guides to AI model selection, multi-model agents and LLM cost optimization. An LLM proxy covers model-level routing, while agents also need harness-level routing, which is the layer HarnessRouter adds.

Where agent cost comes from

The workload study From Requests to Sessions found that coding-agent requests carry a median of about 129K input tokens but only about 500 uncached tokens. Among requests with reported cache usage, cached input made up 97.4% of tokens and 72.9% of API cost under the pricing it assumed. Prefix-cache behavior therefore dominated modeled API costs in that workload. Keeping a session's reusable prefix stable and using a compatible provider route can improve cache reuse, subject to cache scope, configuration and expiry, so session management is a cost feature as well as a convenience.

Handling concurrency and variable demand

Once the design is settled, workload scaling is about bursts, long runs and isolation. Practical measures:

  • Isolate every run. Give each task an isolated sandbox with scoped files and credentials to reduce cross-task interference.
  • Treat sessions as first-class objects. Persist session state and files so long tasks can resume after interruption.
  • Balance load deliberately. The PANDA paper describes CPU-inspired agent scheduling and power-of-two-choices load balancing, which it cites as giving over 2.5 times faster median response time than random sampling under high load. It also sustained task completion under agent crashes on HotPotQA.
  • Use serverless lifecycles. Start runtimes on demand and shut them down on completion to reduce idle runtime charges; retained state and other usage may still be billed.
  • Cap fan-out. Set a ceiling on parallel agents per task, since the evidence above shows returns flatten quickly.

The operational side is covered in AI agents in production.

Measuring reliability and cost at scale

Per-step errors compound. Arize's agent reliability framework notes that, assuming independence, an eight-step task with 95% per-step reliability succeeds end to end only about 66% of the time. It recommends a scorecard that covers:

  • task success and repeated-run consistency
  • recovery rate and robustness under perturbation
  • false-completion rate and severity of failures
  • cost and latency per completed task
  • escalation and human-repair rates

Slice these by workflow and consequence rather than averaging them. The design-principles study also flags consistency as a central production challenge: downstream agents tend to reinforce upstream framing, so quality-assurance agents should be given adversarial rather than cooperative instructions. See how to measure and improve AI agent reliability for the method in full.

How HarnessRouter fits the scaling path

HarnessRouter is an open-source unified interface and cloud platform that integrates agent harnesses such as Codex, Claude Code, Hermes, DeepSeek and Pi, with support for 30 harnesses, behind one API. It provides agent session management, file handling, plugin support, environment provisioning, benchmarking tools and serverless agent runtime lifecycle features. Because supported harness, model and sandbox combinations are configurable, the benchmark-then-route method above can use the compatible configurations available for each task. The platform is built on the open Unified Harness Protocol, described in AI agent protocols in 2026.

Perspective

Scaling fails most often because teams commit early to one harness, one model and one topology, then discover that the evidence says the best combination changes by task. This research suggests that diversity can outperform duplication in tested setups, coordination pays only where it is measured, and cost follows context and caching behavior.

Our view is that the agent harness layer should be commodity infrastructure, swappable like a model provider. That is why we initiated the open Unified Harness Protocol and built HarnessRouter so teams can compare and select supported harness and model configurations for each task by quality, latency and cost, and run tasks in an isolated sandbox. This approach can reduce costs when a lower-cost configuration meets the task's quality requirements.

Start scaling on a published price list

HarnessRouter Cloud has a Free plan at $0 per month, Developer at $20 per month, Production at $200 per month and Scale at $1,000 per month, with Enterprise available on request. Bring-your-own-key routing carries no fee up to $25,000 per month of model usage at listed prices; above that volume, a separate 5% routing fee applies. Platform usage charges still apply. Pricing lists tracing as a $50-per-month beta add-on on other plans and includes it with Scale. Current terms are on the pricing page, and teams that prefer to self-host can use the Community Edition. To see which harnesses are supported, browse the agent harness directory.

HarnessRouter

Sources

FAQ

Frequently asked questions

How do I scale AI agents without raising cost linearly?
Route each task to the cheapest supported harness and model that meets its quality bar, and keep reusable context prefixes stable to improve cache reuse where the provider supports it. Cached input accounted for 72.9% of modeled API cost among requests with reported cache usage in one coding-agent workload study, so account for cache behavior as well as raw prompt size. Benchmark on your own tasks before committing.
Is a multi-agent system always better than a single agent?
No. In the Google and MIT study, multi-agent variants cut PlanCraft performance by 39% to 70% while centralized coordination improved Finance Agent results by 80.8%. Above roughly 45% single-agent success, extra agents predicted no gain or a loss.
How many agents should run in parallel?
Cap it at the point where measured gains stop. One Terminal-Bench study with GPT-5 mini peaked at 5 agents and 3 feedback loops, and degraded at 7 agents and 5 loops. Parallel teams of 8 finished about 6 times faster in another study but scored about 7% lower, so use them when speed outweighs quality.
What should I monitor in production?
Track task success, repeated-run consistency, recovery rate, false-completion rate, and cost and latency per completed task. Slice them by workflow and consequence instead of using one average.

→Next

Start scaling on a published price list

A team that can change the harness without rewriting its product can run the benchmark, follow the result and keep scaling on evidence.