How to Integrate AI Agents With Legacy Systems and ERPs

Connect AI agents to legacy systems, ERPs and screens with no API. The methods that work, a step-by-step plan, and examples from live deployments.

Gonzalo Ybanez
Gonzalo Ybáñez
Growth Strategist
Publié le 7 oct. 202611 min de lecture
how to integrate AI with legacy ERP
Aller à la section

The work you want an AI agent to do often lives in a system older than half your team: an ERP several versions behind, or a supplier portal with no API. You don't have to replace that system. But an API on its own won't get an agent working inside it.

Legacy systems integration usually uses an API to sync records between old and new systems. An AI agent has to do more than sync records, because it has to finish the order confirmation itself. To do that, the agent performs five jobs:

  • Read the record it needs.
  • Decide the next step within the rules you set.
  • Act by writing the result back.
  • Wait for a reply that may take days, then follow up.
  • Prove that the record changed.

An API lets the agent read records and write results back. The other three jobs depend on the workflow you build around the agent. This guide shows how to connect AI agents to your legacy systems and ERP so they can do all five.

What Counts as a Legacy System?

A legacy system (also called legacy software or a legacy app) is software that a company still uses for core business work, such as order management, but that newer software finds hard to connect to. Newer software usually connects to other systems through an API, which is a defined set of requests that one program can send to another to read or update records. 

Legacy system connecting with AI agent

Legacy system connecting with AI agent


The way a system's records can be reached makes it legacy, regardless of its age. A legacy system has no documented API, or an API that gives access to only some of its records. An AI agent then has to reach those records another way, either through files the system exports or through the same screens that staff use.

SnapLogic traces this closed access to proprietary technology and to outdated or missing documentation. Before an AI integration starts, check each system for a documented API and a file export option.

What Are the Examples of Legacy Systems?

Here are some of the common examples of legacy systems:

  • An ERP several versions behind
    An ERP that holds a company's orders, invoices, inventory, and finance records in an older release that may have no API, so other software cannot read or update those records directly.
  • A mainframe billing or insurance policy system
    A mainframe is a large central computer that processes high volumes of transactions, such as customer bills or insurance policies. Some of these systems still run code written in COBOL, a programming language developed in the late 1950s and early 1960s.
  • A transportation or warehouse management system with a partner-only API.
    A TMS plans and tracks shipments, and a WMS tracks stock inside a warehouse. Some open their API only to approved partners, so your own AI agent can't use it without the software provider's approval
  • A carrier, supplier, or government portal
    A portal is a website run by another organization, where staff log in to check shipment status, confirm orders, or submit forms. Many of these portals offer no API to outside users, so an agent can reach the records only through the same browser screens your team uses.

Why Do Companies Still Use Legacy Systems?

Companies keep legacy systems because they still run core work, such as confirming orders, and hold years of records that other processes depend on. Replacing one means migrating all of those records into a new system and training every team that uses the old one.

According to Workato, migrating away from a legacy system can cost tens of millions of dollars. Part of that cost comes from making the switch while orders and payments keep arriving, because the business can't pause for it.

Is Replacing a Legacy System Worth It?

Legacy system replacement is worth the cost and effort in two situations:

  • The provider no longer supports the system: The GAO's 2025 review looked at 11 critical federal legacy systems. Four ran on unsupported hardware or software, and seven had known cybersecurity vulnerabilities. found one federal system on unsupported hardware with security vulnerabilities that cannot be fixed without modernization.
  • The system makes it hard to compete: Naturgy, a Spanish gas and electricity supplier, spent three years migrating its customers off legacy systems before it deployed AI workers from HappyRobot, an AI agent platform for enterprise operations.

Replacing legacy systems is harder to justify when the system works and the cost comes from manual work around it, such as staff copying order details into a supplier portal. AI agents can do that work inside the existing system. HappyRobot's guide to enterprise automation without replacing your stack explains how.

How AI Agents Connect to Legacy Systems

The connection method decides how an AI agent reads and updates the records in each system. Here’s a quick look at the possible integrations that HappyRobot enables.

HappyRobot integrations

HappyRobot integrations

AI agent integration often takes more than one method in a single workflow, because each system allows a different kind of access.

MethodUse it whenWhat the agent can doWatch out for
Native APIThe system has a documented, stable APIRead and update records on requestRate limits cap requests per minute, and permission scopes limit records the agent can reach
Middleware or iPaaSThe company already runs an integration platform with a connector to the systemRead and update records through that connectorEach request passes through one more system that has to stay running
Database connectorThe IT team allows read access and documents the tablesRead records quicklyConnect to a read-only copy of the database so the agent cannot change live records
File exchangeThe system moves records only in batch files, such as a nightly CSVRead and update records on a scheduleRecords are only as current as the last file
Browser agentThe system's screens are the only way to reach the recordsLog in, then read or fill in fields on each screenScreens change after system updates, so the agent needs monitoring (see where RPA fits and where it breaks)
Human channelsA person holds the answer, such as a supplier confirming a delivery dateCall, email, or text the person, then record the answerReplies can take days, so the workflow tracks each open request and follows up
AI agents integration with legacy systems

For systems with an API, HappyRobot connects through 200+ native integrations, including Salesforce, ServiceNow, and MongoDB. HappyRobot calls its AI agents AI workers, and for systems with no API, it runs them as browser agents.  At Kuehne+Nagel, AI workers have run more than 10,000 status checks and processed more than 6,000 emails across air logistics operations.

Tell us which of your systems has no API, and we'll show you how an AI worker reads and updates its records.

Book a HappyRobot demo

How to Integrate AI Into Legacy Systems, Step by Step

Integrating legacy systems with an AI agent takes six steps. On every HappyRobot deployment, the first question we ask is which screen your team copies data out of all day.

six steps to integrate AI agents

Steps to integrate AI into legacy systems

  1. List each step of the current process
    Write down every action a person takes today, such as opening the order in the ERP or emailing the supplier, along with the system each action uses.
  2. Record the access each system allows
    Note whether the system offers an API, read access to its database, file exports, or only its screens.
  3. Match each system to a connection method
    Choose the method that the system's access allows, such as a browser agent for a supplier portal with no API.
  4. Decide what the agent may write
    Start with read-only access where the system allows it, so the agent can look up records but cannot change them. Then define the rules that the AI model behind the agent must not decide on its own, such as a customer's credit limit. 
HappyRobot integration workflow

HappyRobot integration workflow

For example, this HappyRobot workflow run checks the eligibility before replacements.

Set those rules in deterministic workflow logic, which follows the same branch every time a condition is met.

  1. Plan for replies that take days
    A supplier may confirm a delivery date the next day, so the agent has to track each open request and follow up on its own. WWEX Group's AI workers track 25,000 loads a month end to end this way.
  2. Test against the record itself
    A test passes only when the ERP record shows the outcome, such as the confirmed delivery date. In HappyRobot, each check can be written as a northstar, a pass/fail rule evaluated automatically against sampled live sessions.

How Can AI Be Used in ERP?

AI in ERP, as HappyRobot applies it, means AI workers that complete the operational tasks tied to ERP records from start to finish. An AI worker reads an order or invoice in the ERP and contacts the supplier or customer it depends on by phone, email, or message. Once that supplier or customer answers, the AI worker writes the result into the ERP. That's what agentic ERP means in practice.

The ERP itself, such as SAP, Oracle, Microsoft Dynamics, or NetSuite, remains in place and continues storing the company's orders, invoices, and inventory records.

The work AI workers do around an ERP includes:

  • Order confirmation. An AI worker calls or emails suppliers and carriers to confirm orders and delivery dates, then writes each confirmed date into the ERP.
  • Collections. An AI worker calls customers about overdue invoices and records each payment commitment in the ERP or billing system. HappyRobot's guide to AR automation software explains how AI workers make collections calls alongside an existing accounts receivable platform.
  • Invoice questions. When a customer asks about an invoice or a payment, the AI worker looks up the record in the ERP during the call and answers.
  • Record consistency. The ERP and the CRM are updated in the same workflow, so both systems show the same outcome.

Kuehne+Nagel and HappyRobot have identified invoice reconciliation as a next use case, covering about 26,000 cost entries a month through a Kuehne+Nagel subsidiary.

ERP integration for AI agents uses the ERP's own API where one exists, such as NetSuite's REST web services or the Business Central API for Microsoft Dynamics 365. Some companies already run an integration platform (iPaaS), which is software that keeps live connections between the ERP and their other business applications. In that case, the AI agent can send its requests through the connection the integration platform already has to the ERP, so no one has to build a new one.

When an older ERP screen has no API, a browser agent reads and fills that screen. For example, HappyRobot's finance AI workers connect directly to ERP and billing systems.

Will ERP Be Replaced by AI?

No, AI won’t replace ERP systems, because the ERP is the system of record that stores a company's orders, invoices, and inventory, and other business software reads from it. AI agents take over the manual work around the ERP, such as calling a supplier to confirm a delivery date and then updating the order in the ERP.

Closing Thoughts: Getting AI Agents to Work in Your Legacy Systems

Integrating AI agents with legacy systems and ERPs means keeping the existing ERP and connecting AI agents to it instead of replacing it. The agent reads and updates ERP records through a connection such as the ERP's API or a browser agent.

The workflow built around the agent covers the rest of the work, from following up with a supplier who replies days later to checking that the ERP record shows the confirmed delivery date. To test the setup, start with the system that is hardest to reach, such as a supplier portal with no API.

Send us your messiest system, not your cleanest one. That's the one worth testing.

Book a HappyRobot demo

Questions fréquentes

  • Can AI agents work with systems that have no API?
    Yes. An AI agent can use a browser agent to log in to the system and work on its screens the way an employee does. When the information the agent needs comes from a person, such as a supplier, the agent can contact that individual by phone or email to record the reply.
  • How long does it take to integrate AI agents with an ERP?
    Initial agents get live typically within 4 to 12 weeks, depending on the access each system allows. HappyRobot's Forward Deployed Engineers work inside your operations to connect the systems and launch the first agents. At WWEX Group, HappyRobot's team worked alongside WWEX's own team, and all six AI agents for freight tracking went from kickoff to production in six weeks.
  • What is the difference between RPA and AI agents for legacy systems?
    RPA (robotic process automation) follows a fixed script on a system's screens. When a case falls outside that script, the RPA bot sends it to a queue where an employee handles it. An AI agent can read unstructured input, such as a supplier's email, and decide the next step in the task, such as replying to the supplier or updating the order in the ERP.