All insights
AI Agents

Connecting AI Agents to Legacy Systems Without a Rebuild

You can connect AI agents to legacy systems safely through a controlled integration layer—without exposing databases or rewriting the core platform.

A controlled adapter connecting an established legacy platform to an AI agent network

Treat the legacy system as a capability, not a codebase

A legacy platform may be hard to change yet still run essential processes reliably. The wrong starting point is asking how an agent can navigate every screen or query every table. Start by naming the business capability: look up an order, draft a renewal quote, check inventory, or open a service case.

Expose that capability through a narrow contract. The contract can sit over an existing API, stored procedure, message queue, robotic automation, or carefully contained browser automation. The agent sees a small tool with typed inputs and outputs. The adapter absorbs old naming, protocols, authentication, and error codes.

Relative risk by integration approach

Read-only service API
22 risk
Command API with approvals
38 risk
Message queue adapter
34 risk
Direct database write
82 risk
Unsupervised screen control
91 risk

The six-layer connection pattern

Use six separations: the agent plans; a tool gateway authenticates it; a policy layer checks the proposed action; an adapter translates the request; the legacy system remains the system of record; and an audit stream records the result. Keep credentials in the gateway, never in prompts. Resolve the acting user and tenant before every call.

For reads, filter fields at the adapter so the model never receives data it does not need. For writes, support dry-run or preview responses, require an idempotency key, and return a durable transaction reference. If the legacy system is slow, place the request on a queue and let the agent poll a job status instead of waiting indefinitely.

PhaseAgent authorityExit evidence
ObserveNo tool accessReal task and exception set
ReadApproved read-only toolsCorrect retrieval and access filtering
RecommendDraft actions onlyHuman acceptance and correction data
Act with approvalReversible writesLow error and clean rollback
Bounded autonomyLow-risk actionsStable outcome, cost, and incident metrics

Roll out from evidence, not enthusiasm

Choose a workflow with meaningful value but limited blast radius. Run the agent in shadow mode against completed work, compare its proposed actions with the actual decisions, and catalogue disagreements. Move to read-only assistance before allowing any write.

Every expansion should answer three questions: what new authority is being added, what evidence shows it is safe, and how will the organisation stop or reverse it? This incremental path often delivers value faster than a rebuild because it respects the systems and controls the business already depends on.

Discover the real integration surface before choosing technology

Interview the people who operate the workflow and observe complete cases, including corrections and end-of-day reconciliation. Catalogue interfaces, batch windows, rate limits, record ownership, duplicate detection, authentication, support contacts, and blackout periods. Find the hidden rules that live in spreadsheets, email approvals, or operator memory.

Rank each candidate capability by business value, transaction consequence, interface stability, data sensitivity, exception rate, and rollback quality. The best first connection is rarely the most impressive process. It is a valuable, bounded read or reversible command whose result can be independently verified.

Design a durable agent-to-legacy contract

  1. 01

    Name a business verb

    Use operations such as getOrderStatus or prepareRenewalQuote rather than exposing database or screen mechanics.

  2. 02

    Define a strict schema

    Specify required fields, enumerations, formats, limits, response states, and errors that the agent can handle.

  3. 03

    Resolve identity

    Map the requesting person or workload to an existing role and verify tenant, customer, and record scope.

  4. 04

    Separate preview from commit

    Return the proposed changes and policy result before performing consequential writes.

  5. 05

    Reconcile the outcome

    Read the system of record after execution and attach its durable reference to the agent trace.

Adapter acceptance checklist

  • No credentials or connection strings appear in prompts
  • Every command is authenticated, authorised, validated, and rate-limited
  • Retries cannot duplicate a transaction
  • Timeout and partial-success states have explicit recovery paths
  • System-of-record results are reconciled and auditable

Frequently asked questions

Do AI agents require modern APIs?

No. A controlled adapter can wrap queues, stored procedures, RPA, file exchange, or browser automation, although stable service APIs are usually easier to govern.

Should an agent query the legacy database directly?

Generally no. Direct access couples the agent to internal schemas and can bypass business rules. A narrow read service or command adapter is safer.

Can this replace a legacy modernisation programme?

It can defer or narrow parts of a rebuild, but it does not remove underlying resilience, support, security, or data-quality risks.

Start with clarity

Turn the idea into a responsible next move.

Bring the context, constraint, and stakes. We’ll help clarify the most useful next decision.

Book a 30-minute fit call No generic pitch. No obligation.