AdvancedInfor XA (IBM i)Private AI / Integration Architecture

How to add a private AI layer to Infor XA on-prem

Question
how to add AI to Infor XA on-prem

Also searched as

  • Infor XA AI integration without cloud
  • MAPICS XA chatbot on IBM i
  • use a local LLM with XA data on AS/400

Short answer

Infor XA keeps its data in Db2 for i on IBM i, so the safest way to add AI is a read-only reporting copy or logical-file access over JDBC or ODBC, a retrieval index over documents, a small tool server that exposes approved queries, and an open-weight model served on local GPUs. Nothing has to leave the building, and any write-back goes through the supported XA transaction programs after a person approves it.

Applies to: Infor XA (formerly MAPICS XA) on IBM i 7.3 and later; the pattern also holds for earlier releases with Db2 for i access.

Reference build for Infor XA

  1. 1Inventory the XA libraries, journaling status and IBM i level, and name the 20 to 40 tables behind your first use cases.
  2. 2Create read-only SQL views with business-friendly column names over those files, in a separate library.
  3. 3Stand up a replica or scheduled extract so production is never queried by the assistant.
  4. 4Build the data dictionary: file, field, meaning, units, code values, join keys.
  5. 5Deploy an open-weight model with vLLM or Ollama on local GPUs and a small tool server that exposes only parameterised, approved queries.
  6. 6Map each signed-in user to their XA profile, company and facility, and apply it to every query.
  7. 7Add an audit log of question, SQL run, rows returned and user, then pilot with 10 to 20 people.

Data access paths in Infor XA

XA stores business data in Db2 for i libraries, typically one library per environment with physical files, logical files and in many cases customer-added files. Any program that can speak SQL to Db2 for i can read it: the IBM i Access ODBC driver, the JTOpen (jt400) JDBC driver, or the Db2 for i catalog views in QSYS2. Because XA file and field names are short and coded, the first job is a data dictionary: use QSYS2.SYSTABLES and QSYS2.SYSCOLUMNS together with the XA database documentation for your release, and store the mapping as plain-language descriptions the model can use.

For integration beyond SQL, Infor XA has historically exposed business logic through RPG and CL programs, data queues and its own interfaces, and newer releases can connect to Infor ION. Whether ION is available depends on your release and licence, so confirm that before designing around BODs. For an assistant that only reads, SQL over views is simpler and more transparent than any messaging layer.

-- Discover candidate tables in the XA data library (Db2 for i catalog)
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, TABLE_TEXT
FROM QSYS2.SYSTABLES
WHERE TABLE_SCHEMA = 'XADATA' AND TABLE_TYPE IN ('T','P','L','V')
ORDER BY TABLE_NAME;

-- Read recent journal entries for change capture (journaling must already be on)
SELECT ENTRY_TIMESTAMP, JOURNAL_CODE, JOURNAL_ENTRY_TYPE, OBJECT_NAME
FROM TABLE(QSYS2.DISPLAY_JOURNAL(
  JOURNAL_LIBRARY => 'XADATA', JOURNAL_NAME => 'XAJRN',
  STARTING_TIMESTAMP => CURRENT TIMESTAMP - 1 HOUR)) AS J
WHERE JOURNAL_CODE = 'R';

Reference architecture, including the air-gapped option

A workable private AI layer for Infor XA has six parts. First, a read-only data path: Db2 for i views and journals over a replica or reporting copy so production is not queried. Second, a retrieval index over the documents and attachments people actually search, built with an open embedding model and stored in a vector database that runs on your servers. Third, a tool server, for example an MCP server, that exposes a short list of approved read actions with typed parameters. Fourth, an open-weight model served with vLLM or Ollama on local GPUs. Fifth, an identity layer that carries XA user profile, company and facility into every request. Sixth, an audit log of who asked what, which queries ran and which documents were retrieved.

The model never receives a database connection string. It asks the tool server to run a named action, and the tool server builds the parameterised query, applies the user's visibility filter and returns rows. This keeps free-form SQL generation out of production paths and makes every answer traceable to a query you can show the user. For an air-gapped site, all six parts run with no outbound route; model weights and updates arrive on approved media and are scanned and checked before use.

Run the assistant against a replica rather than the production partition. IBM i high-availability products and Db2 journal-based replication can keep a second partition or a separate IBM i in near-real-time sync; for lighter needs a nightly or hourly extract of the needed files into PostgreSQL is enough. Journal receivers are the natural change-data-capture source, but journaling has to be enabled on the files you care about and it has a disk and CPU cost.

Permissions: the assistant must never show more than the user may see

XA security is a mix of IBM i object authority, user profiles and XA's own application and company-level security. The assistant should not run under one broad profile. Create a read-only service profile that has *USE authority only on approved views, then enforce per-user visibility in the tool server: map the signed-in person to their XA user, company or facility, and add that filter to every query. Db2 for i row and column access control (RCAC) can enforce the same rule inside the database as a second layer.

Cost, margin and customer-specific price columns should be excluded from the default view set and exposed only to roles that already see them in XA screens.

Write-back only through supported interfaces

Do not let a model write to XA files. If drafts are useful (for example a purchase requisition or a customer order comment), have the assistant produce a structured draft, show it to the user, and post it only through the supported XA entry programs or interface files, under the user's own XA profile, after an explicit approval click. Log the draft, approver and posting result.

Sizing, phased rollout and honest limits

Sizing depends on concurrency, not on headcount. A pilot of 10 to 20 users with a 7B to 14B class model can run on one workstation-class or datacentre GPU with 24 to 48 GB of memory. A site with 100 to 300 named users, of whom a third use it daily, often needs one to four GPUs depending on model size and answer length. Retrieval indexes for tens of thousands of documents are typically in the single to low double digit gigabytes. Use the sizing calculator for your own numbers and treat results as ranges.

Roll out in three phases. Phase one is read-only questions over a small set of views and documents, with every answer showing the query or sources. Phase two adds drafts, such as a summary, a message or a prepared transaction, that the user reviews but that nothing posts. Phase three adds approved actions through Infor XA's supported interfaces, always under the approving user's identity, with an audit record.

Field and file names in XA are terse, so answer quality depends heavily on the data dictionary you build. Expect the first weeks to be spent on that mapping, not on the model. Heavily customised environments with many user-defined files need more mapping time.

If your questions are already answered by existing XA inquiries, saved queries or an existing BI tool, a language model adds convenience, not capability. Free-form analytical questions over many joined files are where it helps. Very old operating system levels or tight CPU capacity on the production partition are good reasons to use a replica only.

Try it here, free

MAPICS and Infor XA Private AI Layer Blueprint Generator

Open full tool

Generate a shareable architecture plan for adding a private, on-prem AI assistant to MAPICS and Infor XA, with components, security controls and a three-phase rollout.

Common pitfalls

  • !Pointing the model at raw physical files with cryptic names and expecting good answers.
  • !Running assistant queries on the production partition during month-end.
  • !Using one shared service profile that bypasses per-user company or facility limits.
  • !Forgetting that customer-added fields and files are not in the vendor documentation.
  • !Enabling journaling everywhere for change capture without sizing the disk impact first.

How an ERP-grounded AI assistant handles this

ERPray and Netray's custom build work follow this pattern: read-only by default, the query is shown to the user, Infor XA roles and visibility are respected, and everything runs on your hardware with open-weight models. Where a vendor's own AI or standard reporting already answers the question, we say so; the private layer earns its place for cross-system questions, document search and sites that cannot send data off premises.

Frequently asked questions

Can we use ION with XA for this?

Possibly, depending on your release and licence. ION BODs suit event-driven integration and write-back. For a read-only assistant, SQL views over a replica are usually simpler and easier to audit, so treat ION as optional rather than required.

Do we need to move off IBM i first?

No. The assistant sits beside IBM i and reads through ODBC or JDBC. The data stays in your Db2 for i libraries or in a replica you control, so there is no migration prerequisite.

Which model size is realistic?

For structured question answering over views, 7B to 32B open-weight models are often enough. Larger models help with long document summarisation. Test on your own questions before buying GPUs.

Is this air-gap capable?

Yes. Models, vector index, tool server and replica can all run with no outbound route. Model updates are then brought in on approved media and checked before use.

Related

Advanced

How to add a private AI layer to Infor LX / BPCS on-prem

BPCS and Infor LX run on IBM i with their data in Db2 for i, in files that carry short coded names by module. A private AI layer reads those files through read-only SQL views over a replica, indexes documents and attachments separately, exposes approved queries through a tool server, and serves an open-weight model on local GPUs. Writes, if any, go through the supported transaction programs with human approval.

Advanced

How to add a private AI layer to Infor System21 on-prem

System21 runs on IBM i with its business data in Db2 for i. The practical private AI pattern is a read-only replica or extract, SQL views that give files readable names, a retrieval index over documents, a tool server of approved queries, and a locally served open-weight model. User visibility is carried over from System21 security and company set-up, and writes only go through its supported entry points after approval.

CIO briefing

Staffing an ERP AI Team: What Roles You Actually Need

Most mid-market organizations do not need a dedicated ERP AI team at pilot stage - one ERP-literate technical owner working part-time with an implementation partner is enough. A dedicated team becomes worthwhile once you have more than two or three live AI use cases in production, at which point you need a named owner for prompt/data quality, one for integration and access, and a business-side owner for adoption.

How-to

Infor XA Net.Link: what it is, how it is configured and common issues

Net.Link is the web access layer associated with Infor XA (formerly MAPICS XA) that exposes XA functions through a browser, running on an IBM i web application server. It depends on the IBM i version, the web server profile and Java runtime, so most problems after changes trace to those components. Details vary by XA release, so confirm against your installation guide.

How-to

Infor XA REST API: expose XA through IBM i Integrated Web Services or ION

Infor XA has no single built-in REST API. Practical routes are IBM i Integrated Web Services (IWS), which turns RPG or SQL routines into REST endpoints on the same machine, and Infor ION where your environment supports it. For reads, SQL-backed services are straightforward. For writes, call XA's own programs so business rules run.

How-to

Infor XA costing: cost types, roll-up and standard cost setup

Product costing in Infor XA builds an item's cost from its material, labor, and overhead using the bill of material and routing. Standard cost is the frozen planning cost used to value inventory and measure variance, while other cost sets are used for current or simulated views. A cost roll-up calculates costs from the lowest BOM level upward. Exact program names and options vary by release.

AI for ERP

AI for Infor XA on IBM i: On-Prem, No Replatforming Required

Add AI to Infor XA on IBM i (AS/400) without a migration project. Read DB2 for i directly, ground answers in live XA data, keep everything on-prem.

Stuck on Infor XA (IBM i)?

Talk to engineers who work inside Infor XA (IBM i) every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

Guides

AI on your ERP

Integrations

Software