Koopa.ai Agentic AI Architect Calendar Contact

(04) Proof of work

Stock reconciliation gateway

Daily SAP-to-warehouse stock reconciliation with automatic ticketing and AI root-cause diagnosis. The code does the maths; the model only chooses what to check.

库存对账网关

每天核对 SAP 与仓库系统的库存,自动开单,并用 AI 诊断根因。算术由代码完成,模型只负责选择检查项。

庫存對帳閘道

每天核對 SAP 與倉儲系統的庫存,自動開單,並以 AI 診斷根本原因。算術由程式完成,模型只負責選擇檢查項目。

SAPDataversePythonAI diagnosis

What it is

A backend that compares inventory between the ERP system and the warehouse system every night, raises a ticket for every discrepancy, and keeps those tickets up to date until the stock agrees again.

An AI diagnosis step then explains each discrepancy in business terms, so support staff know what to check before they open a single screen.

What it does

  • Extracts stock from the ERP and the warehouse database, normalises both, and compares them on a configurable key.
  • Creates, updates and closes discrepancy tickets in the case system automatically, with a full case history and audit log.
  • Produces a full report and an action report as spreadsheets, and emails them to the right people per customer.
  • Diagnoses root causes with a family of detectors (timing, lot swaps, status mismatches and more) and writes a note on the ticket.
  • Serves several customers from one install, each with its own configuration.

How it works

  1. A scheduled task runs the comparison after the day's movements have settled.
  2. Discrepancies are matched against open tickets: new ones are created, resolved ones closed, recurring ones never reopened but raised afresh.
  3. For each ticket under investigation, the model picks checks from a fixed menu; Python runs the checks and computes the numbers.
  4. The model never calculates: if it fails, a deterministic playbook runs the same checks in a fixed order.
  5. A support user can request a fresh diagnosis from the app; a queue picks it up within the hour.

Design choices

  • The code does the maths, the model does the reasoning: every figure in a diagnosis note is computed, not generated.
  • A command-line tool with one subcommand per job, so operations can run, check and re-run any step by hand.
  • Unit tests for the comparison rules and the ticket scenarios, plus a doctor command that checks every connection before go-live.
  • Built against a written specification with a phase-by-phase checklist, and a cybersecurity go-live checklist with evidence.

Stack

PythonSAP RFCMicrosoft SQL ServerMicrosoft DataverseopenpyxlWindows Task SchedulerLocal LLM via LiteLLM

这是什么

一个后台服务:每晚比对 ERP 系统与仓库系统的库存,为每一处差异开工单,并持续更新这些工单,直到库存重新一致。

随后由 AI 诊断步骤用业务语言解释每处差异,支持人员在打开任何系统界面之前就知道该查什么。

它能做什么

  • 从 ERP 和仓库数据库提取库存,分别标准化后按可配置的键比对。
  • 在工单系统里自动创建、更新和关闭差异工单,附完整的处理历史和审计日志。
  • 生成完整报表和待办报表(电子表格),按客户发给对应的人。
  • 用一组检测器(时间差、批次互换、状态不一致等)诊断根因,并把结论写在工单上。
  • 一套安装服务多个客户,每个客户各有自己的配置。

如何运作

  1. 计划任务在当天的出入库结算之后运行比对。
  2. 差异与未关闭的工单匹配:新差异开新单,已解决的关单,重复出现的不重开旧单而是新开一单。
  3. 对每张待查工单,模型从固定菜单里挑选检查项;Python 执行检查并计算数字。
  4. 模型从不做计算:一旦它失败,确定性的预案会按固定顺序跑同样的检查。
  5. 支持人员可在应用里申请重新诊断,队列会在一小时内处理。

设计取舍

  • 代码算数,模型推理:诊断说明里的每个数字都是算出来的,不是生成的。
  • 命令行工具每个任务一个子命令,运维可以手动运行、检查和重跑任何一步。
  • 比对规则和工单场景都有单元测试,另有“体检”命令在上线前检查每一条连接。
  • 按书面规格和分阶段清单构建,并带有附证据的网络安全上线清单。

技术栈

PythonSAP RFCMicrosoft SQL ServerMicrosoft DataverseopenpyxlWindows Task SchedulerLocal LLM via LiteLLM

這是什麼

一個後端服務:每晚比對 ERP 系統與倉儲系統的庫存,為每一處差異開工單,並持續更新這些工單,直到庫存重新一致。

接著由 AI 診斷步驟以業務語言解釋每處差異,支援人員在打開任何系統畫面之前就知道該查什麼。

它能做什麼

  • 從 ERP 與倉儲資料庫擷取庫存,分別正規化後依可設定的鍵值比對。
  • 在工單系統裡自動建立、更新與關閉差異工單,附完整的處理歷程與稽核日誌。
  • 產生完整報表與待辦報表(試算表),依客戶寄給對應的人。
  • 用一組偵測器(時間差、批號互換、狀態不一致等)診斷根本原因,並把結論寫在工單上。
  • 一套安裝服務多個客戶,每個客戶各有自己的設定。

如何運作

  1. 排程工作在當天的出入庫結算之後執行比對。
  2. 差異與未關閉的工單比對:新差異開新單,已解決的結案,重複出現的不重開舊單而是新開一單。
  3. 對每張待查工單,模型從固定清單裡挑選檢查項目;Python 執行檢查並計算數字。
  4. 模型從不做計算:一旦它失敗,確定性的作業手冊會依固定順序跑同樣的檢查。
  5. 支援人員可在應用程式裡申請重新診斷,佇列會在一小時內處理。

設計取捨

  • 程式算數,模型推理:診斷說明裡的每個數字都是算出來的,不是生成的。
  • 命令列工具每個工作一個子命令,維運可以手動執行、檢查與重跑任何一步。
  • 比對規則與工單情境都有單元測試,另有「健檢」命令在上線前檢查每一條連線。
  • 依書面規格與分階段清單建置,並附有含證據的資安上線清單。

技術堆疊

PythonSAP RFCMicrosoft SQL ServerMicrosoft DataverseopenpyxlWindows Task SchedulerLocal LLM via LiteLLM

(07) Contact

Let's talk