{"slug": "enforcing-the-money-boundary-in-agent-assisted-banking", "title": "Enforcing the Money Boundary in Agent-Assisted Banking", "summary": "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.", "body_md": "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.\n\nA 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.\n\nORAIflow 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.\n\nThe core architecture splits responsibility across four distinct owners:\n\nThe 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.\n\nIn practice, that separation comes down to four explicit boundaries:\n\nEach step requires an explicit transition through the component responsible for owning that state, rather than letting a proposal turn directly into an execution command.\n\nYou 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*.\n\nSo instead there are several narrow contracts, and the gaps between them are where the safety lives:\n\nBecause 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.\n\nThe 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.\n\nOne file is the source of truth: shared/contracts/registry.json. Four registries, no microservice, no new authority:\n\n```\n|      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?       |\n```\n\nPython 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.”\n\nEvery capability follows the same lifecycle, in order:\n\n*Resolve → Validate input → Establish context → Check preconditions → Execute → Validate output → Attach evidence → Resolve presentation → Complete.*\n\nCustomer 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:\n\n```\n\"kernel.transfer.confirm\": {  \"agent_callable\": false,  \"authority\": \"banking_kernel\",  \"required_evidence\": [\"customer_digest_confirmation\", \"challenge\"]}\n```\n\nBecause 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.\n\nEvery MCP and frontend response returns in a standardized envelope that carries an explicit trust classification:\n\n```\n{  \"capability\": \"banking.transactions.recent\",  \"outcome\": \"SUCCESS\",  \"data\": [ \"…\" ],  \"evidence\": {       \"source\": \"mcp\",       \"scope\": \"authenticated_customer\",       \"completeness\": \"COMPLETE\"   },  \"trust_class\": \"untrusted_banking_data\"}\n```\n\nMarking 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.\n\nThe envelope also uses an explicit set of typed outcomes designed for partial and failed operations:\n\nAn 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.\n\nMany agent pipelines use a model-reported confidence score as an authorization gate. ORAIflow treats confidence strictly as telemetry.\n\nBy 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.\n\nWhen 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.\n\nAbstention is treated as a standard control-flow branch rather than an error:\n\nThe 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\nn the transfer flow, the runtime’s job stops at opening an editable draft — never submitting a payment. The workflow moves through explicit states:\n\n```\nCONTACT_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\n```\n\nThree rules govern this state machine:\n\nOne 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.\n\nTo keep the boundary clear between architecture and production readiness:\n\nEven without adopting ORAIflow, the underlying practices transfer to any high-stakes agent system:\n\nThe language model is useful for interpreting customer intent, while deterministic code and verified contracts remain responsible for financial state and execution.\n\nThe answer to all six is the same: **governance by construction, not by hope.**\n\nORAIflow 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.\n\nIf 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.\n\n[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.", "url": "https://wpnews.pro/news/enforcing-the-money-boundary-in-agent-assisted-banking", "canonical_source": "https://pub.towardsai.net/enforcing-the-money-boundary-in-agent-assisted-banking-cd7d1ed8a821?source=rss----98111c9905da---4", "published_at": "2026-12-06 19:01:01+00:00", "updated_at": "2026-12-06 19:14:37.667398+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "large-language-models", "ai-tools"], "entities": ["ORAIflow", "ORAIflow Capability Contract Framework", "OCCF", "kernel.transfer.confirm", "banking_kernel"], "also_reported_by": [], "takeaway": "Keep money-moving operations out of the model's tool surface by declaring them agent_callable: false in a single registry that generates validators and fails CI on drift, so the model only sees the intent contract while the money boundary accepts only the final authorized command.", "recommendation": {"advice": "Declare money operations as agent_callable: false in one registry file, generate validators from it, and gate CI on a SHA-256 digest so hand-edited model-facing schemas fail the build.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/enforcing-the-money-boundary-in-agent-assisted-banking", "markdown": "https://wpnews.pro/news/enforcing-the-money-boundary-in-agent-assisted-banking.md", "text": "https://wpnews.pro/news/enforcing-the-money-boundary-in-agent-assisted-banking.txt", "jsonld": "https://wpnews.pro/news/enforcing-the-money-boundary-in-agent-assisted-banking.jsonld"}}