The Modular Blueprint: Assembling the Decoupled AI Architecture

Five episodes ago, we started with a simple problem: AI agents crashing production systems because nobody had thought about isolation.

This is the final episode. Here is how all the pieces fit together, and why the architecture matters more than any single model you will ever rent.

This is the final episode of Pragmatic AI for Operations, a series designed to bring architectural discipline to generative AI projects on the Factory floor.

Decoupling the Core

The core principle that guides this entire architecture is simple: the ERP must remain stupid, rigid, and safe.

Your enterprise software is the system of record. It handles transaction integrity, financial compliance, and mathematical calculations. It must remain deterministic.

If we inject probabilistic AI directly into the core database, we compromise the stability of our entire system. I truly hope this is clear by now.

The solution is to separate reasoning from recording. We keep the core standardized and execute the reasoning at the edge.

Therefore: the agent works at the edge, and the core never moves.

The Composable Pieces

Over the last five weeks, we have defined the building blocks of this decoupled system:

  • The Autonomous Agent: The central orchestration engine that receives a high-level goal, breaks it down into tasks, and coordinates tool execution.
  • The Model Context Protocol (MCP): The universal connection layer that standardizes how the agent communicates with local files, databases, and APIs without custom connectors.
  • The Retrieval Strategy: Combining Vector RAG for unstructured document search with Graph RAG to traverse the explicit relationships of your business data.
  • The Security Firewall: Offloading database queries to a synchronized read replica and running local models behind your private network firewall.

Here is what this looks like when a real request hits the system.

Composable Architecture in Action

Imagine a customer service team working in the warehouse bay.

A sales coordinator receives an urgent email from a key client requesting 500 specialized steel brackets by Friday. The client needs to know if the warehouse can fulfill the request, and if any expedited fees apply.

Instead of checking multiple systems, the coordinator delegates the goal to the AI agent.

Here is how the architecture processes the request in the background:

Step 1: Querying the Database (Read Replica & Graph RAG)

The agent initiates an inquiry through the database MCP server. It connects to the ERP read replica to check current inventory.

Active stock is zero. However, using Graph RAG, the agent traverses the production schedule and identifies a manufacturing order for 1,000 brackets in progress, scheduled for completion on Thursday.

The agent calculates that 500 brackets can be reallocated to meet the Friday deadline.

Step 2: Checking the Contract (Vector RAG & Filesystem MCP)

Next, the agent needs to verify pricing. It calls the filesystem MCP server to access the customer’s contract PDF in a local drive.

Using Vector RAG, the agent searches the document for shipping and pricing clauses. It extracts an expedited order surcharge term specifying a 25% price increase for orders processed with less than five days of notice.

Step 3: Tool Execution & Notification (MCP Integration)

The agent compiles the database inventory facts and the contract pricing clauses into a structured summary.

It triggers an MCP tool to send a drafted reply to the sales coordinator on their communication dashboard. The draft includes the exact stock availability, the updated pricing with the 25% surcharge, and links to the relevant PDF contract clauses.

Step 4: The Human-in-the-Loop Gateway

The coordinator reviews the proposal on their screen. They confirm the reallocation of the production order is acceptable and click the approval button.

This is the only point in the entire workflow where a human being is required. The agent knows exactly what to post. But writing to a live transactional database is irreversible. A misallocated production order, a wrong surcharge, a blocked customer account: the cost of a silent error on the assembly line is always higher than the few seconds it takes a human to confirm.

The gate exists by design.

Step 5: Writing to the Core (Deterministic Validation)

Once approved, the system takes the finalized order data and pushes it securely to the ERP to execute the transaction.

The ERP database executes its standard, deterministic validation checks: verifying customer credit limits, checking item status, and validating order structures.

Because the inputs are correct, the ERP posts the sales order as a draft. The transactional database remains clean and protected throughout the process.

The Architectural Benefits

Deploying this modular architecture delivers three concrete advantages that IT teams can bring to any budget conversation:

First, you eliminate custom integration debt. Because all connections run through the Model Context Protocol, you do not write bespoke code for every database or file format. Your connectors are standard and reusable.

Second, you protect your system upgrades.

When your ERP vendor releases a software update, you can install it without fear of breaking your AI workflows. The core database has not been customized with AI-specific tables. The system of record remains standard.

Third, you guarantee absolute data sovereignty.

Because the agent retrieves data from a local read replica and processes it using a local model behind your firewall, no sensitive customer data is shared with external vendor APIs.

Your production volumes, your supplier pricing, your warehouse layout: none of it leaves the building. In an industry where your order pipeline is a competitive asset, keeping it inside your infrastructure is an architectural decision, not a configuration option.

Composable Edge

Forget any plug-and-play AI pitch. Real operational intelligence is built by wiring standard models into your specific business logic, one layer at a time.

Keep the core deterministic. Build the reasoning at the edge. Never let a probabilistic model touch a transactional table without a human gate in between.

You need the database to remains stable. The intelligence must live at the edge.

That is what pragmatic AI for operations means to me. You don’t wait for the perfect model to deploy. You build the right architecture around the one you already have. And when a new model will be more interesting for you to evaluate, you are just going to swap it without touching anything you already built before.

Written by Andrea Guaccio 

July 30, 2026