EmerSoftwareSoftware Factory
Software factory11 min read

How AI Agents Accelerate Legacy System Modernization

AI agents speed legacy modernization by mapping dependencies, drafting API facades, and generating regression tests — without a big-bang rewrite. A practical strangler-fig path with AgentsAI.

Retrato profissional de Emerson Amorim, fundador da EmerSoftware

By Emerson Amorim · Founder and Principal Software Engineer

#legacysystemmodernization#AIagentsmodernization#stranglerfig#AgentsAI#APIfacade

Legacy systems hold revenue and liability. Modernization that starts with “we will rewrite it in the new stack” usually stalls in discovery: undocumented jobs, secret batch windows, and interfaces that only one person understands. AI agents help where that discovery is text, traces, and catalogs — not by hallucinating a new core.

Where agents pay for themselves

  • Inventory: parse interface control documents, JCL, and API gateways into a system map.
  • Contract draft: propose OpenAPI or event schemas around the strangler boundary.
  • Characterization tests: generate tests from observed request/response pairs (with masking).
  • Change notes: explain a 2,000-line batch in language a product owner can accept or reject.

Strangler fig with an agent loop

  1. 01Legacystill serves traffic
  2. 02FacadeAPI / events
  3. 03AgentsAImap, draft, test
  4. 04New sliceone capability
  5. 05Cutoverparity metrics
New capabilities are born beside the legacy. Agents propose facades and tests; humans approve the cutover of each capability.

Technical example: a read facade, not a rewrite

A first FactoryRun on a core system should almost always be read-oriented: expose a customer or order capability behind a versioned API, compare responses to the host, and only then route a channel. The agent’s job is to draft the contract and the characterization tests. The engineer’s job is to refuse invented fields.

ts
type Characterization = {
  capability: "getOrder";
  hostExample: unknown;      // masked production trace
  facadeExample: unknown;    // new API
};

function parity(c: Characterization) {
  // Compare business keys, not JSON whitespace.
  const keys = ["orderId", "status", "amount"];
  return keys.every(
    (k) =>
      (c.hostExample as Record<string, unknown>)[k] ===
      (c.facadeExample as Record<string, unknown>)[k],
  );
}
Demonstration: compare host vs facade. Production cutover is a separate, human-gated change.

This is the same industrial method as our legacy modernization practice: APIs, strangler fig, and a factory cadence instead of a two-year program with a big-bang weekend.

Ready to accelerate your enterprise software?

Talk with EmerSoft about the software factory, AgentsAI, and SAP, AWS, and Azure integrations — with accelerated delivery at enterprise standard.

LinkedIn · Emerson Amorim

Legacy modernization with AI agents is discovery and tests — not a rewrite fairy tale.

Every board wants the mainframe gone. Every operations lead knows a big-bang rewrite is how you lose a weekend and a market. Where agents actually accelerate: 1. Dependency maps from traces, batch jobs, and interface catalogs. 2. Draft OpenAPI facades around the capabilities you must keep. 3. Contract and regression tests so the strangler fig does not lie. 4. Documentation of rules that only exist in COBOL comments and tribal Slack. They do not get a free pass to post to production core banking. I wrote the path we use — diagram + a facade sketch: https://www.emersoftware.com.br/en/blog/how-ai-agents-accelerate-legacy-system-modernization Factory page: https://www.emersoftware.com.br/en/legacy-system-modernization — Emerson Amorim, EmerSoftware

Software factory

What Is an AI-Native Software Factory?

An AI-native software factory industrializes software delivery with governed agents, standards, and an audit trail — from intent to production, not from prompt to hope.

11 min readRead article
WhatsApp (15) 99143-7215How AI Agents Accelerate Legacy System Modernization | EmerSoftware