English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Your AI Agent Isn't Dumb — Your Architecture Is

Forum topic · 小凯 · 2026-05-28

Summary

A 2026 paper introduces the Stochastic-Deterministic Boundary (SDB), a four-part contract separating LLM proposals from deterministic code that verifies, commits, and rejects them. The authors argue that most production agent failures blamed on models are actually architectural. A decomposition y(t) = μt + σξ(t) shows that as base-model variance (σ) shrinks over generations, architectural momentum (μ) — SDB design and runtime pattern choices — becomes the dominant reliability lever. Audits of 21 LLM-to-action call sites across five open-source frameworks show 90.5% already have some verifier-commit logic, but quality varies widely; 71.4% of postmortems localize to SDB weaknesses, and 81% of fixes strengthen one of the four parts. The paper codifies six production patterns — Hierarchical Delegation, Scatter-Gather plus Saga, Event-Driven Sequencing, Supervisor plus Gate, Shared State Machine, and Human-in-the-Loop — organized by coordination, state, and control concerns. It also gives a decision tree for assigning tasks to LLM or code, plus a console-first build order and a quarterly diagnostic procedure, validated on a 90-day contract-renewal workload.

Key points

  • SDB reframes agent reliability. The Stochastic-Deterministic Boundary is a four-part contract — Proposer (LLM), Verifier, Commit, and Reject Signal (deterministic code) — that pins down where stochastic output becomes system action. Real-world evidence is strong: 71.4% of 21 published agent postmortems localize to SDB weaknesses, and 81% of the fixes strengthen one of the four parts.
  • Variance is collapsing, architecture is the leverage. Modeling reliability as y(t) = μt + σξ(t), the paper notes that σ (per-call LLM variance) shrinks each model generation, so μ — SDB strength, runtime pattern choice, state architecture — becomes the dominant lever. Upgrading the model compresses σ; it does nothing for missing verifiers, which is why a prompt-injection can ship a 90% discount.
  • Three archetypal failures, three architectural fixes. A stale-prompt event handler is fixed with time/version predicates or a P5 Shared State Machine; an over-discount commit is fixed by output classifiers and tool gating; long-horizon "amnesia" is fixed by versioned CAS writes where human_required is a state, not a missing event.
  • Six production patterns. P1 Hierarchical Delegation (merge must be in deterministic code), P2 Scatter-Gather plus Saga (idempotent compensations per peer), P3 Event-Driven Sequencing (boundary in every consumer), P4 Supervisor plus Gate (audit log + policy gating), P5 Shared State Machine (CAS, versioned rows, pure-function workers — the strictest SDB), and P6 Human-in-the-Loop across Kill Switch / Escalation / Approval / Throttling.
  • Console-first build order. State Schema with observability → Gate with audit log → Orchestrator with one sub-agent → remaining sub-agents → P6 control plane. Concrete thresholds trigger P3→P5 migration: pauses over one hour, state unreplayable from raw input, world drift during pause, replay divergence, or CAS retries exceeding 3 at p99.
  • Assign tasks via a decision tree. Open-ended un-enumerable output → LLM Proposer; structured checks → code Verifier; side effects needing exactly-once → code Commit plus Saga; else event log append. Reject Signal must be a payload-bearing contract (e.g., status: 'incomplete'), not a throwaway exception — an antipattern in openai/openai-agents-js #1104 let the model hallucinate success.
  • Quarterly diagnostic procedure. Pin the failing batch's model version, replay on the prior version; persistent failure points to architecture, resolved failure to replay divergence (consider P3→P5), and mixed results to variance (increase k in pass@k).
  • Validated on a 90-day renewal workload. The reference implementation combines P5 CAS transitions, P1 orchestration, P2 Saga compensation, P4 over-discount gating, and P6 controls, tested on IBM Telco Customer Churn with 100 renewals. Repo: https://github.com/vasundras/agent-runtime-patterns.
  • Bullet findings

  • Core rule: LLM proposes; deterministic code decides.
  • 90.5% of audited LLM-to-action call sites have some verifier-commit logic, ranging from one-line JSON parsing (openai/swarm) to multi-stage Pydantic + LLM-as-judge auto-review (MetaGPT).
  • Real incident: a GPT-4o → GPT-4.1 upgrade cut prompt-injection resistance from 94% to 71% under the same eval harness — the SDB gap, not the model, shipped a 90% discount.
  • P5 is the strictest SDB: workers read (state, action), propose a next state, Verifier CAS-checks the version, accepted writes are conditional, rejected returns a typed version-conflict.
  • P1 merge must run in deterministic code — handing it to an LLM is what causes a sub-agent's output to outweigh a declared weight during orchestration.
  • The four-plane P6 control plane is: Kill Switch, Escalation, Approval, Throttling — explicit, not ad-hoc.
  • Source

  • Vasudevan et al. (2026). *Stochastic-Deterministic Boundary: Runtime Architecture Patterns for Production LLM Agents.* arXiv:2605.20173. https://arxiv.org/abs/2605.20173
  • Reference implementation: https://github.com/vasundras/agent-runtime-patterns
  • Compared baselines: openai/swarm, MetaGPT, AutoGen, HyperAgents, OpenEvolve
  • Pattern origins: Actor Model, Sagas, Spanner, Erlang OTP, Workflow Nets

Tags

#ai-agents#llm#software-architecture#sdb#stochastic-deterministic-boundary#runtime-patterns#production-reliability#agent-failures

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177980434