ShVaSa Blog
Systems & RL • 5 min read

JPMorgan is working on AI agent transactions that don’t involve humans

Published on 2026-11-18 by Sharath Japa, ShVaSa Lab Lead
systemsarchitectureinfrastructureperformance
Discuss on r/shvasa

Executive Summary

The collaboration between JPMorgan Chase and Hyundai Card to deploy autonomous AI agents for financial transactions marks a shift from decision-support systems to fully automated execution pipelines. This transition requires a re-architecting of traditional fintech infrastructure, moving away from human-in-the-loop validation toward deterministic, low-latency agent orchestration. The core engineering challenge lies in maintaining strict financial compliance and atomicity guarantees while allowing non-deterministic large language model (LLM) outputs to drive state-changing operations.

This article dissects the system architecture required for such deployments, focusing on the reduction of inference latency, the implementation of verifiable execution traces, and the integration of financial APIs with agentic frameworks. We explore how to bridge the gap between probabilistic reasoning and deterministic ledger updates, ensuring that every agent action is auditable, reversible, and compliant with regulatory standards. The proposed solution emphasizes a hybrid architecture where LLMs handle intent parsing and strategy formulation, while traditional rule engines and formal verification tools handle execution and validation.

Implementation Details

The foundation of an autonomous financial agent system is a robust orchestration layer that manages state, memory, and tool execution. We utilize a structured approach where the LLM acts as a planner, generating structured JSON commands that are validated against a schema before execution. This prevents hallucinated API calls and ensures type safety.

Core Architecture Components

  1. Intent Parser: An LLM fine-tuned on financial transaction logs to extract intent, amount, counterparty, and purpose.
  2. Validator: A rule-based engine that checks compliance (AML/KYC) and budget constraints before execution.
  3. Executor: A secure wrapper around financial APIs that performs the actual transaction.
  4. Auditor: A logging mechanism that records the full chain of thought and execution results for regulatory review.

Python Implementation: Agentic Transaction Loop

The following Python snippet demonstrates a simplified agent loop using pydantic for schema validation and a mock API executor. This ensures that only valid, structured requests reach the financial backend.

PYTHON
import json
import logging
from typing import Optional
from pydantic import BaseModel, Field, validator
from enum import Enum

# Define strict schemas for transaction intents
class TransactionType(Enum):
    PAYMENT = "payment"
    REFUND = "refund"
    TRANSFER = "transfer"

class FinancialIntent(BaseModel):
    """
    Structured representation of an AI agent's proposed transaction.
    Enforces type safety and required fields before execution.
    """
    action: TransactionType
    amount: float = Field(..., gt=0, description="Transaction amount in USD")
    currency: str = Field("USD", description="ISO 4217 currency code")
    counterparty_id: str = Field(..., description="Unique identifier for the counterparty")
    purpose: str = Field(..., max_length=255, description="Business justification for the transaction")
    
    @validator('purpose')
    def validate_purpose_length(cls, v):
        if len(v) < 10:
            raise ValueError('Purpose must be detailed enough for audit trails')
        return v

class TransactionAgent:
    def __init__(self):
        self.logger = logging.getLogger(__name__)
        self.execution_log = []

    def parse_intent(self, llm_response: str) -> Optional[FinancialIntent]:
        """
        Parses raw LLM output into a validated FinancialIntent object.
        Returns None if validation fails, preventing execution.
        """
        try:
            # In production, use a structured output parser like LangChain's PydanticOutputParser
            data = json.loads(llm_response)
            intent = FinancialIntent(**data)
            self.logger.info(f"Validated intent: {intent.action} for {intent.amount} {intent.currency}")
            return intent
        except Exception as e:
            self.logger.error(f"Intent validation failed: {e}")
            return None

    def execute_transaction(self, intent: FinancialIntent) -> dict:
        """
        Executes the transaction after passing validation.
        In a real system, this would call JPMorgan's internal APIs.
        """
        self.logger.info(f"Executing {intent.action} for {intent.counterparty_id}")
        
        # Simulate API call latency and response
        response = {
            "status": "success",
            "transaction_id": "TXN-8842-ALPHA",
            "timestamp": "2023-10-27T10:00:00Z",
            "compliance_check": "passed"
        }
        
        self.execution_log.append({
            "intent": intent.dict(),
            "result": response
        })
        return response

# Example usage
agent = TransactionAgent()
llm_output = '{"action": "payment", "amount": 150.00, "currency": "USD", "counterparty_id": "HPY-9921", "purpose": "Monthly subscription renewal for Hyundai Card services"}'

intent = agent.parse_intent(llm_output)
if intent:
    result = agent.execute_transaction(intent)
    print(json.dumps(result, indent=2))

Mermaid Architecture Diagram

The following diagram illustrates the flow of data and control between the AI agent, the validation layer, and the financial backend.

sequenceDiagram
    participant User as User/Trigger
    participant Agent as AI Agent (LLM)
    participant Validator as Compliance Validator
    participant Executor as Financial API Gateway
    participant Ledger as Core Ledger System

    User->>Agent: Request Transaction (Natural Language)
    Agent->>Agent: Parse Intent & Extract Entities
    Agent->>Validator: Submit Structured Intent (JSON)
    
    alt Compliance Check Passed
        Validator->>Validator: Check AML/KYC Rules
        Validator->>Executor: Forward Validated Request
        Executor->>Ledger: Execute Atomic Transaction
        Ledger-->>Executor: Confirmation Receipt
        Executor-->>Validator: Success Status
        Validator-->>Agent: Execution Result
        Agent-->>User: Confirm Transaction Details
    else Compliance Check Failed
        Validator-->>Agent: Rejection Reason
        Agent-->>User: Notify Failure & Reason
    end

ShVaSa Intuition

The intuition behind this architecture is the decoupling of reasoning from action. LLMs are inherently probabilistic and prone to hallucination, making them unsuitable for direct execution of financial operations. However, they excel at unstructured data interpretation and natural language understanding. By constraining the LLM's output to a strict schema and inserting a deterministic validation layer, we create a system that leverages the flexibility of AI while maintaining the rigidity required by financial regulations.

Key technical considerations include:

  1. Latency Optimization: Financial transactions require sub-second response times. This necessitates the use of quantized models (e.g., Q4_K_M) and optimized inference engines like vLLM or TensorRT-LLM. The validation layer must be lightweight, ideally implemented in Rust or Go, to avoid becoming a bottleneck.
  2. Memory Bandwidth: Large context windows are needed for complex transaction histories. Efficient memory management, such as paged attention and KV-cache optimization, is critical to maintain throughput.
  3. Auditability: Every decision made by the agent must be logged with its rationale. This "chain of thought" logging is essential for regulatory compliance and post-mortem analysis. The system must ensure that the log is immutable and tamper-proof, potentially using blockchain or append-only databases.
  4. Fallback Mechanisms: The system must have robust fallbacks for edge cases where the LLM cannot determine the correct action. These should be routed to human operators or predefined rule-based handlers.

By adhering to these principles, we can build AI agents that are not only intelligent but also trustworthy and compliant, enabling the next generation of automated financial services.

<!-- Consensus Verified by Student (qwen3.6-35b-a3b) & Judge (gemma-4-31b-it) | VERIFICATION REPORT -->


Grounding & Source Attribution

Author Avatar

Sharath Japa, ShVaSa Lab Lead

Systems & AI Infrastructure Researcher, DGX Station homelab lead. Engineering RL environments, edge silicon inference, and local reasoning model distillation. Verified Profiles: Google Scholar • Google Patents • LinkedIn • GitHub (@sharathjapa) • Medium • r/shvasa.


Canonical Source: https://shvasa.us/posts/jpmorgan-is-working-on-ai-agent-transactions-that-dont-involve-humans

Advertisement

Related Research & Architectural Blueprints