When customers apply for or manage a credit card, generic batch offers no longer cut it. A customer planning international travel needs dynamic zero-forex balance transfers or tailored travel rewards—not a generic lifestyle promotion.
However, in modern retail banking, delivering real-time, context-aware offers presents a tough engineering balance: How do you leverage LLM-driven intelligence to evaluate complex customer intent without handing critical financial decisioning entirely over to an unpredictable black box?
During my recent work leading a Consumer Lending engineering team, we tackled this exact problem by building an AWS Agentic AI Architecture using Amazon Bedrock AgentCore, OpenAI GPT-4o, and Model Context Protocol (MCP), structured cleanly around a Harness Engineering Bounded Context to ensure enterprise-grade modularity.
Here is how we designed and deployed a governed, high-throughput offer recommendation engine on AWS.
The Problem: Beyond Static Rules Engines
Traditional credit card decisioning relies on static rules engines and scheduled ETL batch jobs. While deterministic, this approach fails in two key areas:
- Context Blindness: It struggles to combine real-time customer intent (e.g., balance transfer queries, travel intent) with deep account transaction history instantly.
- Brittle Integration: Hardcoded API integrations between decision engines, card platforms, and notification systems are rigid and expensive to maintain.
To solve this, we drew a strict architectural boundary around our engineering domains so that agentic reasoning stays decoupled from core deterministic ledger operations.
Domain Design: The Harness Engineering Bounded Context
In complex enterprise banking, coupling an experimental AI runtime directly to core ledger or credit rating systems is a non-starter. Using Domain-Driven Design (DDD) principles, we established a dedicated Harness Engineering Bounded Context:
- Purpose: Acts as the controlled abstraction layer between high-velocity generative AI tooling (Bedrock, AgentCore, MCP) and core transactional banking microservices.
- Bounded Responsibilities: Encapsulates agent orchestration, session state management (Amazon DynamoDB), prompt evaluation guardrails, and event publication (Amazon MSK).
- Anti-Corruption Layer (ACL): Protects core downstream systems (like billing, core ledger, and card issuance) from volatility in LLM outputs, ensuring that all agent-recommendations are strictly validated against deterministic Java business rules before money moves or limits update.
The Architecture: Supervisor & Sub-Agent Pattern
Within this bounded context, we implemented a Supervisor/Sub-Agent Architecture using Amazon Bedrock AgentCore:
Applicant / Event Trigger
│
▼
Amazon API Gateway (Cognito Auth, Rate Limiting, WAF)
│
▼
AgentCore Runtime (Supervisor Agent: Orchestrator)
│
├──► Intent & Context Sub-Agent (MCP Tool) ──► Bedrock / GPT-4o
├──► Eligibility & Risk Sub-Agent (MCP Tool) ──► Java / Spring Boot Microservices (Harness Bounded Context)
└──► Offer Recommendation Sub-Agent (MCP) ──► Personalization Engine
│
▼
Amazon MSK (Kafka) ──► Real-Time Event Pipeline (Downstream Consumers)
- Supervisor Agent: Acts as the primary orchestrator within the harness layer. It holds state across the session in Amazon DynamoDB, plans tool execution, and manages execution safety.
- Context & Intent Sub-Agent: Analyzes incoming customer signals using OpenAI GPT-4o via standardized MCP (Model Context Protocol) tools.
- Eligibility & Risk Sub-Agent: Interrogates deterministic enterprise Java microservices inside the boundary to verify credit policy, limits, risk band, and compliance guardrails.
- Offer Recommendation Sub-Agent: Matches approved risk profiles with dynamic catalog offers—such as targeted travel perks for travel cards, or hotel/dining multipliers for lifestyle cards.
The Tech Stack
- Core Services & Frameworks: Java 17, Spring Boot, Spring Cloud, Spring Data JPA
- AI & Agentic Framework: Amazon Bedrock AgentCore, Model Context Protocol (MCP), OpenAI GPT-4o
- Messaging & Storage: Apache Kafka / Amazon MSK, Amazon DynamoDB, Amazon Aurora
- Infrastructure & Compute: AWS (ECS Fargate, Lambda), Terraform, Docker, Kubernetes
- Observability & Guardrails: Amazon Bedrock Guardrails, Prometheus, Grafana, AWS CloudWatch / CloudTrail
End-to-End Execution Flow
- Ingestion & Guardrails: Requests hit Amazon API Gateway (secured via Cognito and WAF). Incoming prompts pass through Amazon Bedrock Guardrails for immediate PII masking, policy enforcement, and content filtering.
- Agentic Reasoning & MCP Tool Execution: The Supervisor Agent inside AgentCore Runtime evaluates customer state. It invokes sub-agent tools hosted as standardized MCP tool interfaces defined within our harness boundary. For instance, calling the
get_credit_eligibilityMCP tool triggers a resilient, containerized Spring Boot microservice running on AWS ECS Fargate. - Deterministic Rules Enforcement: The LLM proposes contextual offer parameters, but a deterministic Java decision engine enforces final boundaries (e.g., maximum credit limit, interest rate floors, balance transfer ceilings). The AI proposes; the deterministic service disposes.
- Event-Driven Decoupling via Amazon MSK: Once an offer is synthesized and verified, the platform emits an event to Amazon MSK:
OFFER_GENERATED ──► OFFER_ACCEPTED ──► CARD_PROVISIONED
Downstream systems—such as real-time push notifications, audit logging (CloudTrail), and analytics platforms—consume these events asynchronously through clean event contracts without tying up the primary API path.
Key Architectural Learnings
- Isolate via Bounded Contexts: Treating the AI runtime as an isolated harness engineering bounded context prevents prompt engineering logic from bleeding into core accounting and transaction engines.
- Separation of Reasoning vs. Business Logic: Keep business rule enforcement in deterministic microservices (Java 17 / Spring Boot). Use LLMs purely for intent understanding, unstructured context aggregation, and recommendation synthesis.
- Human-in-the-Loop for Borderline Decisioning: If confidence scores drop below a strict threshold or a customer profile flags ambiguous risk metrics, the supervisor agent seamlessly routes the workflow to a human underwriter via AWS Step Functions.
- Observability is Vital: SRE-grade metrics using Prometheus & Grafana paired with CloudWatch tracing allowed us to monitor agent execution latencies, tool call success rates, and token overheads across microservices.
Summary
Agentic AI in banking isn't about replacing core platforms—it's about wrapping intelligent, context-aware orchestration around existing, robust microservice infrastructure. By combining a clear Harness Engineering Bounded Context, Bedrock AgentCore, MCP, Java 17 microservices, and Kafka event streams, banking platforms can deliver personal, real-time value to customers while maintaining 100% regulatory compliance and operational safety.
#AWS #AgenticAI #AmazonBedrock #AgentCore #MCP #Java17 #SpringBoot #Kafka #Microservices #FinTech #CloudArchitecture #GenerativeAI #DomainDrivenDesign
```