Mainframe COBOL Reconciliation Agent Swarm
Reviewed by Umar Abbas • CTO & Principal AI Architect
This internal engineering audit details the state machine graph architecture, IBM CICS middleware integration, and post-mortem state recovery fix for a banking mainframe reconciliation agent swarm. Engineered with LangGraph and Model Context Protocol servers, the system achieved 99.94% deterministic state recovery across 1.4 million synthetic bank transactions.
System Context & Operational Goals
Note: This case study documents an internal reference build engineered by SoftBrix / Esaholic. Commercial banking core ledgers run on legacy IBM CICS COBOL mainframes, requiring manual batch reconciliation that delays end-of-day settlement cycles.
The Legacy Mainframe Interface Gap
Connecting modern AI agents to EBCDIC-encoded COBOL mainframe data streams causes high error rates without strict schema validation and state machine checkpointers.
- Reconciliation Batch Window: 8 hours nightly.
- Unmatched Exception Rate: 4.8% requiring manual research.
LangGraph Multi-Agent Swarm with MCP CICS Bridge
What Went Wrong and How We Fixed It
During initial synthetic testing across complex multi-account transfers, sub-agents entered infinite critique loops, triggering LangGraph’s default 25-step recursion limit and crashing the state thread.
We injected state iteration counters into graph metadata, forcing automatic escalation to a Human-in-the-Loop (HITL) interrupt node after 3 failed reconciliation cycles. Thread recovery reached 99.94%.
Quantified Benchmarks
| Metric | Baseline (Legacy) | Internal AI System | Improvement Factor |
|---|---|---|---|
| Reconciliation Batch Latency | 8.0 hours | 12.4 minutes | 38.7x Speed Increase |
| Deterministic State Recovery | Manual rollback | 99.94% (PostgresSaver) | Automated Fault Tolerance |
| CICS Middleware Latency | 120ms (REST wrapper) | 42ms (MCP CICS) | 2.8x Latency Reduction |
Stack & Service Architecture
Audit Verification Sign-Off
Audited By: Umar Abbas (CTO & Principal AI Architect, SoftBrix / Esaholic)
Evaluation Dataset: 1.4M synthetic banking transaction records
Status: Verified Reference Implementation
Frequently Asked Questions
Is this banking case study based on a live bank or an internal build?↓
This case study documents an internal reference build engineered by SoftBrix / Esaholic to prove mainframe COBOL integration with modern agent state machines.
How did the system execute transactions safely on legacy mainframe systems?↓
The agent framework uses Model Context Protocol (MCP) servers enforcing parameter schema validation, coupled with LangGraph Human-in-the-Loop interrupt nodes before wire transfers.
What caused the initial recursion limit crash during multi-agent loops?↓
Cyclic routing between sub-agents caused default LangGraph recursion limits (25 steps) to trigger, resolved by implementing explicit state counters and early-exit fallback nodes.