SOLUTION
Xã giao AI · Nhân vật đồng hành
Chat 1-1 với nhân vật, phòng nhiều nhân vật, khoảnh khắc, kinh tế quà tặng và an toàn — tự triển khai trọn vẹn
The challenge
Làm sản phẩm đồng hành AI phải cùng lúc giải quyết nền IM, bộ máy nhân vật, bộ nhớ, tuân thủ an toàn và kiếm tiền — tự xây từ đầu mất hơn nửa năm, mà vẫn không theo kịp nhịp của nền tảng.
Engine architecture built for character social
| Design point | How it works | What you get |
|---|---|---|
| Character engine | Persona + long-term memory + relationship summaries, one runtime per character | Characters remember and have personality — not stateless prompts |
| Auto-banter | After a reply, the floor passes to another character (random pick), capped by depth + budget | One human line and the characters chat among themselves |
| Moment generation | Scheduled per character with daily caps, output guard + safety classifier | Characters have their own feed — a retention hook that brings users back |
| Gift economy | Catalog pricing + row-locked wallet transactions + idempotent per-message charging | Monetization loop where credits never drift |
| Safety guardrails | Fail-closed word lists + LLM six-risk semantic classifier (observe-only mode available) | Minor / self-harm / criminal content is blocked — with a calibration period first |
| Deployment shape | One Go binary, PostgreSQL + Redis; shares the foundation with the CS edition | Deploy standalone or combined, no lock-in |
How Balala helps
Chat 1-1 với nhân vật: nhân cách + trí nhớ dài hạn + phản hồi streaming
Phòng nhiều nhân vật: theo @mention + tự tiếp lời + nhân vật trò chuyện lẫn nhau
Khoảnh khắc nhân vật: tự đăng + like + AI trả lời bình luận + tip
Kinh tế quà tặng: giá theo danh mục + ví tín dụng + trừ tiền idempotent
Nhân vật do người dùng tạo (UGC): nhân bản từ mẫu + giới hạn theo từng người dùng
Tin nhắn chủ động: nhân vật chủ động chào khi DM im ắng một thời gian
Rào an toàn LLM: phân loại ngữ nghĩa sáu nhóm rủi ro + từ điển từ khóa canh gác
Đa backend tương thích OpenAI / DeepSeek / Dify / Coze