LifeSpan AI Coworker

Chatbot · WhatsApp · CRM Assistant

or
🏥 LifeSpan AI Coworker· LAiC

📋 Logging — Agent Status & AI Answer Queue

สถานะ/เหตุการณ์ของ WhatsApp Agent ในช่องของคุณ · คิวคำถามค้าง (ปิดงานเองเมื่อ AI/พนักงานตอบ)

Dashboard

LifeSpan Birth Chatbot-CRM overview

👥
Total contacts
💬
Total messages
📅
Messages today
📱
WhatsApp online

💬 Recent conversations

PhoneNameStageMessagesLast
Loading…

🎓 Global Knowledge Training

พนักงานสอน AI ผ่าน WhatsApp Channel-2 → บันทึกลง DB → Compile เป็น version → เลือกใช้งาน

📋 วิธีสอน พนักงานทักเข้า Channel-2 (+66829946741) แล้วพิมพ์ format ใด format หนึ่ง

ผลไม่เกิดทันที — บทเรียนจะถูกเก็บไว้ ต้อง Compile เป็น version ใหม่แล้วเลือกใช้ก่อน AI ถึงจะใช้

🇹🇭 ไทย
--- Instance Training: Global Knowledge (LifeSpan Birth) ---
ถ้าคำตอบถูกต้อง (Positive):
- แนะนำเพิ่ม: <เพิ่มเติม>  หรือ  no comment
ถ้าคำตอบไม่ถูกต้อง (Negative):
- ตัวอย่างคำตอบที่ถูก: <คำตอบที่ถูก>
--- End Instance Training ---
🇬🇧 English
--- Instance Training: Global Knowledge (LifeSpan Birth) ---
If the answer is correct (Positive):
- suggest adding: <extra>  or  No comment
If the answer is incorrect (Negative):
- example of the correct answer: <correct>
--- End Instance Training ---

📦 Versions (เลือก 1 ตัวเป็น active — ตัวที่ AI ใช้จริง)

รอ compile: – รายการ
— กด refresh —

👥 ใครสอนเข้ามาบ้าง (แยกตามผู้สอน)

👨‍🏫 ผู้สอนเบอร์จำนวนบทเรียนล่าสุด

📝 Instance Training List (บทเรียนทั้งหมดจาก DB)

#👨‍🏫 ผู้สอน👍 ถูก / แนะนำเพิ่ม👎 ผิด → ✏️ ที่ถูกดูเวลาver

💬 แชทของฉัน

บทสนทนา WhatsApp ของสายที่คุณดูแล — บอททำงานเบื้องหลังตลอดแม้คุณ logout

ยังไม่มีบทสนทนา
เลือกบทสนทนาจากด้านซ้าย
💬
ข้อความจะแสดงที่นี่

WhatsApp Channels

Click "Pair / Show QR" on a channel → scan with the WhatsApp app (Settings → Linked Devices → Link a Device)

⚠️ Use clinic-dedicated numbers only · never message people who did not contact you first (reduces ban risk)

🔗 User Mapping — team ↔ WhatsApp line (admin only)

Team memberWhatsApp lineLabel

Contacts

Patients who chat via WhatsApp — auto-synced to SignifyCRM

PhoneNameStageSignifyCRM IDMessages

Team & Roles

Permissions: CEO / Manager / Sale

➕ Add team member

👑 Admin Panel

NameEmailRoleActions

Admins manage the system only — no WhatsApp line, no API key, not in the mapping list

👥 Team (Sale / Manager)

NameEmailRoleAPI KeyActions

🔗 API keys let SignifyCRM call in as that user (header X-API-Key) — see endpoints in the Integration tab

Web RAG (Qdrant)

Website knowledge the bot uses to answer patients

🌐 Ingest a web page

Two shared KBs — the bot uses the KB assigned per contact (🤖 button in chat). Personal KBs live in the Knowledge tab.

Integration

SignifyCRM connection and system info

🌐 Global AI System Prompt (base identity of every bot — admin only)

Layering: Global prompt → Clinic Info → user Persona → user System Prompt → Skills → RAG

📍 Clinic Info / ข้อมูลสาขา (ต่อท้าย prompt เสมอ — เก็บใน Postgres ไม่พึ่ง RAG)

ที่ตั้ง เบอร์ เวลาทำการ ลิงก์แผนที่ ฯลฯ — AI ใช้ตอบได้แม้เครดิต embedding หมด · มีหลายสาขา → เขียนกฎให้ AI ถามก่อนส่งลิงก์

🔎 ตัวอย่าง System Prompt เต็ม (ที่ AI เห็นจริง — รวมทุกชั้น)

รวม Global + Clinic + Persona + System Prompt สาย + Skills (ยังไม่รวม RAG ที่ดึงตอนตอบจริง)

🔌 Model Providers (API key ของ LLM — แก้ได้ที่นี่ ไม่ต้องแก้ .env)

ตั้ง API key ต่อ provider — เก็บใน DB (ถ้าเว้นว่างจะใช้ค่าจาก env เดิม) · มีผลทันทีกับการเรียก AI/embeddings

🔗 Chat Server API for SignifyCRM (auth: per-user X-API-Key header)

GET /api/v1/meUser info + available WhatsApp lines
GET /api/v1/chatsConversation list (user's lines only)
GET /api/v1/chats/{phone}?account=hermes-NMessages in a conversation
POST /api/v1/chat/send {phone, message, account?}Send a message (queued in outbox)
Webhook (us → SignifyCRM)POST message.received events to the user's Webhook URL (set in Team tab → edit)

Base URL: https://lifespan-cowork.ant2cloud.com · Issue API keys: Team tab → "🔗 Issue key"

⚙️ System

Legacy inboundPOST /api/signify/inbound PUBLIC_API_KEY
Server[email protected] · /opt/dockers/chatbot-crm