Read-Only Architecture for Connecting AI Assistants to Bank Accounts

    This article breaks down a read-only architecture that lets AI assistants access bank account data without exposing credentials or enabling transactions. It covers the four-layer design (data bridging, authorization and credentials, read-only data access, and inference and presentation), why read-only scopes are the security foundation, key privacy engineering practices such as field minimization and encryption, and how deterministic operators turn transaction history into reliable answers. It also includes a governance checklist and future directions for building similar capabilities.

    1. Background: From a Bookkeeping Tool to a Conversational Financial Analysis Entry Point

    The industry trend over the past two years shows that personal finance interaction is shifting from form-based data entry to natural language Q&A. Users no longer want to manually categorize every expense. Instead, they ask questions such as “What does my spending structure look like this month?”, “Which recurring bills are due before the next payday?”, or “Can my current cash flow support a large purchase?” An AI assistant reads the account data and produces structured conclusions.

    The engineering challenge here is not the conversation itself, but how to give the model secure access to financial data. Financial data is highly sensitive personal information, and a poorly designed integration creates far more risk than value. The common industry approach combines a licensed data aggregation intermediary with read-only authorization: a specialized data bridging service handles the integration with banking systems, while the AI side obtains a limited set of fields through a standardized interface.

    2. Overall Architecture: A Four-Layer Decoupled Design

    A practical solution is typically divided into four layers with strictly isolated responsibilities:

    1. Data bridging layer: Connects to various banks and credit card institutions. Because each institution differs greatly in API protocols, authentication methods, and field naming, this layer abstracts them into a unified account and transaction model.
    2. Authorization and credential layer: The user completes identity verification here and selects the authorization scope. The key point is that the credentials are held by the bridging layer, and the AI side receives only a revocable access token.
    3. Data access layer (read-only): Reads account metadata, balances, credit limits, and historical transactions using a minimal field set.
    4. Inference and presentation layer: Converts structured data into context, where the model performs categorization, summarization, comparison, and explanation, then renders the conclusions as charts or lists.

    Illustrative data access logic (pseudocode, expressing only the call sequence and field-trimming approach):

    1. # 1. After user confirmation, create a read-only session; credentials are held by the bridging layer
    2. session = aggregator.create_session(user_id, scopes=["accounts.read", "transactions.read"])
    3. # 2. Pull only whitelisted fields to avoid storing the full dataset
    4. accounts = session.accounts(fields=["institution_name", "account_name",
    5. "account_type", "last4", "balance", "credit_limit"])
    6. # 3. Limit transactions by time window and fields
    7. txns = session.transactions(start="2 years ago",
    8. fields=["date", "amount", "merchant", "category"])
    9. # 4. Mask and trim before passing to the inference layer
    10. context = build_context(accounts, txns, mask=True, max_records=500)

    3. Read-Only Permissions: Why They Are the Security Foundation

    Read-only means the data channel has no write capability at the protocol level. It delivers three benefits:

    • Funds cannot be moved: No transfers, payments, or investment orders can be initiated, so model output cannot directly cause any change to assets.
    • Credentials are not exposed: The user’s bank password never enters the AI side. The bridging layer accesses accounts on the user’s behalf using tokens, so the bank side does not have to deal with automated programs scraping accounts directly.
    • Revocable at any time: Authorization is session-level. Once the user withdraws it, the data pipeline is immediately invalidated, following the minimal lifecycle of “authorize, use, destroy.”

    The boundaries that should be stated explicitly in the design document include the visible field scope (institution name, account name and type, last four digits of the account number, balance, available credit limit, and up to about two years of transaction history) and a capability statement clarifying that this feature is for expense explanation and budget estimation and does not constitute investment advice.

    4. Data Processing and Privacy Engineering Essentials

    1. Field minimization: Retrieve only the fields required to answer the question, and keep only the last four digits of the account number to distinguish accounts.
    2. Encryption in transit and at rest: Encrypt the entire pipeline, store persisted data in encrypted form, and manage keys separately from business data.
    3. Retention period and deletion: Define a clear transaction retention window and automatically purge data beyond it; revoking authorization triggers a cascading deletion.
    4. Auditability and explainability: Log the calling entity, field scope, and purpose for every data read to support traceability.
    5. Mask before entering the model: Process merchant names and amounts through range bucketing or hashing to reduce exposure of raw details.

    5. Capability Implementation: Turning Transaction History into Answerable Questions

    The core of the inference layer is not “prediction” but deterministic statistics plus natural language explanation. It is recommended to separate computation from expression:

    1. User question → intent recognition → select computation operator → structured query → statistical result → model generates explanation

    Common operators include category aggregation, period-over-period comparison, recurring bill detection (periodic charge detection), savings estimation (income minus fixed and flexible expenses), and large-purchase affordability estimation (based on the balance distribution of recent months). Letting the model handle only explanation and wording, while all numeric values are produced by deterministic code, can significantly reduce number hallucination.

    6. Risk and Governance Checklist

    • Authorization notices must be specific, stating “who can see the data, which fields, and for how long.”
    • Conclusions should include a note on the methodology, such as the statistical interval and any accounts not included.
    • For questions like “Can I afford it,” output a range and assumptions rather than a single assertion.
    • For major financial decisions, guide users to consult licensed professionals; the AI does not act as an advisor.
    • Establish an appeal and correction channel so that categorization errors can be manually corrected by users and fed back for optimization.

    7. Future Directions

    In the short term, the value centers on expense explanation and budget assistance. In the medium to long term, the direction is to let the assistant collaborate with regulated institutions and licensed advisors under user authorization, linking insights from scattered accounts into a more complete financial planning workflow. If an enterprise wants to build similar capabilities, it can rely on a container platform to host inference services, a message queue to smooth out traffic spikes, and object storage to hold masked reports, combined with logging services and monitoring alerts to support compliance auditing and reliability.