🏗️ สถาปัตยกรรม — Vimut AI Agent Management Platform

Vendor Cloud (talk2me_pro) เป็นศูนย์กลาง เชื่อม Enterprise ของวิมุต (Vimut App / HIS / SIP) และ Google Workspace — map ว่า component ไหน มีแล้ว (talk2me) / ต่อยอด / gap / dependency · วาดด้วย HTML/CSS ทั้งหมด (self-contained)

หลักการออกแบบ ยึด verified gap analysis

P1

ต่อยอดจากของที่เดินจริง

ใช้ talk2me_pro เป็นแกน (multi-agent, voice, RAG, consent) แล้วสร้างเฉพาะ gap 2 + ต่อยอด 6 — de-risk go-live 90 วัน

P2

สมองเดียว หลายช่องทาง

ทุก channel ไหลเข้า Shared AI Runtime เดียว ground ด้วย KB per agent — คำตอบสอดคล้องทุกช่องทาง

P3

Dependency ผูก gate

HIS / Vimut App / Google Workspace / SIP เชื่อมผ่าน adapter — รับเป็น Mandatory-with-dependency ไม่รับความเสี่ยงนอกมือเรา

P4

Compliance by design

Consent ledger · no-train · PII masking · identity ก่อนเปิด Protected data · display-only guardrail อยู่ในเส้นทางข้อมูลทุกช่องทาง

ภาพรวมสถาปัตยกรรม Vendor Cloud central → Enterprise + Google Workspace

✅ มีแล้ว (talk2me) 🟡 ต่อยอด 🔴 gap สร้างใหม่ ⛓️ dependency (วิมุต/MFEC/Google)
① Channel Gateway ช่องทางเข้า-ออก
LINE OAchat + web voice ผ่าน LIFFมีแล้ว
Web widgetchat + voice (barge-in)มีแล้ว
SIP / Telephonyโทรศัพท์ · IT-desk Ext.22มีแล้ว
Messengerper-char webhook + admin UIมีแล้ว
Google Chat / Emailwebhook connectorมีแล้ว
ทุกช่องทาง → สมองเดียว
🟩 Vendor Cloud — talk2me_pro (ศูนย์กลาง)
② Shared AI Runtime
Gemini voice/chatreal-time · no-train (per-tenant)มีแล้ว
NLU / Dialoguemulti-turn · language-followมีแล้ว
Barge-in / STT-TTSพูดแทรกได้มีแล้ว
Guardrails / Personaper-agent · display-onlyมีแล้ว
③ 5 Business AI Agents
LINE ChatbotAGT-01มีแล้ว
Web ChatbotAGT-02 · POC 495 หมอมีแล้ว
AI IT Help DeskAGT-03 · Pruksa precedentต่อยอด
Appointment ReminderAGT-04 · outboundต่อยอด
Drug TrainingAGT-05/06 · เภสัชกรกำกับgap
④ Knowledge & Data
RAG KB per agentPDF/Excel/CSV + doc versionมีแล้ว
Google Drive connectorKB sync (gap #1)gap
KB column mappingtemplate ก่อน (phase2)ต่อยอด
⑤ Integration & Security Layer
Consent ledger + JITappend-only + timelineมีแล้ว
PII mask · no-train · auditrate limit · monitoringมีแล้ว
Identity / OTP · Human takeoverLive Inbox · Screen Guidance (view-only)ต่อยอด
เชื่อมผ่าน adapter — ผูก dependency-gate
⑥ Enterprise Systems (วิมุต)
Vimut App (MBS)identity / OTP endpointdependency
HISread=มี · write-back=gatedependency
SIP / TelephonyIT Help Desk (Ext.22)dependency
⑦ Google Workspace
DriveKB source + archive/exportdependency
Sheetsescalation task writedependency
Chatwebhook (มีแล้ว)มีแล้ว
อ่านแผน: ทุกช่องทาง (①) เข้า Shared AI Runtime (②) ตัวเดียว → route ไป 5 Business Agents (③) → ตอบจาก Knowledge (④) โดยมี Integration & Security (⑤) คุมทุกการเข้าถึง → เชื่อมออกสู่ Enterprise ของวิมุต (⑥) และ Google Workspace (⑦) ผ่าน adapter ที่ผูก dependency-gate · สีบอกสถานะ: เขียว=มีแล้ว · เหลือง=ต่อยอด · แดง=gap สร้างใหม่ · น้ำเงิน=dependency ฝั่งวิมุต/MFEC/Google

เส้นทางบทสนทนา (ตัวอย่าง: คนไข้ถามคิวหมอ + ขอข้อมูลส่วนตัว) display-only + identity gate

1 · คนไข้ทัก LINE / เว็บ — "หมอกระดูกคิวว่างไหม / ขอดูผลแลป"
2 · Shared AI RuntimeNLU + ค้น RAG KB (แพทย์ 495) — ตอบ FAQ/หาหมอได้เลยมีแล้ว
3 · Tool: doctor availabilitymap ชื่อ→doccode+location → HIS read (DoctorAvailable API)มีแล้ว
ถ้าขอข้อมูลส่วนตัว (Protected)
4 · Identity gateยืนยันตัวตน + ผูก LINE↔HN + consent (step-up)ต่อยอด
5 · HIS read (gated)โชว์เฉพาะ lab Verified + non-confidential + non-pathologydependency
6 · Display-onlyโชว์ได้ · ห้ามตีความ/วินิจฉัย · "ปรึกษาแพทย์"guardrail
เคสเกินขอบเขต
7 · Human takeoverโอนหาเจ้าหน้าที่แบบ live พร้อม context (Live Inbox)มีแล้ว
8 · Escalation taskเขียน task ไป Google Sheet (gap #1)gap
9 · Consent + audit logทุกการเข้าถึงมีร่องรอย (append-only)มีแล้ว
จุดตายด้าน PDPA: HIS API เชื่อ "ผู้เรียก" ล้วน (key ระดับระบบ + HN เดาได้) — ไม่พิสูจน์ว่าใครเป็นเจ้าของ HN ⇒ ขั้น 4 (identity + ผูก LINE↔HN) เป็นภาระของเรา 100% และเป็นเงื่อนไขก่อนโชว์ข้อมูลส่วนตัวใด ๆ

ความพร้อมราย component roll-up จาก Compliance

Componentบทบาทสถานะ
Channel GatewayLINE / Web / SIP / Messenger / Google Chat-Email — สมองเดียว✅ มีแล้ว
Shared AI RuntimeGemini voice/chat · NLU · barge-in · guardrails · no-train✅ มีแล้ว
Agent 1-2 (LINE/Web)Chatbot คนไข้ · POC แพทย์ 495 ท่าน live✅ มีแล้ว
Agent 3 (IT Help Desk)Pruksa IT-desk precedent · ต่อยอด SIP Ext.22 + screen guidance🟡 ต่อยอด
Agent 4 (Reminder)Outbound campaign build แล้ว · ต่อยอด HIS write-back สถานะนัด🟡 ต่อยอด
Agent 5 (Drug Training)ไม่มี approval-gate — ต้อง supervised mode + เภสัชกร🔴 gap #2
RAG KB per agentPDF/Excel/CSV + doc version control (version++/reingest/R2)✅ มีแล้ว
Google Drive/Sheets connectorKB sync + escalation task write + archive/export🔴 gap #1
Consent / no-train / PII / auditconsent ledger + JIT + masking + rate limit + monitoring✅ มีแล้ว
Identity / OTP / Screen GuidanceLIFF anti-spoof + OTP pattern · remote support view-only + metering🟡 ต่อยอด
MFA + RBAC 5 rolesมี 2 roles + ACL · ต่อยอด TOTP + 5-role + lifecycle🟡 ต่อยอด
HIS (read / write-back)read doctor availability = มี · write-back = ต้อง API/spec วิมุต/MFEC⛓️ read มี · write gate
Vimut App / SIPidentity/OTP endpoint · SIP IT-desk — dependency ฝั่งวิมุต⛓️ dependency

Integration: HIS & Vimut App จาก vimut-api-spec-digest.md (MBS)

✅ ใช้ได้แล้ว

HIS read — Doctor availability

Working endpoint (MBS 2026-07-09): POST .../Staging/web/doctoravailable — body {doccode, locationcode, startdate, enddate} คืน slot ครึ่งชั่วโมง. Integration gap: bot มีแค่ชื่อ/สาขาหมอใน KB → ต้อง map ชื่อ → doccode + locationcode ก่อนยิง + guard ไม่พูดรหัสกับคนไข้

🔴 ต้องออกแบบร่วม

ไม่มีเส้นจองนัด · ไม่มีเส้นยืนยันตัวตน

สเปกมีแค่ "ดู slot ว่าง" — การจองจริงต้องมีเส้นเพิ่มหรือจบใน Vimut App · ไม่มีเส้น resolve HN จากบัตร ปชช./เบอร์ → ต้องขอเพิ่ม/ออกแบบร่วม (identity binding เป็นภาระของเรา)

🟡 ประวัติ/ผลตรวจ/บิล

read ได้ แต่ต้อง gate เข้ม

GetPatientHistoryList / Diagnosis / Lab / Drug / Bill — key = HN+VN+VNSeq · ผลแลปมี flag Unverified / isConfidential / isPathology / Abnormal → บอทไม่โชว์ Unverified/Confidential/Pathology โดยไม่มีแพทย์กำกับ

⛔ guardrail

display-only · ห้าม LLM ตีความ

โชว์ผลตรวจได้ แต่ตีความ/แนะนำการรักษาไม่ได้ (ชนกับ no-diagnosis) → บังคับ display-only + "ปรึกษาแพทย์" · MBS ยังไม่มีเงื่อนไข "จ่ายเงินก่อนดูผล" (ถ้าต้องมี = dev เพิ่มฝั่งวิมุต)

Integration: Google Workspace (gap #1) DEP-GATE — ต้องได้สิทธิ์ Google admin

ส่วนสิ่งที่ต้อง buildเงื่อนไข (gate)
Drive KB connectorgoogleapis Drive client + scheduled sync KB จาก folder ที่วิมุตกำหนดservice account + folder policy
Sheets task writeเขียน escalation task พร้อม idempotency + error logpermission scope + duplicate/retry rule
Drive archive/exportexport บทสนทนา/audit ไป folder + retention policyfolder ownership + retention (PDPA)
Google Chat / Emailwebhook connector✅ มีแล้ว
สรุป: Google Workspace เป็น gap สร้างใหม่จริง #1 (ไม่มี googleapis Drive/Sheets client เลย) แต่ทำได้ใน 90 วันถ้าวิมุตยืนยัน Google Workspace access + test folder + permission scope + acceptance dataset ภายในสัปดาห์แรก (ดูกลยุทธ์ DEP-GATE หน้า Gap & Risk).