An enterprise-grade autonomous multi-agent framework that deconstructs monolithic COBOL and legacy Java (J2EE/EJB) routines into standardized Intermediate Representations (IR), transpiling into idiomatic Python 3.12 and modern TypeScript with certified 100% semantic equivalence and zero floating-point rounding drift.
- Live Portfolio & Project Hub: https://asadullahshafique-devunity.vercel.app
- Local Interactive Migration Studio: http://127.0.0.1:8017/
- Swagger OpenAPI Documentation: http://127.0.0.1:8017/docs
- GitHub Source Repository: https://github.com/asadullah48/legacyx
LegacyX employs a loop-driven 4-agent modernization topology that eliminates hallucination, guarantees exact fixed-point financial arithmetic, and outputs production-grade microservice artifacts:
graph TD
LegacyCode["Legacy Enterprise Code<br/>(Monolithic COBOL / Java 6/7/8 EJB)"] --> Agent1
subgraph LegacyX Autonomous Modernization Pipeline
Agent1["1. ParserAgent<br/>β’ Division & Record AST Extraction<br/>β’ PIC Clause & Scope Normalization"]
Agent1 --> AST_IR["Language-Agnostic IR<br/>(Intermediate Representation)"]
AST_IR --> Agent2["2. TranslatorAgent<br/>β’ Python 3.12 (Pydantic v2 / Decimal)<br/>β’ TypeScript (ES2024 / Zod / Async)<br/>β’ Automated Pytest / Vitest Generation"]
Agent2 --> ModernArtifact["Modern Target Code & Test Suite"]
ModernArtifact --> Agent3["3. VerifierAgent<br/>β’ 10-Case Boundary Equivalence Matrix<br/>β’ Zero Floating-Point Rounding Audit<br/>β’ Cyclomatic Complexity Reduction Delta"]
Agent3 --> Agent4["4. ArchitectAgent<br/>β’ Cloud-Native Microservice Blueprint<br/>β’ MIPS OPEX Reduction (-85% to -94%)<br/>β’ 4-Phase Shadow-Run Migration Roadmap"]
end
Agent4 --> CloudTarget["Cloud Target Artifacts<br/>(Docker / Kubernetes / Serverless)"]
-
Autonomous 4-Agent Topology:
ParserAgent: Deconstructs monolithic COBOL divisions (IDENTIFICATION,DATA,WORKING-STORAGE,PROCEDURE) and legacy Java EJB 2.x session beans into structured Intermediate Representations (IR).TranslatorAgent: Synthesizes idiomatic Python 3.12 (Pydantic v2 schemas,DecimalBankers Rounding, async handlers) and modern TypeScript (ES2024, strict Zod schemas), and auto-generates unit tests.VerifierAgent: Executes 10-case boundary test assertions across zero, fractional, and boundary scales, verifying zero floating-point rounding drift.ArchitectAgent: Formulates cloud-native microservice blueprints, estimating MIPS reduction (-85%+) and ROI ($145k+/yr).
-
Dual-Engine Modernization (Ollama & APILayer Ready):
- Free-Tier Local LLM Support: Seamlessly integrates with local Ollama (
http://localhost:11434, e.g.,codellama,llama3,mistral,qwen2.5-coder). - Cloud Gateway Support: Configurable with APILayer APIs (https://app.apilayer.com/dashboard) or OpenAI-compatible endpoints.
- Built-in Deterministic AST Transpiler: Zero-configuration intelligent compiler that runs instantly out of the box with zero external dependencies or API keys.
- Free-Tier Local LLM Support: Seamlessly integrates with local Ollama (
-
Exact Fixed-Point Arithmetic (Bankers Rounding):
- Replaces IEEE-754 floating-point inaccuracies with exact
Decimalprecision andROUND_HALF_EVENquantization, matching COBOLPIC 9(7)V99financial settlement.
- Replaces IEEE-754 floating-point inaccuracies with exact
-
Modern Cyber-Glassmorphic Studio UI:
- Split-screen Monaco-style workspace with character counters and local file upload (
.cbl,.cob,.java,.txt). - 5 Synchronized Target Tabs: Modern Code, Unit Test Suite, AST & Symbol IR, Zero-Drift Math Audit, and Cloud Blueprint.
- Full bilingual support with instant English and Arabic RTL (
dir="rtl") localization using Google Cairo font.
- Split-screen Monaco-style workspace with character counters and local file upload (
| Dimension | Legacy Baseline | Modernized Target | Quality Standard |
|---|---|---|---|
| COBOL Divisions | Monolithic divisions & GOTO spaghetti | Structured async functions with type guards | 100% Pydantic v2 / Zod |
| Java EJB 2.x | Stateful/Stateless Session Beans | Async REST / Event-driven microservices | Cloud Native 12-Factor |
| Arithmetic | COBOL COMPUTE & PIC 9(n)V99 |
Python Decimal / TS BigNumber |
ROUND_HALF_EVEN Zero Drift |
| Testing | Manual mainframe batch runs | Auto-generated Pytest / Vitest suites | 10 Boundary Cases Passed |
| Infra & MIPS | Expensive on-premise mainframe MIPS | Auto-scaling OCI containers / Serverless | 85.0% - 94.0% OPEX savings |
The framework ships with 6 production-grade modernization scenarios:
- π¦ Banking: Daily Commercial Interest & Overnight Accrual Settlement (
COBOL->Python 3.12) - π³ Payments: Credit Card Interchange Scheme & Multi-Currency Ledger (
COBOL->TypeScript) βοΈ Aviation: Passenger Seat Tariff Allocation & Cabin Baggage Surcharges (COBOL->Python 3.12)- π Insurance: Healthcare Claim Assessment & Policyholder Deductible Bean (
Legacy Java->Python 3.12) - π₯ Clinical: Hospital Patient Outpatient Billing & Copay Settlement (
Legacy Java->TypeScript) - πΌ Payroll: Progressive Statutory Tax Bracket & Withholding Engine (
COBOL->Python 3.12)
- Python 3.10+
- (Optional) Ollama for local LLM generation:
ollama run codellama
# Clone the repository
git clone https://github.com/asadullah48/legacyx.git
cd legacyx
# Install package and dependencies
pip install -e .pytest -vpython -m uvicorn legacyx.server:app --host 127.0.0.1 --port 8017 --reload- Studio Dashboard: http://127.0.0.1:8017/
- Swagger OpenAPI: http://127.0.0.1:8017/docs
# Build container image
docker build -t legacyx-gateway:1.2.0 .
# Run container
docker run -d -p 8017:8017 --name legacyx-gateway legacyx-gateway:1.2.0docker-compose up -dhelm install legacyx-gateway ./helm| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Serves the Interactive Cyber-Glassmorphic Modernization Studio |
GET |
/healthz |
Health check reporting agent status |
GET |
/readyz |
Readiness check reporting supported paradigms |
POST |
/api/v1/migration/transpile-code |
Executes the complete 4-agent modernization pipeline |
GET |
/api/v1/migration/scenarios |
Returns the curated library of 6 enterprise modernization scenarios |
GET |
/api/v1/llm/status |
Reports Ollama daemon connectivity and available local models |
POST |
/api/v1/llm/test |
Pings user-configured Ollama or APILayer endpoint |
POST |
/api/v1/migration/export-report |
Generates a downloadable Markdown audit dossier |
- Autonomy β the 4-agent chain (
ParserAgentβTranslatorAgentβVerifierAgentβArchitectAgent) runs end-to-end from raw COBOL/Java source to a verified modern artifact and a cloud blueprint, with no human step required between parse and verify. - Resilience β
VerifierAgent's 10-case boundary equivalence matrix and zero-floating-point-rounding audit exist specifically so a translation that looks plausible but drifts numerically gets caught before it ships β the pipeline verifies its own output rather than trusting the LLM step. - Adaptivity β the dual-engine design (deterministic AST transpiler by
default, Ollama or an APILayer/OpenAI-compatible endpoint optional) lets
TranslatorAgentscale from zero-dependency offline use up to a stronger LLM backend without changing the pipeline shape.
- Expose each of the 4 agents as an MCP tool so
ArchitectAgent's cloud blueprint can be handed directly to a deployment agent instead of a human reading the Markdown export. - Extend the curated scenario library beyond the current 6 enterprise domains using the same IR, so new legacy dialects plug into the existing ParserβTranslatorβVerifier chain rather than needing a new pipeline.
- Feed
VerifierAgent's boundary-case failures back intoTranslatorAgentas a retry signal β today verification is terminal reporting; a closed adaptive loop would let the pipeline self-correct on a failed case.
Built by Asadullah Shafique β portfolio Β· GitHub
- DevUnity Portfolio: https://asadullahshafique-devunity.vercel.app
- SynthData: https://github.com/asadullah48/synthdata
- AccessAI: https://github.com/asadullah48/accessai
- CollabX: https://github.com/asadullah48/collabx
- DocuCode: https://github.com/asadullah48/docucode
- PrivateBrain: https://github.com/asadullah48/privatebrain
- ResearchX: https://github.com/asadullah48/researchx
- GraphAI: https://github.com/asadullah48/graphai
- LoopAI: https://github.com/asadullah48/loopai
- HarnessAI: https://github.com/asadullah48/harnessai
- SecureBridge: https://github.com/asadullah48/securebridge
- WorkforceAI Academy: https://github.com/asadullah48/workforceai-academy
- ConciergeAgent: https://github.com/asadullah48/conciergeagent
- ContextX: https://github.com/asadullah48/contextx
- GuardrailAI: https://github.com/asadullah48/guardrailai
- MarketAgentHub: https://github.com/asadullah48/marketagenthub
- WorkforceAI: https://github.com/asadullah48/workforceai
- DomainX: https://github.com/asadullah48/domainx