# How to Add a Private AI Layer to Oracle EBS 12.2 On-Prem

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

## Short answer

Do not point a model at the production APPS schema. Read from an Active Data Guard or GoldenGate copy through a small tool server that applies Multi-Org and responsibility security, retrieve from FND attachments in a local index, and serve an open-weight model on your own GPUs. Any write goes through Integrated SOA Gateway or the standard open interfaces with a human approval step.

## Kind

advanced

## System

oracle-ebs

## Erp

Oracle E-Business Suite 12.2

## Module

Private AI layer / Integration

## Query

how to add AI to Oracle EBS on-prem

## Alternate Queries

- Oracle EBS 12.2 AI integration without cloud
- run an LLM on Oracle E-Business Suite data on-premises
- Oracle EBS chatbot using Integrated SOA Gateway

## Applies To

Oracle E-Business Suite 12.2.x on Oracle Database 19c or 12.1 (12.2 is edition-based, so base tables sit behind editioning views); the same pattern works for 12.1.3 with differences noted below

## Steps

### Build order for an EBS private AI layer

**Items:**

Stand up a read-only copy of the EBS database: Active Data Guard physical standby opened read-only, or GoldenGate to a reporting database. Never let the assistant connect to the production APPS schema.

Create a dedicated read-only database account on that copy with SELECT on a curated list of views (for example items, onhand, POs, requisitions, jobs, GL balances) and no EXECUTE on arbitrary PL/SQL.

Write a tool server (an MCP server or plain REST service) that exposes a handful of parameterised read tools, not free SQL. Each tool takes the calling user's EBS user name and derives allowed operating units and inventory orgs from the responsibility and MO security profile tables.

Index attachments and documents: read FND_ATTACHED_DOCUMENTS and FND_DOCUMENTS to find files, extract text from FND_LOBS or the file system, chunk and embed them with a local embedding model, and store the ACL (entity, org, responsibility) with each chunk.

Serve an open-weight model with vLLM or Ollama on local GPUs, behind the tool server. Disable outbound internet from the model host for the air-gapped option.

Log every question, tool call, SQL text, row count and answer to an append-only audit table with the EBS user name.

Add drafts first (a requisition or a PO change drafted as text), then approved actions that call ISG REST services or the open interface tables, never direct DML on base tables.

## Sections

### Where the data lives and how to reach it

**Body:**

EBS stores transactional data in Oracle Database schemas per product (INV, PO, AP, GL, ONT, WIP and so on), and the APPS schema holds synonyms and views over them. In 12.2 the application tier uses edition-based redefinition, so what APPS sees as a table is usually an editioning view over a base table whose name ends in a suffix like # (for example the underlying object behind a _ALL table). Query through APPS-level names, not the base objects. Multi-Org tables end in _ALL and carry ORG_ID; the unsuffixed names are secured views that depend on session context set by MO_GLOBAL.

Official integration points are, in rough order of preference for an AI tool server: read-only SQL against documented views on a replica, Integrated SOA Gateway (ISG) REST and SOAP services published from the Integration Repository, the open interface tables (for example MTL_TRANSACTIONS_INTERFACE, PO_HEADERS_INTERFACE, AP_INVOICES_INTERFACE) with their concurrent import programs, and the public PL/SQL APIs listed in the Integration Repository. Business Event System and Workflow are useful for triggers, such as indexing a document when an attachment is added.

**Code:**

-- Read-only tool: on-hand by inventory org (run on the replica)
SELECT msi.segment1 AS item,
       msi.description,
       moq.organization_id,
       SUM(moq.transaction_quantity) AS onhand
FROM   mtl_onhand_quantities_detail moq
JOIN   mtl_system_items_b msi
       ON msi.inventory_item_id = moq.inventory_item_id
      AND msi.organization_id   = moq.organization_id
WHERE  moq.organization_id IN (:allowed_orgs)
  AND  msi.segment1 LIKE :item_prefix || '%'
GROUP BY msi.segment1, msi.description, moq.organization_id
FETCH FIRST 50 ROWS ONLY

# ISG REST call shape (approved write path, after human approval)
POST https://ebs-host:4443/webservices/rest/<service_alias>/<operation>/
Authorization: Basic <service credential>
Content-Type: application/json
{ "<operation>_Input": {
    "RESTHeader": { "Responsibility": "<RESP_KEY>", "RespApplication": "<APP_SHORT>",
                    "SecurityGroup": "STANDARD", "NLSLanguage": "AMERICAN", "Org_Id": "<org>" },
    "InputParameters": { } } }

### Reference architecture

**Body:**

Production EBS ships redo to an Active Data Guard standby opened read-only. The AI stack lives next to that standby: a tool server, a vector index (pgvector, Qdrant or OpenSearch), an embedding model, and the generation model on one or more GPU nodes. The ERP production database sees only redo shipping, not AI queries. If licensing for Active Data Guard is not available, GoldenGate or a nightly Data Pump refresh into a reporting schema are the fallbacks, with the cost that answers are minutes to hours old.

For an air-gapped site the same components run with no route to the internet: model weights, container images and Python wheels are loaded from an internal mirror, and the only inbound path to the tool server is the corporate network or a jump host. Because the model never leaves the building, drawings, quality records and supplier pricing can be indexed without a third-party processing agreement.

### Mirroring EBS security so the assistant never over-shares

**Body:**

EBS security is a combination of responsibilities (FND_USER, FND_USER_RESP_GROUPS_DIRECT, FND_RESPONSIBILITY), function and menu exclusions, the MO: Security Profile profile option for operating units, inventory organization access, and flexfield security rules on accounting segments. The tool server should resolve the asking user's EBS user name from your SSO (EBS can sit behind Oracle Access Manager or another SAML/OIDC provider), then compute the allowed ORG_IDs and organization IDs from those tables, and pass them as bind variables to every tool query.

The same ACL has to travel with indexed documents. Store the entity name and the owning org with each chunk and filter retrieval by the same allowed set before the model sees a single passage. Test with a restricted user and a super user and compare answers; this is the single most important acceptance test. Where you cannot express a rule (for example a complex flexfield security rule), exclude that data from the assistant rather than approximating it.

### Sizing, phasing and honest limits

**Body:**

A mid-sized EBS site with 300 to 1,500 named users usually has a small number of daily active assistant users. A single node with one to two data-centre GPUs running a 30B to 70B-class quantised model typically covers that load, and a second node is added for availability rather than throughput. Index size is driven by attachments and PDFs, not by transactions: budget tens of gigabytes per million pages. Phase 1 is read-only questions on 5 to 10 tools over 6 to 10 weeks; phase 2 adds drafts; phase 3 adds approved actions through ISG or interface tables.

Limits: custom tables and heavily customised flexfield logic need hand-written views; Oracle Database licensing (Active Data Guard) is a real cost; and if all you need is a smarter report, BI Publisher or the vendor's own embedded features may be enough. Questions that need cross-module reasoning over unstructured notes are where a private assistant pays off. Free-form text to SQL against EBS is risky because of the secured views and edition context, so keep it to approved tools.

## Pitfalls

- Querying _ALL tables without an ORG_ID filter leaks other operating units. Always bind allowed orgs from the MO security profile.
- Running the assistant against the production database. Heavy ad-hoc queries compete with concurrent managers and OM/WIP transactions.
- Writing directly into base tables to save time. It bypasses validation, accounting and workflow, and breaks supportability. Use ISG, PL/SQL APIs or open interfaces.
- Forgetting that the 12.2 online patching cycle changes the run edition. Keep the tool server on the APPS views and retest after each adop cycle.
- Indexing attachments without carrying the entity and org ACL, so a user can retrieve a supplier contract chunk they could not open in the Attachments window.

## Ai Angle

ERPray connects to EBS through the read-only layer described here, shows the SQL or service call behind each answer, and applies the asking user's operating unit and responsibility scope. It can answer questions across items, orders, jobs and attached documents on your own hardware, and any proposed change is handed back as a draft for a person to approve in EBS.

## Faq

### Can an LLM read EBS data without Integrated SOA Gateway?

**Answer:** Yes. Read-only SQL against documented views on a replica is often simpler and faster than web services for question answering. ISG is better for approved write actions, because it runs the standard business logic and validations rather than bypassing them.

### Does this require Oracle Active Data Guard?

**Answer:** No, but it is the cleanest option for near-real-time reads. GoldenGate, a logical standby or a scheduled refresh into a reporting database also work, with older data. The key requirement is that the assistant never uses the production APPS schema.

### Will this work on EBS 12.1.3?

**Answer:** The architecture is the same. 12.1.3 has no editioned objects, which simplifies SQL, but ISG REST support and database versions differ, so check the Integration Repository and your patch level before choosing the write path.

### How do we keep ITAR or export-controlled data local?

**Answer:** Run the model, index and tool server inside your own network, with no outbound route, and restrict who can reach them. That lets your organisation apply its own export-control procedures; compliance remains your responsibility and depends on your policies.

## Search terms

add AI to Oracle EBS, Oracle EBS 12.2 AI on-premises, Oracle EBS LLM integration, EBS Integrated SOA Gateway REST AI, Oracle EBS private AI, Oracle EBS chatbot on-prem, Oracle EBS RAG attachments, EBS Active Data Guard reporting AI, air-gapped Oracle EBS AI

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