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

> Source: https://netray.co/erp-help/private-ai-layer-infor-system21-on-prem-architecture
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

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.

## Kind

advanced

## System

on-prem-apps

## Erp

Infor System21 (IBM i)

## Module

Private AI / Integration Architecture

## Query

Infor System21 AI integration on-prem

## Alternate Queries

- System21 AS/400 AI assistant
- add a local LLM to System21
- Infor System21 data access Db2 for i

## Applies To

Infor System21 (formerly Geac System21) on IBM i; details differ by release, installed modules and customer modification.

## Steps

### Reference build for Infor System21

**Items:**

- Identify the System21 modules in use and the five questions users ask most.
- Trace each question to the Db2 for i tables behind the corresponding screens.
- Build read-only, business-named SQL views in a separate library and grant them to a service profile.
- Set up a replica or reuse an existing extract feed.
- Deploy an open-weight model on local GPUs with a tool server exposing parameterised queries.
- Carry over company and function security into the tool server filter.
- Pilot read-only first, log every query, review answers with the module owners.

## Sections

### Data access paths in Infor System21

**Body:**

System21 is a modular suite covering distribution, manufacturing and financials on IBM i. Its data lives in Db2 for i libraries, and the application is driven through its own menu and application management layer. Since exact file names differ by module and release, begin with the Db2 catalog (QSYS2.SYSTABLES, QSYS2.SYSCOLUMNS) and the product documentation for your installed modules, and write down the table behind each screen your users already trust.

Programmatic access is ordinary SQL through ODBC or JDBC, plus whatever interface programs and files your release documents for inbound transactions. We would not rely on an undocumented screen-scraping route. If your team already runs RPG or CL extracts to a reporting server, reuse that feed as the replica source, because it already encodes your business rules.

**Code:**

-- Which tables hold a given business column? Start from the catalog, not guesses.
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLUMN_TEXT
FROM QSYS2.SYSCOLUMNS
WHERE COLUMN_TEXT LIKE '%CUSTOMER%'
ORDER BY TABLE_SCHEMA, TABLE_NAME;

-- Expose only an approved, named view to the assistant's service profile
GRANT SELECT ON AIREAD.OPEN_SALES_ORDERS TO AISVC;

### Reference architecture, including the air-gapped option

**Body:**

A workable private AI layer for Infor System21 has six parts. First, a read-only data path: Db2 for i views 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 System21 identity, company and function 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.

Use a replica or scheduled extract so that assistant traffic does not compete with order entry and overnight batch. Many System21 sites already extract to a data warehouse; if so, that warehouse may be the cleanest source, provided it is refreshed often enough for the questions you want to answer.

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

**Body:**

System21 security combines IBM i authority with application-level controls over who may run which functions and in which company or ledger. The assistant must not become a back door around that. Resolve each signed-in person to their System21 identity, determine the companies and functions they may use, and apply the same limits in the tool server before any query runs.

Where the Db2 version supports it, row and column access control can enforce company restrictions inside the database as a second layer behind the tool server.

### Write-back only through supported interfaces

**Body:**

Keep the model out of System21 files. A user may ask the assistant to prepare an order note or a purchase request; the assistant writes a draft, the user reviews it, and a supported System21 entry function or interface posts it under that user's identity. The approval and result are logged.

### Sizing, phased rollout and honest limits

**Body:**

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 System21's supported interfaces, always under the approving user's identity, with an audit record.

Because we cannot assume a single standard schema across System21 releases, expect to build the view layer per customer. That is real work and is where most of the quality comes from.

If staff only need fixed inquiries, the built-in enquiries and reporting tools are enough. A language model is worth adding for cross-module questions and for document search, not for lookups that a menu option already answers.

## Pitfalls

- Guessing table meanings instead of tracing them from the screens users trust.
- Giving the service profile access to whole libraries rather than named views.
- Ignoring company and ledger separation in multi-company installs.
- Using a stale warehouse extract for questions that need today's stock position.
- Skipping module owners in answer review, so wrong business definitions go unnoticed.

## Ai Angle

ERPray and Netray's custom build work follow this pattern: read-only by default, the query is shown to the user, Infor System21 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.

## Faq

### Is there an official System21 API for this?

**Answer:** Releases document interface programs and files for inbound data, but we would not assume one universal read API. For reads, SQL against Db2 for i through views is the most predictable route. Check your release documentation for supported inbound routes.

### Can we reuse our existing data warehouse?

**Answer:** Often yes. If it is refreshed frequently and keeps the keys and codes users expect, it can serve as the replica. Check freshness against the questions you want to answer.

### How do we avoid exposing other companies' data?

**Answer:** Resolve the user's companies from System21 and add that filter in the tool server for every query, with database row access control as a second layer where available.

### Does it need a GPU?

**Answer:** For a pilot with a handful of users a single modern GPU can be enough. Use the sizing calculator for your user counts.

## Search terms

Infor System21 AI, System21 AS/400 AI, Geac System21 integration, System21 Db2 for i, local LLM System21, System21 chatbot on-prem, private AI IBM i ERP, System21 reporting replica, Infor System21 data access

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
