Analysis

The Method That Never Touches the Old System

A short reading of a long article about attaching AI agents to monoliths fifteen and twenty years old. We do not walk through its case studies in order; we pull a single thread. Every device here exists so that nothing has to be written into the old database. Notice that once, and the whole architecture reads as one long detour.

Why the detour costs less than the honest road

The article names what the corporate world actually runs on without softening it: SAP ERP, Oracle databases, ageing Microsoft Dynamics, in-house work on Java EE, COBOL mainframes. All of it designed fifteen to twenty years ago, holding petabytes, processing billions of transactions, and offering neither REST nor GraphQL.

Then come the two numbers people choose between. A full migration of a monolith onto microservices runs three to five years and tens of millions of dollars with a high risk of failure; swapping an old ERP for something like SAP S/4HANA costs a company two to ten million and stops whole departments for years. The alternative on offer is claimed to be dramatically cheaper and measured in months rather than years.

The gateway works as translator and doorman at once

The first thing it does is translate. Old systems speak SOAP, XML-RPC, or flat files over FTP; the agent thinks in JSON and calls functions. The gateway takes the JSON, unfolds it into a bulky SOAP request, parses the XML that comes back, and hands the agent a tidy structure. The agent never learns that 2005 was on the other end of the wire.

The second thing it does is hold the pace down. A thousand simultaneous questions about order status would become a thousand synchronous calls, and the database would fall over. So a broker sits between agent and monolith — RabbitMQ, Apache Kafka, Redis Streams — and the gateway feeds the queue through at whatever rate the system can bear, ten requests per second in the worked example. Meanwhile the user watches a line about analysis.

The third thing is not asking at all. Reference data, catalogues, prices, branch lists are cached aggressively in Redis and refreshed asynchronously. The relief on the primary database is given as up to 90 per cent, and beside it stands a note worth keeping: that is the authors' estimate for typical scenarios, not a measurement.

Write access is issued by the drop

The agent never gets direct SQL. It receives a tightly bounded set of functions — asking a client's status, opening a support ticket — and the gateway validates the parameters hard. An injection smuggled inside an identifier, which a prompt-injection attack could in theory achieve, is rejected before the request touches the internal network.

The service account follows least privilege: read-only across most tables. Write rights are granted surgically and only where little is at stake, logs and tickets, and only through stored procedures. Every byte of the exchange lands in immutable storage, either a blockchain or WORM drives, so that the agent's chain of reasoning can be reconstructed second by second.

Even generated SQL runs somewhere else

A separate misery is a schema where a table is called T_DOC_435 and carries a hundred and fifty undocumented columns. For those, a semantic metadata layer is built: a description of the structure in plain language a model can follow. A text-to-SQL agent composes its query against that description, the gateway checks it for deleting and updating commands, and the query runs against a replica rather than the original.

What sits behind “fifteen seconds”

The logistics example is worked out in detail. A firm with a fleet of five hundred trucks lives on a heavily customised old ERP and dozens of enormous spreadsheets. A free-form request — twenty pallets of brick, one city to another, tomorrow morning, a truck with a tail lift — is parsed into entities; through the gateway the agent asks for available vehicles within fifty kilometres, gets three, weighs ratings and driver clearances, messages the driver, and on his agreement issues the command for a waybill.

The comparison offered is three dispatchers and forty minutes against fifteen seconds, round the clock, with the business accelerating tenfold and the core ERP unchanged. Worth noticing what the article does not say outright: in that whole chain exactly one thing is written into the old system, the waybill. The reading, the conversation and the decision have all been moved outside.

The banking example has the same shape, formalised as the CQRS pattern. Balances and history replicate asynchronously into fast in-memory storage such as Redis or Apache Ignite, and a question about the month's coffee spending is answered from cache in a hundred milliseconds. A transfer of $150 to a spouse goes another way entirely: intent validation, a two-factor code, a Kafka queue, and an adapter that inserts the operation into the core as though it were a classic transfer.

The archive starts answering

Correspondence and repair histories are extracted from the old databases overnight, cleaned, cut into chunks, run through embedding models and loaded into vector stores; Pinecone, Qdrant and Milvus are named. Daytime load is never touched.

What convinces is not the technique but the sample answer. Asked why machine B-450 overheats on startup when pressure reads normal, a keyword search for overheating returns nothing: the 2018 ticket says the engine runs hot on boot. Meaning finds it anyway, and the reply carries the technician's name, the fix, and the pressure-valve filter part number, 33-B.

Failure as normal operation

Old things fall over, and that is written into the behaviour. On a timeout the agent waits two seconds, then four, then eight. If the system stays down it shows no error but answers from the last known cache: fifteen minutes ago there were twelve units in stock, a preorder is placed, the reservation will be confirmed once things recover. In parallel a background agent assembles a bug report with logs and sends it to the engineers on Slack.

The calendar and what backs it

Rollout is laid out in four phases. Two to three weeks of shadow mode, where agents only read and draft replies for human operators. Three to four weeks as an internal copilot, the point at which write access to non-critical systems appears. Four to six weeks before facing customers, and only after a security audit. Then continuously: a fleet of narrow agents, a nightly transaction auditor, a procurement agent, a marketer.

The gains are reported more honestly than such texts usually manage, and that honesty should carry over whole. Relieving staff by 30–40 per cent is the authors' estimate for typical scenarios. The conversion growth in phase three is called substantial without a single figure attached. The transport firm and the bank are described as scenarios, not as named accounts; the article names no client at all.

Limits stated plainly

Where policy forbids the cloud — defence contracting, healthcare, card payments — the proposal is to run open models in house: Llama 3, Mistral, Qwen, compressed to GGUF, AWQ or EXL2, up to a fully air-gapped perimeter with no internet at all. Model spending is fenced by strict token limits, and under attack the gateway drops spam traffic itself so that nobody can burn through the budget.

The old system is not dead. It remembers what the new one does not yet know it has forgotten.— Koan No. 35, Maksim Valentinovich Galatin

From the koan follows the practical conclusion the whole thing was built for. The value of a monolith is not its code but what has accumulated inside it, and that is precisely what any migration puts at risk. The method proposes not to move the accumulation but to leave it where it lies and learn to ask it questions. The price is stated by the authors themselves: a layer of intermediaries that will have to be maintained forever.

Original source

The full article runs to eighteen sections: the anatomy of the gateway in full, two detailed case studies, paper documents processed by machine vision, crypto payments accepted by old databases, an LLMOps layer built for regulators, and automatic discovery of new columns.