AI Worker Gateway

How the AI Worker Gateway works

Architecture, the path of a job from request to SAP, and how every write-back is approved, checked and confirmed.

The idea

For most companies today, business AI means sending company data to a commercial AI service and paying per request, with no end date. Yet many of the most valuable AI tasks are not live chats. They are background jobs: reconciling bank transactions, checking invoices, following up overdue payments, preparing month-end reports.

The YUNIT AI Worker Gateway is a single entry point that your SAP, Odoo and in-house applications send this work to. It wakes up a self-hosted language model in a public cloud such as Google Cloud, AWS or Azure. The model works through the queue with controlled access to your business tools, the results are stored, and the machine shuts down again. A lightweight replication worker without AI then transfers the stored results back to your systems through the backend APIs defined for each job type.

Architecture

The gateway keeps four questions apart: who may request work, which model does the thinking, which systems the AI may touch, and through which backend APIs the results flow back. The return path is defined per job type in the gateway, so a reconciliation result can go to your accounting API and a report to your document store. Models and infrastructure can be replaced without changing the systems that send the work.

Your business systems

SAP S/4HANA
Odoo
Custom apps & SaaS
Send job

AI Worker Gateway

Always on · lightweight

  • Access control
  • Job queue
  • Model routing
  • Direct route for structured jobs · no AI
  • Result routing per job type
  • Cost tracking
Wake on demand

Your cloud account · EU region

AI worker

Self-hosted open-weight LLM, started only when there is work

Deterministic toolset

No AI · versioned rules

The AI only chooses which tool to call. Rules outside the model check the inputs and calculate the result.

  • Finance engine Exact decimal arithmetic for VAT, cash position and receivables
  • SAP SD decisions Delivery billing, availability, pricing, returns and credit memos
  • SAP FI decisions Clearing, journals, payments, tax, FX valuation, dunning, closing
  • Semantic validation Figures come from the trusted source system, not from the model
  • Authorisation policy Tenant, company code and permitted actions checked outside the model
  • ERP APIs & databases Governed access to SAP, Odoo and SQL data

Outcome: propose, hold or escalate. Never posts, clears or pays on its own.

Results & audit log

Every result checked, stored and traceable

Replication worker · no AI

Transfers stored results back through the backend APIs defined for the job type

Results written back via the backend APIs defined per job type

Lifecycle of every job

  1. 1 Job arrives
  2. 2 AI worker starts
  3. 3 AI works with your tools
  4. 4 Results checked and stored
  5. 5 AI worker shuts down No idle cost
  6. 6 Replication worker writes results back

From proposal to SAP: approval and write-back

Five of the jobs above end in a proposal that changes data in SAP: billing, credit memos, clearing, dunning and payment runs. Nothing is written until a person approves it. After approval, a replication worker without AI carries out exactly what was approved and confirms the result in SAP.

  • 1. Proposal ready: the job stores the proposal and notifies the approvers configured for that job type. Each item shows the amount, the source documents, the rule applied and the reason.
  • 2. Independent approval: an authorised approver other than the person who requested the job approves or rejects the proposal. Above set amount limits, further approvers sign off in a fixed order.
  • 3. Re-check at approval: permissions are checked again, the source documents are re-read from SAP and the decision is recalculated. If anything changed since the proposal, or the approval has expired, the job goes back to review instead of writing.
  • 4. Write-back without AI: the replication worker reserves the affected accounts and documents so no other job can change them at the same time, records its intent, and sends exactly the approved items through the SAP interface approved for that job type.
  • 5. Confirmation and reconciliation: the worker waits for SAP's confirmation, reads the new documents back and compares them with what was approved. A missing confirmation is never resent automatically; the job is flagged for reconciliation instead.
  • 6. Audit and stop: every step is written to a tamper-evident audit trail, and an emergency stop halts all further write-backs at any time.

What happens per job after approval

JobWho approvesWhat happens in SAP after approval
Billing due-list checkSales back office approves the list of deliveries to billBilling documents are created for exactly the approved deliveries. The new document numbers are read back and linked to the job; deliveries that changed in the meantime go back to review.
Returns and credit memo reviewReturns or credit manager approves each credit memo; above the set amount, finance approves as wellCredit memos are created with reference to the original invoice and posted to the customer account. Credits already issued are checked again, so nothing is credited twice.
Bank matching and open-item clearingAccounts receivable approves the matched payments and invoicesSAP posts the clearing documents through the asynchronous journal entry clearing interface. Invoices and payments are read back as cleared; differences are never written off automatically.
Dunning proposalCredit control approves the proposal per customer and dunning levelThe SAP dunning run issues notices only for the approved items and raises their dunning level. Items paid, disputed or blocked since the proposal go back to review.
Payment run preparationAccounts payable and a finance manager approve; amount limits decide how many approvers are neededThe SAP payment run posts payments for the approved invoices only and creates the payment file. Sending the file to the bank stays in your existing bank approval process.

Write-back for journal posting, clearing and reversal is implemented and tested against a simulated SAP system. Billing, credit memo, dunning and payment write-back use the same approval, re-check and confirmation chain and are connected to the SAP interfaces of your system during the pilot.