Enforcing the Money Boundary in Agent-Assisted Banking ORAIflow detailed an agent-safety architecture that replaces a single prompt-based boundary with a chain of independent contracts, each able to reject an invalid transition without consulting the language model. The design splits responsibility across four owners and four registries defined in a single source-of-truth file, shared/contracts/registry.json, with Python validating against it, TypeScript validators generated from it, and a SHA-256 digest check run in CI so any schema drift fails the build. Money operations such as "kernel.transfer.confirm" are declared in the registry as agent_callable: false with authority set to banking_kernel, and customer and tenant identity are always established server-side, so identifiers passed by the model are ignored. The previous article looked at the overall shape of putting an LLM inside a deterministic control plane. This one covers enforcement: the concrete boundaries that keep the model from authorizing or fabricating financial operations. A common approach to agent safety relies on a single boundary where the LLM decides an action and an API executes it, governed mainly by prompt instructions. Prompt rules are helpful, but they remain requests rather than hard controls — a model can misread, paraphrase, or work around them. ORAIflow replaces that single prompt boundary with a chain of independent contracts, each capable of rejecting an invalid transition without asking the model. It also treats failure, abstention, and clarification requests as versioned, tested outcomes rather than unhandled edge cases. The core architecture splits responsibility across four distinct owners: The language model handles natural-language interpretation and nothing beyond that. It is not the authority for capability selection, executable parameters, customer identity, account balances, or payment authorization. In practice, that separation comes down to four explicit boundaries: Each step requires an explicit transition through the component responsible for owning that state, rather than letting a proposal turn directly into an execution command. You could argue: why not one giant model-to-backend schema that carries everything — intent, arguments, identity, the works? ORAIflow deliberately does not do that, because each boundary answers a different question , and merging them is exactly how a capability result quietly becomes a customer-facing claim . So instead there are several narrow contracts, and the gaps between them are where the safety lives: Because the model only sees the first contract and the money boundary only accepts the last, intermediate steps cannot quietly promote interpreted text into an authorized financial command. The shared contract layer — the ORAIflow Capability Contract Framework, or OCCF — is where “the model can’t invent an alternate input, skip a precondition, or reinterpret an error as success” stops being a sentence and becomes a build that fails. One file is the source of truth: shared/contracts/registry.json. Four registries, no microservice, no new authority: | Registry | Question it answers | |--------------------|--------------------------------------------------|| intents | What does the customer appear to want? || capabilities | What bounded operation may the agent/app invoke? || presentations | Which renderer may display verified results? | | kernel operations | Which typed money ops exist at the Kernel? | Python validates against it. TypeScript validators are generated from it. A script computes a SHA-256 digest of the registry, and CI runs the check — so a hand-edited frontend or model-facing schema that drifts from the registry fails the build . The registry is the only thing that’s allowed to be the truth, and “the implementation is authoritative when code and prose disagree.” Every capability follows the same lifecycle, in order: Resolve → Validate input → Establish context → Check preconditions → Execute → Validate output → Attach evidence → Resolve presentation → Complete. Customer and tenant identity are always established server-side; any customer identifier passed by the model is ignored. Money operations are declared directly in the registry as non-callable by the agent: "kernel.transfer.confirm": { "agent callable": false, "authority": "banking kernel", "required evidence": "customer digest confirmation", "challenge" } Because agent callable is false and the operation is omitted from the model's tool surface, the model cannot invoke it or bypass it through prompt phrasing. Every MCP and frontend response returns in a standardized envelope that carries an explicit trust classification: { "capability": "banking.transactions.recent", "outcome": "SUCCESS", "data": "…" , "evidence": { "source": "mcp", "scope": "authenticated customer", "completeness": "COMPLETE" }, "trust class": "untrusted banking data"} Marking the payload as untrusted banking data enforces that validated banking records are treated strictly as data to display or inspect, never as instructions for the agent to follow. The envelope also uses an explicit set of typed outcomes designed for partial and failed operations: An invariant across the codebase requires every failure outcome to return data: null and trust class: connector error, preventing a missing or malformed connector response from being passed along as a valid figure. Many agent pipelines use a model-reported confidence score as an authorization gate. ORAIflow treats confidence strictly as telemetry. By default, the runtime operates in observe mode: schema structure, registry membership, evidence, required fields, and operation contracts are all enforced, while uncalibrated model confidence scores are logged without gating execution. An enforce mode exists, but its thresholds are intentionally left blank until calibrated against labeled examples per intent and provider. Confidence can describe an interpretation, but it cannot authorize a banking operation. When deciding whether a new user message continues an active workflow or starts a new request, ORAIflow applies a simple rule: resolve deterministically only when a single registered interpretation is unambiguous, and otherwise abstain so the structured interpreter evaluates the message in context. Abstention is treated as a standard control-flow branch rather than an error: The deterministic path acts only as a fast path for unambiguous replies, while everything else goes through the same structured interpretation boundary. When the interpreter extracts values, every field must carry an exact quote from a runtime-visible source, and numeric checks enforce token boundaries so evidence supporting 50 cannot validate 500. n the transfer flow, the runtime’s job stops at opening an editable draft — never submitting a payment. The workflow moves through explicit states: CONTACT SEARCH PENDING → AWAITING CONTACT only if multiple saved contacts match → AWAITING SOURCE ACCOUNT → RESOLVING SOURCE ACCOUNT a "highest balance" pref needs → READY FOR DRAFT verified balances → DRAFT REQUESTED → DRAFT OPENED → DISMISSED | COMPLETED Three rules govern this state machine: One current constraint is documented directly in the repository: only one pending transfer workflow is active at a time, and a second transfer in the same turn is not queued automatically. To keep the boundary clear between architecture and production readiness: Even without adopting ORAIflow, the underlying practices transfer to any high-stakes agent system: The language model is useful for interpreting customer intent, while deterministic code and verified contracts remain responsible for financial state and execution. The answer to all six is the same: governance by construction, not by hope. ORAIflow is open source — aigensys-labs/oraiflow https://github.com/aigensys-labs/oraiflow . FSL license: free for internal use, converts to Apache 2.0 after two years. It's a synthetic demonstration: the patterns are real, the governance is real, the bank is not. If you’ve tried to put an LLM agent in a regulated workflow and kept hitting the wall between “the model said so” and “the ledger says so” — I’d love to hear how you drew that line. That’s the part I’ve spent years getting right. Enforcing the Money Boundary in Agent-Assisted Banking https://pub.towardsai.net/enforcing-the-money-boundary-in-agent-assisted-banking-cd7d1ed8a821 was originally published in Towards AI https://pub.towardsai.net on Medium, where people are continuing the conversation by highlighting and responding to this story.