# Opening Up Legacy Systems to AI Agents: How Growth Companies Build an API Wrapper for an Old ERP or CRM

> An API wrapper opens an old ERP or CRM to AI agents safely. Here's how growth companies build one without replacing the core system.

- Published: 2026-09-14
- Author: Master Mind
- Canonical: https://aimaster.fi/en/artikkelit/legacy-jarjestelman-avaaminen-ai-agenteille-nain-kasvuyritys-rakentaa-api-kaaree

Only 1% of Finnish companies use data to build new business (Sitra). The most common reason isn't a lack of data — it's data locked inside a system that can't talk to anything else. A ten-year-old ERP or a custom-built CRM offers no interface an AI agent could use. This article walks through how a growth company builds an API wrapper on top of an old system and opens it up to AI safely — without replacing the system itself.

## Why does an old ERP or CRM block AI agents?

Legacy systems were built for human users, not programmatic access. Data sits inside a proprietary database in a format nobody else understands directly. Without an interface, an AI agent can't read the order book, update customer records, or trigger a process. That's not a limitation of the AI agent — it's a missing integration.

Many companies end up choosing between two bad options: replacing the entire system, which takes years, or manual work where an employee copies data between systems by hand. The third path is building a thin layer in between that translates the old system's language into something AI can understand.

## What is an API wrapper?

An API wrapper is a software layer installed between a legacy system and an AI agent. It reads the old system's database, files, or outdated interface, and exposes a modern, standardized interface outward. The agent talks to the wrapper in a clear format. The wrapper translates the request into something the old system understands and returns the response back.

In practice this means three layers: a connection layer that reaches into the old database or file system; a normalization layer that converts the data into a consistent format; and an interface layer that exposes clear actions for the agent to use, such as "get order" or "update customer address." [Master Layer](https://aimaster.fi/tuotteet/master-layer) is AIMASTER's data foundation layer that connects a company's existing systems — CRM, ERP, documents — securely for AI use. An API wrapper is one of the key building blocks when implementing Master Layer in legacy environments.

## How does building an API wrapper actually work?

The first step is mapping how the old system can be accessed. Some systems already have a limited legacy interface (SOAP or file-based export). Others can only be reached through the database directly, or even through screen-scraping the user interface. This mapping determines what kind of wrapper is worth building.

The second step is limiting exactly what the agent can see and do. The wrapper doesn't open the entire database — it exposes only named actions with tightly defined permissions. The agent might be allowed to read a customer's order history, but not payroll data, even if it lives in the same system. Write permissions are scoped separately: the agent can propose a change, but a human confirms it before it's saved, until the process has proven reliable.

The third step is testing side by side with the old process. The wrapper is rolled out for one limited action at a time, and results are checked manually for a few weeks before expanding further. This quickly surfaces cases where the old data isn't as clean as assumed — missing fields, outdated codes, duplicate customer IDs.

## Should you build it yourself or use an off-the-shelf integration tool?

Ready-made integration platforms (iPaaS tools) work well when both ends have a modern, supported interface. The problem appears when one end is an early-2000s order system with no documented interface — an off-the-shelf platform isn't enough, because the connection to the old system has to be built by hand regardless.

| Criterion | Off-the-shelf iPaaS platform | Custom API wrapper |
| --- | --- | --- |
| Best fit when | both systems have a modern interface | the legacy system has no documented interface |
| Time to deploy | fast, if interfaces are ready | depends on mapping legacy access first |
| Permission scoping | limited to platform's built-in options | fully customizable to the agent's needs |
| Maintenance | handled by the platform vendor | owned by the growth company or its partner |

The sprint model works well here: one development sprint is 3 days, and the first sprint is spent mapping access and building the wrapper for one action. The result is in use before a large integration project would even have finished its planning phase.

## What risks come with an API wrapper?

The biggest risk is overly broad access: a wrapper that opens the entire database to the agent just to support one action. The second risk is bad data passed through unchanged — an agent is only as good as the data it receives. The third risk is losing ownership of maintenance: once the wrapper is built, someone needs to own updating it as the old system or the agent's needs change.

These risks are handled the same way as the rest of AI infrastructure: scoped permissions, logging every call the agent makes, and regular review of what the wrapper actually does in production. Once the foundation is solid, [Master Mind](https://aimaster.fi/tuotteet/master-mind) agents can run business processes independently on top of Master Layer's data — even when that data lives in a system older than the company's current staff.

This topic connects closely to how a growth company evaluates which integration route fits which situation — read more in [Reverse ETL: How Growth Companies Push Analytics Back Into CRM and ERP for AI Agents](https://aimaster.fi/en/artikkelit/reverse-etl-nain-kasvuyritys-vie-analytiikan-takaisin-crmaan-ja-erphen-ai-agentt).

## Can an old ERP be opened to an AI agent without replacing the system?

Yes. An API wrapper is installed on top of the existing system as its own layer and doesn't change the old system itself. The wrapper reads and writes data through scoped, named actions, so the old system keeps running normally while the agent gets safe access.

## How long does building an API wrapper take?

Timing depends on how the legacy system can be accessed. In the sprint model, the first sprint (3 days) is spent mapping access and building the wrapper for the first action. A single, scoped action can be live within a few sprints, while a broader set of actions is built in stages.

## What's the difference between an API wrapper and Reverse ETL?

An API wrapper gives the agent real-time, action-based access to one system — it answers questions and makes individual changes on request. Reverse ETL pushes aggregated analytics data back into business systems in batches. Many growth companies need both, for different use cases.

A free Master Mind analysis shows exactly where your legacy systems are blocking AI agent adoption and where to start: [Book a free Master Mind analysis](https://aimaster.fi/analyysi).

## Frequently asked questions

### Can an old ERP be opened to an AI agent without replacing the system?

Yes. An API wrapper is installed on top of the existing system as its own layer and doesn't change the old system itself. The wrapper reads and writes data through scoped, named actions, so the old system keeps running normally while the agent gets safe access.

### How long does building an API wrapper take?

Timing depends on how the legacy system can be accessed. In the sprint model, the first sprint (3 days) is spent mapping access and building the wrapper for the first action. A single, scoped action can be live within a few sprints, while a broader set of actions is built in stages.

### What's the difference between an API wrapper and Reverse ETL?

An API wrapper gives the agent real-time, action-based access to one system — it answers questions and makes individual changes on request. Reverse ETL pushes aggregated analytics data back into business systems in batches. Many growth companies need both, for different use cases.

### What risks come with an API wrapper?

The biggest risk is overly broad access to the entire database for the sake of one action. The second risk is bad data passed through unchanged. The third risk is losing ownership of maintenance — someone needs to own updating the wrapper as systems change.

### Should you build an API wrapper yourself or use an off-the-shelf integration tool?

Off-the-shelf iPaaS platforms work when both systems have a modern, documented interface. When the legacy system doesn't, the connection has to be built by hand anyway, making a custom API wrapper the more practical solution.
