AgentX-Phase2: 49-Model Byzantine FBA Consensus
Building Cool Agents that Modernize COBOL to Rust
Author: Venkateshwar Rao Nagala | Founder & CEO
Company: For the Cloud By the Cloud | Hyderabad, India
Submission: Solo.io MCP_HACK//26 — Building Cool Agents
GitHub: https://github.com/tenalirama2005/AgentX-Phase2
Demo Video: https://youtu.be/5_FJA_WUlXQ
Full Demo (4:44): https://youtu.be/k4Xzbp-M2fc
What Makes an Agent Cool?
Not the UI. Not the prompt engineering. Not the
number of tools registered.
An agent is cool when it solves a problem that has
defeated humans for decades — and solves it with
mathematical guarantees.
AgentX-Phase2 modernizes legacy COBOL mainframe
programs to memory-safe Rust using 49 AI models
running in parallel with Byzantine fault-tolerant
FBA consensus. The output is not accepted unless
39 of 49 models independently agree. That is not
probabilistic. That is mathematically guaranteed.
The Problem Worth Solving
The world runs on COBOL. Banks, insurance companies,
and governments run an estimated $3 trillion in
annual transactions on mainframe systems written
40-60 years ago. The average COBOL programmer is
58 years old. When they retire, institutions face
catastrophic failure of mission-critical systems.
Existing solutions translate COBOL to Java —
inheriting Java's memory vulnerabilities. They need
three vendors: AWS for infrastructure, MLogica for
HLASM Assembler, Precisely for complex VSAM data
migrations. Fragmented, expensive, no output quality
guarantees.
I maintained these systems myself — HomeComm/LifeComm
P&C and Life Insurance Policy Administration (80%
HLASM Assembler, 20% COBOL) at major US insurance
carriers, and core banking DDA systems at a major
North American bank. I know COBCYCTL — the IBM COBOL
compiler. I know ASMA90 — the IBM Assembler compiler
invoked in 31-bit addressing mode via JCL. Not theory.
Lived experience.
AgentX-Phase2 is the tool I wished existed when I
maintained those systems.
The Cool Agent Architecture
Hub-and-Spoke Multi-Agent Design
COBOL Source (AWS S3)
↓
interest_calc.cbl + loan_data.json
↓
AgentGateway (JWT + RBAC)
↓
┌─────────────────────────────┐
│ Green Agent (Orchestrator) │
│ Perceives → Plans → Acts │
└─────────────────────────────┘
↓
4 Specialized MCP Servers
├── s3_mcp (source retrieval)
├── cobol_mcp (legacy analysis)
├── rust_mcp (code generation)
└── ai_mcp (LLM coordination)
↓
┌─────────────────────────────────┐
│ Purple Agent (FBA Coordinator) │
│ 49 models → Byzantine consensus │
└─────────────────────────────────┘
↓
Validated Memory-Safe Rust Output
Green Agent — The Orchestrator
The green agent perceives the modernization task
by fetching COBOL source (interest_calc.cbl) and
input data (loan_data.json) from AWS S3 via s3_mcp.
It plans the workflow — routing requests through
AgentGateway to the correct MCP server sequence:
source retrieval → COBOL analysis → Rust generation
→ AI inference coordination.
Purple Agent — The FBA Coordinator
The purple agent is where the magic happens. It
coordinates 49 AI models running in parallel:
- Claude Opus 4.6 (Anthropic API) — primary reasoning model
- 48 Nebius-hosted LLM instances — parallel consensus voters
Each model independently analyzes the COBOL program
and produces a Rust translation. The purple agent
collects all 49 outputs and applies the FBA consensus
algorithm — accepting the result only when 39 or more
models agree.
Four Specialized MCP Servers
| MCP Server | Role | Tool |
|---|---|---|
| s3_mcp | Source retrieval | AWS S3 API |
| cobol_mcp | Legacy analysis | COBOL parser |
| rust_mcp | Code generation | Rust compiler |
| ai_mcp | LLM coordination | Anthropic + Nebius APIs |
The FBA Consensus Innovation
First Known Application to LLM Output Validation
Byzantine fault-tolerant consensus was originally
designed for blockchain distributed systems — ensuring
agreement even when some nodes are faulty or malicious.
AgentX-Phase2 applies this principle to AI output
validation for the first time (arxiv:2507.11768).
The insight: a single LLM can hallucinate. 49
independent LLMs hallucinating identically is
mathematically improbable. Byzantine consensus
makes this guarantee formal.
How Consensus Works
49 models vote independently
↓
Consensus threshold: 39 models (49-10)
↓
Each model must exceed 85% confidence independently
↓
Production result:
44 of 49 models above 85% confidence ✅
94% FBA consensus confidence ✅
1.0 semantic similarity ✅ (perfect agreement)
k* Formula — Mathematically Optimal Reasoning
k* = ⌈θ × √n × log(1/ε)⌉
This formula from arxiv:2507.11768 determines the
provably optimal number of reasoning steps per model
for a given error tolerance ε. Compute usage is
mathematically guaranteed efficient — not empirically
tuned. No wasted tokens, no arbitrary limits.
Research Trajectory — 24x Scale
| Stage | Models | Platform | Date |
|---|---|---|---|
| Chainlink oracle | 2 LLMs | Ethereum Sepolia | 2026 Q1 |
| AgentX-Phase2 | 49 models | Kubernetes | 2026 Q2 |
Same inventor. Same mathematical foundation. 24x scale.
Two-Pass Translation Pipeline
Pass 1 — COBOL Semantic Analysis
All 49 models independently analyze:
- Business logic and control flow
- Data structures (PIC clauses, level numbers)
- PERFORM and CALL patterns
- File handling and I/O operations
Pass 2 — Rust Code Generation
All 49 models independently produce:
- Memory-safe idiomatic Rust
- Equivalent business logic
- Type-safe data structures
- Error handling (Result types)
Consensus is computed after both passes complete
across all 49 models. Output accepted only when
39+ agree with 1.0 semantic similarity.
Production Deployment
./deploy.sh --status
Namespace: mainframe-modernization
Pods: 7/7 running — all 2/2 with Istio sidecars
AgentGateway: Active
MCP Servers: 4/4 ready
FBA Engine: Online — 49 models registered
./deploy.sh --run-pipeline
Fetching interest_calc.cbl from S3...
Fetching loan_data.json from S3...
Routing through AgentGateway...
Invoking 49 AI models in parallel...
Computing FBA consensus...
Results:
Models above 85% confidence: 44/49
FBA consensus confidence: 94%
Semantic similarity: 1.0
Status: CONSENSUS ACHIEVED ✅
./deploy.sh --sleep
# Cluster pauses — compute cost drops to zero
./deploy.sh --wake
# Cluster resumes — all pods restored, ready
Production lifecycle management — sleep and wake
show enterprise cost control. Not just a demo that
runs once.
Why Memory-Safe Rust — Not Java
Every existing mainframe modernization tool
translates COBOL to Java. AgentX-Phase2 translates
to Rust — and the difference matters:
| Aspect | Java output | Rust output |
|---|---|---|
| Memory safety | Garbage collected | Compile-time guaranteed |
| Memory vulnerabilities | Possible | Eliminated |
| Performance | JVM overhead | Native speed |
| Financial sector compliance | Acceptable | Superior |
For banking and insurance systems handling $3 trillion
in annual transactions, memory safety is not a nice
to have — it is a compliance requirement.
Demo Video
1:57 minutes — AWS S3 source files → cluster status
→ 49-model FBA pipeline → sleep/wake lifecycle → GitHub
Production Results Summary
| Metric | Result |
|---|---|
| Total AI models | 49 (48 Nebius + 1 Claude Opus 4.6) |
| Models above 85% confidence | 44 of 49 |
| FBA consensus confidence | 94% |
| Semantic similarity | 1.0 (perfect agreement) |
| Consensus threshold | 39 models (49-10) |
| Security tests | 4/4 passing |
| Kubernetes pods | 7/7 running |
| Istio sidecars | 2/2 on every pod |
Current MVP and Roadmap
Today: Standard COBOL programs via GNU COBOL
compiler. 49-model FBA consensus. 94% confidence.
1.0 similarity. Full zero-trust security.
Next: IBM z/OS compiler access unlocks:
- IBM Enterprise COBOL (COBCYCTL) — packed decimals
- IBM High Level Assembler (ASMA90) — HLASM programs
- IBM PL/I — PL/I programs
Future: VSAM data conversion (Precisely
partnership), 100+ model FBA scaling, multi-tenant
SaaS, enterprise SLA guarantees.
Founder Background
Venkateshwar Rao Nagala — 30+ years production
systems experience:
- GATE 1994 AIR 444 — top 0.4% of India's engineers
- HLASM expert — HomeComm/LifeComm (80% Assembler, 20% COBOL) at major US insurance carriers
- Core banking DDA — major North American bank
- CMU curriculum AI/ML — HAR 96% accuracy, Authorship ID 100% across 12 authors (2013)
- AIG Fortune 500 — Manager Big Data Analytics
- Chainlink FBA oracle — 2 LLM models, Ethereum Sepolia (2026 Q1)
- Solo.io Velocity Award 2026
- Cilium / Isovalent Certified
- AgentBeats Sprint 1 — submitted March 22, 2026
The only person building an AI mainframe modernization
tool who has personally written and maintained the
exact systems being modernized.
Also See
- S&G Blog: https://dev.to/venkat_nagala/agentx-phase2-zero-trust-security-for-mcp-servers-rust-middleware-jwt-istio-3en1
- Full Demo (4:44): https://youtu.be/k4Xzbp-M2fc
- S&G Demo (1:59): https://youtu.be/F7xWzoQ3e3M
Links
- GitHub: https://github.com/tenalirama2005/AgentX-Phase2
- Demo Video (1:57): https://youtu.be/5_FJA_WUlXQ
- AgentBeats: https://agentbeats.dev/tenalirama2005/purple_agent
- LinkedIn: https://www.linkedin.com/in/tenalirama
- Solo.io Hackathon: https://aihackathon.dev
The coolest agents solve real problems with
mathematical guarantees.
Built solo, bootstrapped, from Hyderabad India.
Vandemataram 🙏
kubernetes, agents, mcp, rust, ai

Top comments (0)