Command Palette
Search for a command to run...
L'effet Harness : Comment la conception de l'orchestration définit l'économie des tokens de l'IA agentique d'entreprise
L'effet Harness : Comment la conception de l'orchestration définit l'économie des tokens de l'IA agentique d'entreprise
Résumé
Le modèle dominant dans le développement de l'IA agentique est ce que nous appelons le token maxing : acheter de la capacité avec des tokens — des traces de raisonnement plus longues, plus de tours d'agent, des charges utiles d'outils plus larges, des contextes rejoués plus volumineux — de sorte que les tokens par tâche croissent plus vite que la valeur de la tâche. La baisse des prix par token masque le phénomène sans le corriger ; la dépense totale augmente malgré tout. Nous soutenons que le levier décisif contre le token maxing est le harness : la couche d'orchestration qui assemble le contexte, expose les outils, séquence les tours, délègue le travail et porte la surface d'observabilité et de gouvernance sur laquelle repose un déploiement d'entreprise. Pour isoler cette couche, nous effectuons un échange contrôlé : les mêmes 22 tâches d'évaluation verrouillées sur les mêmes six modèles de fondation (Claude Sonnet 4.6, Gemini 3.1, Gemini Flash 3.5, Qwen 3.6, GLM 5.1 et Palmyra X6), en changeant uniquement la couche d'orchestration : une boucle d'agent de production conventionnelle (la référence gelée) contre le Writer Agent Harness. En maintenant les modèles constants, placer le harness au cœur de l'exécution réduit le coût mixte par tâche de 41 % (0,21 →0,12), le temps d'horloge médian de 44 % (48 s → 27 s) et les tokens par tâche de 38 % (14,2k → 8,8k), tandis que la qualité d'achèvement des tâches reste à parité (0,78 → 0,81, directionnel à cette taille d'échantillon). Les gains d'efficacité sont invariants selon le modèle — chaque modèle devient moins cher, de 33 % à 61 % — tandis que les gains de qualité dépendent des capacités : l'amélioration qu'un modèle extrait du harness est en corrélation presque parfaite avec sa force de référence (r = 0,99, n = 6), un phénomène que nous appelons harness leverage. La qualité par dollar augmente de 82 % et les achèvements de tâches par million de tokens passent de 54,9 à 92,0. Sur cette charge de travail, la couche d'orchestration a fait varier le coût par tâche plus que le passage du modèle le moins cher au plus cher. Nous formalisons l'économie des tokens au niveau de la couche d'orchestration, y compris un modèle de prix effectif des entrées avec mise en cache des prompts ; définissons le token maxing ; détaillons les six familles de mécanismes derrière l'effet, de la discipline de forme du cache à la gouvernance des dépenses d'échec ; comparons six systèmes d'agents largement utilisés sur les mêmes axes ; et soutenons que le harness est le seul composant dont l'efficacité se multiplie sur chaque modèle qu'une organisation exécute — présent et futur.
One-sentence Summary
Writer, Inc. demonstrates that the orchestration harness, the layer assembling context, tools, and governance, is the decisive lever for token economics in enterprise agentic AI, showing in a controlled experiment that swapping to their harness cuts blended cost per task by 41% and tokens by 38% while maintaining quality parity, and reveals model-invariant efficiency gains and a harness leverage effect where quality improvement correlates almost perfectly with baseline strength (r=0.99).
Key Contributions
- A controlled experiment swapping only the orchestration layer across six foundation models and 22 locked tasks shows that the Writer Agent Harness reduces blended cost per task by 41% (0.21to0.12), median wall-clock time by 44% (48s to 27s), and tokens per task by 38% (14.2k to 8.8k), while overall task-completion quality remains at parity (0.78 to 0.81).
- The paper identifies a "harness leverage" effect, where the quality improvement a model extracts from the harness correlates almost perfectly with its baseline strength (r = 0.99, n = 6), so stronger models gain more from the same orchestration enhancements.
- The work formalizes token economics at the orchestration layer, defining token maxing and introducing an effective-input-price model under prompt caching, and details six mechanism families (cache-shape discipline, failure-spend governance, etc.) that drive efficiency, with analysis showing the harness multiplies efficiency across all models an organization runs.
Introduction
Agentic tasks unfold over many turns, with the orchestration harness controlling nearly all token consumption beyond the model’s own output. The industry’s default pattern is “token maxing”: falling per-token prices fuel ever-larger context windows, history replays, and tool schemas, buying quality at declining marginal returns. Prior efficiency work mostly targets token reduction inside a single model call (prompt compression, constrained reasoning) or chooses cheaper models via routing, but none address the harness layer that governs cross-turn costs like conversation replay, retrieval payloads, and failure retries. The authors tackle this gap by formally decomposing token economics at the orchestration level and isolating the harness’s effect through a controlled swap: 22 locked tasks and six models, identical prompts, judges, and price tables, varying only the orchestration code. The resulting harness redesign cuts tokens by 38%, cost by 41%, and latency by 44% without quality loss, while stronger models convert harness structure into measurable capability gains.
Method
The authors define the cost of a k-turn agent loop as: C=∑i=1k(pinTiin+poutTiout) The input tokens Tiin decompose into system prompt, history, tool schemas, retrieval, and user turn. A naive harness replays the full transcript, causing total input tokens to grow quadratically with the turn count.
A harness that compacts history, caches the invariant prefix, offloads bulky tool outputs, and truncates retrieval converts this quadratic term to approximately linear. Furthermore, since agent workloads are input-dominated with input-to-output token ratios near 100:1, the effective input price is heavily influenced by cache hits. If a fraction h of input tokens are cache reads billed at a multiplier κ≈0.1, the effective input price becomes: pineff=pin(1−h(1−κ)) Thus, a harness that maintains a high cache hit rate pays roughly a tenth of the list price for the dominant term of the cost equation.
The Writer Agent Harness acts as the runtime between the application and foundation models. It owns context assembly, the tool layer, workflow execution, delegation, and observability via a trace shim. It replaces conventional agent loops, which typically use monolithic prompts and destructive truncation, with explicit contracts like native tool calling, non-destructive structured compaction, and sub-agent delegation.
The harness rewrites the cost bill through six mechanism families designed to maximize cached, decision-relevant tokens spent on committed work. First, cache-shape discipline enforces a two-zone prompt structure.
Every prompt features a byte-stable prefix containing the full tool-schema catalog, stable system prompt, and append-only durable transcript, followed by a volatile tail rebuilt every turn. This split ensures provider breakpoints are pinned in the stable prefix, achieving approximately 99.9% cache hit rates for the dominant input term. Second, structured, incremental, cache-aware compaction folds older history into typed checkpoints at 80% of the input budget. A live tail of recent messages survives verbatim, and summarization runs on a cheaper helper model off the paying loop. Third, context offload mechanisms keep information available without keeping it in context. Sub-agents act as context firewalls returning capped summaries, skills use progressive disclosure, and bulky tool outputs spill to files. Fourth, zero-token waiting and durability allow runs to suspend durably at zero token cost for human answers or background jobs. Fifth, failure-spend governance classifies failures into typed classes before decisions are made, ensuring mid-stream failures become discarded attempts with no side effects. Finally, a model-agnostic floor ensures routing is a typed plan supplied as data, with native tool calling as the only invocation path backed by schema hygiene.
These optimizations compound at fleet scale.
At one million agent tasks per month, the harness reduces blended cost significantly compared to the baseline, demonstrating model-portable, volume-linear savings that stack with other optimizations.
Experiment
A paired-swap experiment across 22 tasks and six models, holding prompts, judges, and prices fixed, isolates the effect of replacing a conventional production loop with a token-economics-aware agent harness. The harness reduces token intensity by 38% and cost by 41% while maintaining quality parity, with cost savings uniform across all models but quality gains concentrated in stronger models. Token economics at the orchestration layer emerges as a larger cost lever than model selection, and the findings advocate for tracking completions per million tokens as a key performance indicator to prevent token maxing.
Across widely used agent systems, token economics is rarely a first-class contract: most frameworks leave caching, compaction, and delegation to the application, and none of the single-user clients or orchestration libraries provide per-task accounting. The Writer Harness is the only surveyed system that combines model portability, structural cache policy, compaction contracts, firewalled delegation, zero-token waits, and per-task accounting, aligning token costs with task volume in a multi-tenant fleet. This design enables volume-linear efficiency gains that compound with per-token price declines and routing optimizations. Claude Code and Claude Cowork are single-user, vendor-locked clients that lack per-task accounting and zero-token wait mechanisms. LangGraph, CrewAI, and AutoGen leave prompt-cache policy, compaction, and delegation to the application layer, with no framework-level per-task measurement. Shared-transcript multi-agent frameworks multiply token consumption, with published measurements showing roughly 15× the tokens of chat. The Writer Harness is the only system that provides firewalled delegation and per-task accounting, turning token economics into a measurable, budgetable surface.
The experiment evaluated a model-agnostic harness across six diverse models—two frontier, one fast-tier, two open-weight, and one enterprise—to test portability. The harness delivered uniform and decisive efficiency gains, reducing token consumption by 38% at quality parity, with the strongest deployment readiness seen in Palmyra X6 and Sonnet 4.6. Quality differences were directional and not statistically reliable given the small sample, so the defensible headline is efficiency rather than quality improvement. The harness proved model-portable, working identically across all six models spanning frontier, fast-tier, open-weight, and enterprise classes. Efficiency was uniform and decisive: a 38% reduction in tokens at quality parity, shifting completions per million tokens from 54.9 to 92.0.
The harness achieved decisive efficiency gains while holding task-completion quality at parity. Token consumption fell by 38%, cost per task dropped by 41%, and median wall-clock time was reduced by 44%, with derived metrics showing over 80% more quality per dollar and nearly 70% more completions per million tokens. The results support leading with efficiency claims rather than quality, which is statistically indistinguishable from the baseline. Task-completion quality remained at parity, with a negligible +0.03 difference that is a wash at the given sample size. Cost per task dropped decisively from 0.21to0.12 and token usage fell from 14.2k to 8.8k per task. Quality per dollar rose by 82% and completions per million tokens increased by 68%, shifting the token efficiency KPI in the opposite direction of industry trends. Median wall-clock time per task was cut by 44%, improving user-facing latency and throughput per infrastructure unit. Hand-scored UI/UX improved qualitatively, reflecting earlier streaming, live tool status, and clean cancellation.
Adopting the harness reduced per-task cost for every model tested, with no exceptions, cutting costs by at least a third across six models from five vendors. The orchestration layer proved to be a larger cost lever than model selection: switching from the most expensive to the cheapest baseline model saved 36%, while the harness saved between 33% and 61% on any given model. The largest relative gains occurred on the fastest, cheapest model, where overhead made up a greater share of the total cost. Every model's cost dropped by at least 33%, confirming a uniform effect not tied to specific model behaviors. The harness delivered larger cost savings than choosing the cheapest model over the most expensive one, shifting optimization focus from model choice to orchestration. Gemini Flash 3.5 saw the biggest reductions: 61% lower cost and 55% lower latency, consistent with overhead being a larger portion of its total bill. Latency fell by 33% to 55% across models, improving throughput and reducing retry costs.
Sub-agent delegation reveals a sharp capability floor: only the two strongest models reach usable reliability, with Palmyra X6 at 0.86 and Sonnet 4.6 at 0.85. Scores drop to 0.70 on Gemini 3.1 and 0.58 on GLM 5.1, and fall below 0.50 on the fast tier, showing that exposing this orchestration feature to weaker models produces failures rather than function. The pattern argues for disabling delegation or scoping it down on models below the floor. Delegation task-completion scores are high only for Palmyra X6 (0.86) and Sonnet 4.6 (0.85), while fast-tier models score between 0.42 and 0.45. The sub-agent feature exhibits a capability floor: below a certain model strength, exposing it degrades reliability so much that it should be disabled or gracefully degraded per model tier.
The evaluation validates the Writer Harness across six diverse models, testing portability, efficiency, and delegation reliability. The harness delivers uniform and decisive gains in token consumption, cost, and latency at quality parity, demonstrating that orchestration provides larger cost savings than model choice alone. Sub-agent delegation reveals a sharp capability floor, with only the strongest models achieving usable reliability, while weaker models require graceful degradation.