For LLM integration with legacy software, we recommend a five-stage rollout. First, take an inventory of touchpoints and data owners. Next, pilot a read-only feature, then run it in shadow mode, then route a growing share of users to it behind a switch, and add write-back last. Keep the old path working as a fallback, alongside a plan for requests and actions already in progress.
Below you will find the order of work and the evidence each stage needs before you move on. For what to build, including the adapter service, identity and tool permissions, read our guide on how to place an LLM beside an old system first.
Each stage changes one thing: who sees the model's output, or what the model is allowed to touch. Move on only when the stage's exit criteria pass. A route switch can stop new exposure; it does not reverse outputs already seen or actions already completed.
| Stage | Who sees the output | What the model can change | Move on when | How you step back |
|---|---|---|---|---|
| 1. Inventory | Nobody | Nothing | Every touchpoint has a data owner and an off switch | Not needed |
| 2. Read-only pilot | Named reviewers | Nothing | Reviewers accept the suggestions on your agreed test set | Turn the pilot off |
| 3. Shadow mode | Reviewers; outputs go to a log | Nothing | Disagreements are understood, and latency and cost fit | Stop the shadow call |
| 4. Routed rollout | Internal team, then small cohorts, then wider groups | Nothing | Each cohort meets its gates | Flip the route back |
| 5. Write-back | Users who approve each action | Records, through existing interfaces | The owner signs off on each write type | Compensating procedure; a switch cannot undo a write |
A legacy system carries behaviour nobody wrote down: a batch job that runs at 2 a.m., a field that means two things, an integration that fails if a reply arrives one second late. An LLM feature adds a dependency that can be slow, wrong or unavailable. Stages keep each surprise inside a small, known area.
The idea is borrowed from modernisation work. AWS Prescriptive Guidance describes the strangler fig pattern as replacing functionality one component at a time, with a proxy layer that routes each request to either the legacy system or the new one while the old system keeps working. Our guide to modernising a legacy system in slices covers that pattern on its own. Here we use the same routing point for a narrower job: deciding whether a request goes through the existing path or the new LLM feature.
Requests already in flight when you flip the route need their own rule. Decide in advance whether you let them finish, cancel them, or drain them to the old path.
Start with a list, not a model. Walk through the screens, workflows, batch jobs and inbound channels where a model might help, and record five things for each:
- Data read: which fields, who owns them, and whether they include personal or confidential data.
- Writes: whether the touchpoint changes anything, and through which interface.
- Failure behaviour: what happens today when a dependency is slow or down.
- Load and timing: peak volume and any hard time limits.
- Control: who approves changes, and where an off switch can sit.
Settle data ownership in this stage. The legacy system stays the system of record for the whole rollout. The LLM component may read, summarise and propose; it must not become a second source of truth for the same data.
Settle data ownership before building. The legacy system stays the system of record for the whole rollout: the LLM feature reads, summarises and proposes, and never becomes a second source of truth for the same data.
Pick a feature that suggests and leaves the record alone. Good candidates are a summary of a customer's history on a CRM screen, a draft reply an agent edits before sending, or a suggested category for incoming tickets that a person confirms. If the model is slow or unavailable, the screen should work as it did before.
Keep the design simple. Anthropic's engineering guide to building agents separates workflows, where the model and tools follow predefined code paths, from agents, which direct their own process and tool use, and it recommends the simplest solution that works. For most legacy pilots that means fixed-path workflow automation: the legacy system calls the model at one defined point and shows the result to a named reviewer. If someone proposes several agents handing work to each other for a first pilot, read multi-agent systems explained before agreeing to the extra moving parts.
Read-only does not mean harmless. A summary can expose data the viewer should not see, or mislead a decision. Enforce the same access rules the legacy screen enforces, and test answer quality on cases your reviewers have labelled.
In shadow mode, the new component receives real inputs alongside the existing process, and you record its outputs instead of showing them. Martin Fowler describes the same idea as dark launching: users trigger the new behaviour without being able to tell, old and new code can both run, and only one answer goes back to the interface. You can review outputs before showing them in the user path; the extra processing still carries data and capacity risks.
Set it up with four controls:
- Only permitted data. Send the model only data you are allowed to process with this model and provider.
- No side effects. Disable sends, payments, notifications and writes in the shadow path.
- Its own budget. Give the shadow call separate capacity and a spending cap, so duplicated work cannot slow the live path.
- Production-grade logs. Keep shadow logs under the same access controls and retention limits as production data.
Then compare. Check the shadow outputs against expected outcomes your reviewers have checked, and against what staff or the legacy logic actually did. A disagreement on its own does not prove the model wrong or the old process right, so look at the types of disagreement as well as the rate, along with latency and cost under real load. Shadow runs surface what test data misses: odd record formats, Arabic and English mixed in one field, timeouts at peak hours.
In shadow mode the model runs on permitted real inputs, but sends, payments, notifications and writes are switched off and its outputs go only to a log with production access controls. Reviewers then compare; this diagram shows no comparison result.
Widen exposure through the routing point, one cohort at a time: an internal team, then a small group of users, then wider groups. This is a canary release. Danilo Sato's description on martinfowler.com defines it as rolling a change out to a small subset of users first, with rollback done by rerouting users to the old version.
Your rollback plan has three parts:
- The switch. Rolling back means flipping the route. Nobody redeploys under pressure.
- A working old path. Keep the fallback maintained, with current permissions, deletion rules and compatible data formats. It is your safety net until you retire it.
- Rehearsal. Practise the rollback before the first real users arrive and again before each expansion.
Write each cohort's gates before its results arrive. Our guide to rollback plans for model releases explains how to set release gates and what to monitor once real users are in. Agree in advance what lets you retire the old path, such as a period without serious incidents, stable quality measures and the owner's sign-off. Until then, old and new run side by side.
Only after the read-only feature has proven its value, and one write type at a time. Writes change operational records and cannot be reversed merely by switching the route, so they need controls of their own.
The OWASP Top 10 for LLM Applications (2025 edition) lists excessive agency, meaning an LLM that can take damaging actions after unexpected or manipulated output, as risk LLM06. Its mitigations match what a legacy write path needs:
- Use existing interfaces. Send writes through the legacy system's validated API, queue or batch import, never straight into its database.
- Act as the user. Execute each action in the context of the user who requested it, with the minimum permissions the action needs.
- Ask first. Require a person to approve any high-impact action, and bind that approval to the exact proposed change. Re-check authorisation when it executes.
- Make writes safe to repeat. Scope idempotency keys to the tenant, operation and payload, store outcomes atomically, and test duplicate and delayed delivery.
- Plan recovery. Identify compensating actions, manual recovery and irreversible effects for each write type before enabling it. A routing switch does not undo completed actions.
If the legacy system stays the system of record, every accepted change lands there under its normal rules. Copies, search indexes and downstream systems still need reconciling. Microsoft’s compensating transaction guidance explains that recovery may need business rules and human intervention, and may not restore the original state. Record those limits when the owner approves a write type.
Stop when a stage misses its exit criteria. If shadow results fall short, fix the feature before any user sees it; otherwise you widen exposure to a failure you already know about.
Change course when the idea turns out to be a new product surface, such as a customer-facing chat or an analyst console. Build that beside the legacy system and read its data through an approved interface, instead of grafting it onto old screens.
This five-stage sequence is TecnoStack's guidance; AWS, Anthropic, OWASP and Martin Fowler do not prescribe it. If you are planning the first AI feature on an older platform, we can help you run the inventory and the stages as part of building AI features inside your existing software.
- Amazon Web Services. Strangler fig pattern. AWS Prescriptive Guidance, cloud design patterns.
- Anthropic. Building effective agents. Published December 2024; the page notes that much of the tooling it describes has changed since then.
- Martin Fowler. Dark launching. martinfowler.com, April 2020.
- Danilo Sato. Canary release. martinfowler.com, June 2014.
- OWASP GenAI Security Project. LLM06:2025 Excessive Agency, part of the OWASP Top 10 for LLM Applications (2025 edition).
Sources checked in October 2026. The distinction between route rollback and recovery of completed actions was checked against Microsoft’s compensating transaction guidance on 25 October 2026; the remaining source review is unchanged.






