A practical pattern for preserving trusted business logic, while transforming the digital experience. This article uses a real-world enterprise modernization initiative as the reference implementation.
By Alok Mehta
Every enterprise architect eventually inherits a system that is too important to ignore and too risky to replace. It may be an actuarial calculator, a policy administration platform, a pricing engine, a claims rules service, or a mainframe application. The technology may look dated, but the business logic has been refined, audited, and trusted over many years.
Traditional modernization programs often begin by asking whether the system should be rewritten. Agentic AI introduces a safer alternative: preserve the trusted core and modernize the experience, controls, and integration layers around it.
The AI does not replace the actuarial engine. It helps people use it safely, naturally, and efficiently.
The Real Example
The the application helps a retiree evaluate one of the most consequential financial decisions they may face: whether to accept a one-time lump sum or a guaranteed monthly pension. The existing solution collected 33 inputs through a public Google Form, stored information in a spreadsheet, invoked an Apps Script, and passed the data to a legacy actuarial analyzer.
The analyzer itself was not the problem. It contained the trusted formulas and produced the required result. The weakness was everything surrounding it: the user experience, validation, security, persistence, guidance, accessibility, and operational visibility.
The modernization therefore established a hard architectural constraint: the existing analyzer would remain unchanged, and the new application would send the same structured request expected by the legacy process. Parity testing confirmed that the modern implementation preserved the calculation behavior.

Figure 1. The modern experience and agentic control layer surround the unchanged actuarial core.
The Architectural Pattern: Wrap, Do Not Rewrite
The pattern separates the platform into three zones. The first is the modern experience layer, where users interact through web, mobile, voice, guided questions, or document upload. The second is a control layer that orchestrates agents, validates data, applies policies, and records an audit trail. The third is the deterministic business core, where the existing calculation engine continues to operate.
This division is important because generative AI is probabilistic. It is very good at interpreting language, asking follow-up questions, summarizing complex results, and helping users navigate a process. It should not independently perform an audited actuarial calculation or silently change a business rule.
How the Agents Work
A common mistake is to create one large agent with broad access and vague responsibilities. A safer enterprise pattern uses specialized agents with narrow roles and typed handoffs.
- Conversation agent: Collects the user’s intent and information in plain language.
- Validation agent: Checks whether required data is complete, correctly formatted, and plausible.
- Mapping agent: Transforms the conversation into the exact structured contract expected by the analyzer.
- Integration agent: Invokes the trusted service and manages retries, timeouts, and error handling.
- Explanation agent: Translates the authoritative result into language a retiree can understand.
An orchestrator maintains workflow state, routes work to the appropriate agent, enforces policy, and sends exceptions to a human reviewer. The agents do not freely improvise across the architecture. Each one operates within a defined contract.

Figure 2. Specialized agents perform narrow tasks while the orchestrator governs state, policy, and exceptions.
The Most Important Design Decision: The Trust Boundary
The architecture distinguishes between probabilistic assistance and deterministic decisioning. Conversation, field extraction, summarization, and guidance may use AI. The actuarial formulas, business rules, and final calculation remain in the trusted core.
Between these zones sits a verification layer. It validates the schema, checks ranges and cross-field relationships, applies identity and access controls, filters prompts and outputs, and records telemetry. Regression tests continuously compare requests and results with a golden set of known cases.

Figure 3. AI may assist and explain, but only the deterministic core produces the authoritative result.
Architecture Principles for Enterprise Use
Freeze the invariant core. Identify the formulas, rules, APIs, and data contracts that must not change.
Use explicit contracts. Require structured schemas between agents and systems. Do not rely on free-form text at integration boundaries.
Test for parity. Use representative golden cases to prove that modernization has not changed business outcomes.
Keep AI outside the decision boundary. Allow AI to collect, organize, and explain. Keep regulated calculations and approvals deterministic.
Design for human exceptions. Route ambiguity, low confidence, and policy conflicts to a person rather than forcing autonomous completion.
Make observability part of the architecture. Capture agent actions, inputs, outputs, latency, failures, token usage, and human overrides.
Secure the seams. Protect service calls, secrets, stored data, and tenant boundaries even when the legacy endpoint cannot be immediately redesigned.
Wrap, don’t rewrite is not a universal rule. When the core business logic remains accurate, maintainable, and differentiating, preserving it often provides the lowest-risk modernization path. However, replacing the legacy engine may be the better architectural decision when the underlying platform has become technically obsolete, economically unsustainable, or unable to support evolving regulatory or business requirements. The architect’s responsibility is to determine which capabilities should be preserved and which should be re-engineered.
Why This Pattern Matters
This approach changes the economics and risk profile of modernization. The organization avoids rebuilding decades of business logic while still delivering a contemporary experience. The work is concentrated in areas that can change safely: interaction design, workflow, validation, orchestration, security, and cloud operations.
The same pattern applies to insurance claims, underwriting, policy servicing, banking, healthcare eligibility, tax systems, ERP workflows, and mainframe applications. Wherever a trusted engine already produces the right answer, Agentic AI can create a more natural and intelligent path to that answer.
What Architects Should Take Away
Agentic AI should not be treated as a reason to rewrite every legacy platform. Its more immediate value may be as an architectural wrapper around systems that already encode valuable institutional knowledge.
The central question is not, ‘How can AI replace the legacy system?’ It is, ‘Where can AI improve the experience without weakening the controls that make the system trustworthy?’
Preserve what must remain correct. Modernize what users experience. Govern everything in between.
About the Reference Implementation
The architectural patterns described in this paper were derived from a real enterprise modernization initiative involving the transformation of a legacy analytical platform using Agentic AI. The implementation validates the concepts presented, while the patterns themselves are intentionally technology- and domain-agnostic.
Architecture Reference Diagrams
Figure 1. Enterprise Reference Architecture
Illustrates the separation of the experience layer, agentic orchestration, governance and trust services, and the deterministic business core.
Figure 2. Agentic Processing Pipeline
Shows specialized agents operating through governed orchestration with explicit handoffs.
Figure 3. Trust Boundary
Highlights the architectural separation between probabilistic AI capabilities and deterministic business processing.
Alok Mehta is a global technology executive with more than 35 years of experience leading business and technology transformation across the insurance and financial services industries. He has served in CIO, CTO, CISO, and Chief Data Officer leadership roles, helping organizations modernize legacy platforms, migrate to the cloud, strengthen cybersecurity, build data and AI capabilities, and deliver large-scale digital transformation programs. His expertise spans enterprise architecture, Agentic AI, cloud modernization, insurance technology, and strategic IT leadership.
