AI Fabrica — Architecture

Intelligent Grain Trading Management Infrastructure

AI Fabrica is a private laboratory for developing and testing AI solutions. The proposed AI Grain Trading project brings together business records, analytics, documents and specialised agents. This page explains its architecture and the responsibilities of each component.

Target architecture

Target Architecture

Compute Node Roles

Target scheme: dedicated project environment is connected to lab services through managed interfaces. Deployment and isolation of the client environment are designed separately.

01 · Client environment
Users
Protected access to project application
HTTPS
Topton — Security Gateway
Planned roles: firewall, VPN, administration
  • Intel Core i7-13620H
  • 32 GB DDR5
  • 6 × LAN
App access
Thunderobot — Dedicated Project Node
Planned project environment
  • AMD Ryzen AI Max+ 395
  • 16 cores / 32 threads
  • 128 GB LPDDR5X unified
  • Radeon 8060S
  • NVMe 4 TB (planned)
  • App API
  • PostgreSQL / Python calculations
  • Documents and RAG
  • Local inference model
Thunderobot ⇄ authorized job / result ⇄ AI Worker
02 · Additional compute

Select a service by task requirements and load: AIserver or the two GB10 nodes.

Job Queue / AI Worker
Restricted access, only authorized requests

Only minimal necessary data and processing rules are transferred.

AIserver
Heavy inference and processing
  • RTX PRO 6000 Blackwell 96 GB ECC
  • Ryzen 9 7900X
  • 128 GB DDR5
  • NVMe 4 TB

No OS or admin access for callers.

2 × NVIDIA GB10
Each: 128 GB unified memory

Two-node DeepSeek V4 Flash, TP=2; a single inference service.

03 · Management and backup
AI Operator
Development and administration
  • Ryzen 9 9900X
  • 64 GB DDR5
  • V100 32 GB + RX 7800 XT 16 GB
NAS
Netgear, 2 × 4 TB

Target customer backup policy is defined separately.

User requestCompute job / resultAdmin / backup

Users get access only to the project application, not the lab network. The job queue connects the project to additional compute resources; administrative and backup nodes are not on the ordinary inference path.

Software Architecture

Data Flows and Services

Document Processing

  1. OCR and attribute extraction
  2. Embedding and vector search (pgvector candidate)
  3. Result reranking
  4. Version and source control

Financial Calculations

Deterministic SQL modules and Python components. The language model interprets results but does not replace the calculation core.

Model Replaceability

LLM selection is based on quality, context, tool calling, and load, not just size. Replacing the model does not require reworking the application core.

Models and Routing

Confirmed Lab Routes and Project Candidates

Project Candidate

Thunderobot (128 GB unified)

Qwen3.8-Flash-Next is considered a candidate. For the dedicated node, memory with KV cache, parallel load, and chosen runtime still need to be checked. If resources are insufficient, a compact model is selected.

Lab — Confirmed

AIserver (RTX PRO 6000)

Qwen3.8-Flash-Next NVFP4, verified context 262 144. Used for analysis, document work, programming, and tool use when the task fits context and capacity.

The dispatcher accounts for parallel image and video generation tasks; their compute time is planned separately.

Lab — Confirmed

2 × GB10 (TP2)

DeepSeek-V4-Flash-0731 TP2 — baseline for analysing large document collections, context 1 048 576. Route selection is based on quality, context, and load.

Additional

AI Operator (V100 32 GB)

Qwen3.8-27B, already deployed on a 32 GB card. Backup compute capacity, a second review of answers, data extraction and classification where output quality is sufficient.

Candidates

Embedding and RAG

Candidates: Qwen and BGE families. bge-m3 exists in the lab as a fallback. pgvector is a candidate for vector search; exact embedding, reranker, and OCR models are selected after validation on company documents.

An agent role does not necessarily require a separate model: multiple roles may share an inference provider but with isolated context, tools, and permissions. Application business math is deterministic and not performed by LLM. External cloud APIs are not implied; any external data transfer requires approval.

Orchestration

Controlled Processing Loop

1

Request and Policy

Agent role, permitted data, and required tools are defined.

2

Context Preparation

Structured records, calculation results, and relevant documents are prepared.

3

Routing

Data access, size and context headroom, latency, and load are considered. If the local project model is sufficient, it is used; otherwise the request goes through the authorized AI Worker. For long context, DeepSeek is used; for speed, Flash when it fits.

4

Execution and Validation

Format, numerical results, sources, and tool outcomes are validated.

5

Return to Employee

Logging; employee grants permission for writes, payments, and contract changes.

Management Example

A manager asks why a trade margin fell. The process coordinator calls the structured data and calculation service, retrieves documents via RAG, and the router selects an adequate local model or an authorised lab compute service based on context and load. The model writes explanations with sources, and the employee authorizes any change. The coordinator handles business steps and tool calls; the model router chooses compute explicitly. Proposed reliability rule: bounded retries, timeouts, and no duplicate business writes.

Multi-Agent System

AI Agents

Initial Stage

Executive AI Analyst

Input: management queries

Tools: SQL, RAG

Output: analytical summaries

Authority: read-only

Trade Checker

Input: contracts, operations

Tools: ERP modules

Output: deviation alerts

Authority: read, notify

Document Processor

Input: scans, PDFs

Tools: OCR, extraction

Output: structured data

Authority: draft write

Report Generator

Input: data, templates

Tools: Excel, Word, PDF

Output: ready documents

Authority: file creation

Future Roles

AI CFO — analyzes liquidity, cash flows, debt, and funding costs; produces a management briefing.

AI Commercial Analyst — evaluates deal, supplier, and buyer performance; prepares a comparative analysis of commercial terms.

AI Logistics Manager — monitors shipments, timing, and costs; generates delay and cost overrun alerts.

AI Legal Counsel — reviews contracts for risky terms; prepares a draft document for legal review.

AI Controller and Auditor — independently verifies documents, calculations, and rules; produces an exception report without modifying data.

AI Secretary — manages tasks and messages; prepares a draft administrative summary.

AI Operations Coordinator — monitors process states and routes tasks; escalates deviations.

An agent role does not necessarily require a separate model: multiple roles can share a common service but use different tools and permissions. Critical actions (payments, contracts) require human approval. The auditor only reads and checks, never modifies data.

Workflow Scenarios

Use Cases

1. Incoming Document

The document undergoes OCR and attribute extraction. The system cross-references data with contracts and deals, validates completeness and correctness. After employee approval, data is imported into the ERP.

2. Management Query

The system retrieves structured data and runs software calculations to address the management question. RAG retrieves related documents so the basis of the answer can be checked; missing data is explicitly identified.

3. Deviation

When a deviation is detected, the coordinator prepares an alert with the necessary evidence. An authorised employee makes the decision. Full coordination of end-to-end processes belongs to a later development stage.

Reliability and Scaling

Operational Principles

Security

  • Separation of user and admin permissions
  • Isolated environments per customer
  • Operation logging
  • Backup and restore testing

Performance

  • Tests under overload and node unavailability
  • Actual capacity determined by results
  • Independent task workers

Scaling

  • Vertical — node upgrades
  • Horizontal — adding AI Workers
  • Model — different models for different tasks
  • Commercial — separate environments for clients

The job queue transfers only authorized tasks and the minimum necessary data volume. End users have no access to additional GPU servers. When load, complexity, or timeout thresholds are exceeded, the router transfers tasks to additional resources. The model service is isolated from business logic and can be replaced. Independent workers do not require a single shared model across all nodes.

NAS storage and replication do not by themselves ensure service continuity. Acceptable data loss, recovery times and service redundancy must be defined for the project and checked through restore tests.