Why Determinism, Low Speculative AI Rework, and Auditable Workflows are the Future of Agentic Systems
The Metaphore
When using AI to build systems, automate processes, or expand operational intelligence, the traditional experience is painfully familiar: the first cut is typically crap; the second is only marginally better. Teams quickly find themselves trapped in a seemingly never-ending, token-expensive cycle of prompt tweaking, speculative AI rework, and non-deterministic trial and error.
Both Graph Engine (832 Labs) and Max O’Brien’s Agentix Framework (Superhuman Docs / Coda) stem from the exact same core realization: the “chat-loop side-panel agent” with full tool/MCP access is broken for serious production workflows.
Why did I build Graph Engine?
Two reasons, really. First, Coda wasn’t ready to handle the complexity of multi-step reasoning chains reliably, and second, I wanted a more robust platform for orchestrating these complex interactions in a manner that would travel easily. And by ‘travel’, I mean portability; we don’t know what platform will be dominant in 18 months.
Chat-based sidebars and conversational loops encourage speculative AI reasoning, high token burn, slow execution, and unpredictable drift. Both frameworks attack this problem at its root by enforcing the philosophy of “Measure Thrice: Cut Once”:
-
Collapsing the Iterative Cycle: By eliminating LLM-driven control loops and speculative improvisation, both frameworks drastically shorten the build-and-run cycle.
-
Radical Cost & Performance Gains: Replacing chat loops with zero-token orchestration and structured schemas slashes token burn (by 60%+ in Agentix, and up to zero-token orchestration overhead in Graph Engine) while accelerating execution by 10x.
-
Auditable & Provable Workflows: Instead of burying decision rationale inside volatile conversational chat transcripts, both frameworks produce deterministic, fully auditable execution trails.
While their core mission is identical—high determinism with minimal speculative AI rework—they diverge in target runtimes, interface contracts, state models, and verification rigor:
-
Max’s Agentix Framework achieves this in no-code business applications using native document formulas (CFL), human/prompt dual-purpose schemas, and formulaic JSON state merging.
-
Graph Engine achieves this in developer-grade, evidence-honest knowledge work using strict TypeScript Zod contracts, isolated CLI sub-agent runtimes, adversarial multi-lens skeptic verification, and zero-hallucination source quote binding.
High-Level Architectural Comparison
Core Deep-Dive: 4 Pillars of Deterministic Execution
1. Schema & Contracts: Eliminating Speculative Output Drift
The primary driver of “first cut is crap” AI results is unconstrained output shape. When an AI can answer in any format it chooses, downstream steps break or require constant speculative prompt engineering.
-
Agentix (The SCHEMA):
-
Concept: A plain-text document serves as both human documentation and the literal LLM prompt (“The documentation is the prompt”).
-
Mechanism: Micro-prompts, forced enum lists
(options: Clean, Abrasive), and indented sub-fields(list)lock the AI into a fixed shape and vocabulary on the first attempt. -
Value: Business users draft and audit contracts directly inside a document without writing code.
-
-
Graph Engine (Zod Edge Contracts):
-
Concept: Software engineering type safety applied to AI node boundaries. Every edge between sub-agents is governed by explicit Zod schemas compiled to JSON Schema (
pack/schemas.json). -
Mechanism: Enforces strict runtime validation. If an LLM response breaches the schema, Graph Engine automatically retries the node while feeding the exact Zod validation error back to the LLM.
-
Value: Completely prevents malformed or improperly typed data from propagating downstream.
-
2. State & Memory: Auditable Snapshots vs. Provable Evidence Trails
Unverifiable AI state leads to ghost errors and un-reproducible bugs. Both frameworks replace loose chat transcripts with structured, auditable state.
-
Agentix (The MEMORY):
-
Concept: State lives in a single JSON object updated step-by-step using a native doc formula (
MEM.ParseJSON()._merge(Result.ParseJSON())). -
Mechanism: Each step emits only its own new fields; a deterministic CFL formula layers the new results onto the running state object (“The Sticky Note”).
-
Value: Provides business managers with a single, human-readable snapshot page representing the exact accumulated decisions of the workflow.
-
-
Graph Engine (Immutable Edge Passing & Node Artifacts):
-
Concept: Nodes execute in isolated sub-agents and pass Zod-validated payloads over typed edges. State is never mutated silently.
-
Mechanism: Every run persists un-reduced outputs for every node to disk (
/runs/<ts>/nodes/). Hierarchical map-reduce barriers summarize parallel outputs without destroying evidence provenance (preserveBarrierEvidence). -
Value: Complete mathematical auditability. Every claim can be traced back to its raw node output and exact source document origin.
-
3. Orchestration & Control Flow: Zero-Token Determinism
Using an LLM to decide every micro-step of orchestration is slow, wildly expensive, and inherently flaky.
-
Agentix (NextAction Routing):
-
Concept: Control flow is data. The SCHEMA includes a
NextActionfield that the LLM sets based on explicit business rules (e.g.,if ValidationResult is Illegal, set to "Backtrack"). -
Mechanism: A CFL formula reads
NextActionand calls the next agent row by name. A blank value terminates the run. -
Value: Achieves conditional branching, bounded retry loops, and self-correction without an external orchestration server.
-
-
Graph Engine (Programmatic Execution Primitives):
-
Concept: Absolute zero-token coordination. Execution control flow belongs in code, not in LLM reasoning.
-
Mechanism: Functions like
parallel(),barrier(),convergentLoop(), andwithPhase()manage concurrency, worker pools, retries, and rate limits in pure JavaScript/TypeScript. -
Value: Maximum execution speed, zero token spend on orchestration logic, and total elimination of non-deterministic routing failures.
-
4. Verification & Truth: Self-Correction vs. Adversarial Evidence Auditing
To achieve “cut once” precision, workflows must detect and reject bad outputs before they reach production.
-
Agentix:
-
Mechanism: Structural syntax retries (validating JSON
{...}bounds) combined with a declarativeBacktracknode loop when validation rules fail. -
Value: Ensures document workflows recover gracefully from illegal configurations or malformed responses.
-
-
Graph Engine:
-
Mechanism: Evidence-Honest Knowledge Work.
-
Quote Binding (
bindFindingEvidence): Strips fabricated quotes and tags claims asunbound-evidence. -
Adversarial Verification (
verifyFindings): Multi-lens skeptic sub-agents evaluate claims for correctness, logic, and source quality. -
Truth Classification: Explicitly tags claims as Corroborated (proven by verbatim quotes), Plausible (logical but unevidenced), or Rejected.
-
-
Value: Delivers provable, zero-hallucination outputs suitable for enterprise board papers and strategy deliverables.
-
Strategic Value: Why “Measure Thrice” Wins
By replacing conversational improvisation with structured determinism, both frameworks deliver three transformative business outcomes:
-
Drastically Lower Production Costs: Eliminating multi-turn chat loops and speculative AI rework reduces token consumption by 60% to 90%+.
-
Accelerated Throughput: Zero-token orchestration and deterministic state merges execute 10x faster than conversational side-panel agents.
-
Provable & Auditable Operations: Workflows move from “black box chat logs” to fully auditable, inspectable execution trails that compliance and business leaders can trust.
Conclusion
The cycle of “first cut is crap, second cut is marginally better” is not an inevitable feature of AI—it is the symptom of an un-disciplined architecture.
Max O’Brien’s Agentix Framework and my approach with Graph Engine prove that when you measure thrice—through explicit schemas, zero-token control flow, and structured state—you can cut once with total confidence. Whether deployed inside a Coda doc or across a TypeScript CLI harness, deterministic agentic workflows are the only viable path to enterprise-grade AI execution.
With enough pressure, Coda will be capable of the architectural discipline needed to support graph-directed workflows that deliver truly transformative business outcomes.
@Max_OBrien has been on this path for several years. I’m slowly ‘getting it’. ![]()