№ 47
MemoryChat là nền tảng nhắn tin AI-native được phát triển nhằm tạo ra trải nghiệm giao tiếp thông minh, nơi AI có khả năng ghi nhớ và hiểu mối quan hệ dài hạn với từng người dùng.
Kiến trúc hệ thống:
Frontend: Next.js 15 với React 19, TypeScript, TailwindCSS, sử dụng shadcn/ui (Base UI) làm component library, Zustand cho state management phía client và TanStack Query cho server state Backend: FastAPI (Python) với kiến trúc clean architecture, sử dụng SQLAlchemy ORM + Alembic cho database migrations, Pydantic cho data validation Database: PostgreSQL 15 chạy trong Docker container Vector Database: Qdrant Cloud cho semantic search và AI memory storage AI Layer: LangGraph framework để orchestrate các AI agent, kết hợp với LangChain, sử dụng OpenAI GPT-4o-mini làm LLM Real-time: WebSocket (FastAPI WebSockets) cho messaging tức thì Background Jobs: APScheduler cho các tác vụ nền như scheduled notifications DevOps: Docker Compose cho containerization, CI/CD với GitHub Actions Các tính năng chính:
Real-time Chat - Nhắn tin tức thời với WebSocket, hỗ trợ đầy đủ conversation lifecycle AI Memory - Tự động trích xuất và lưu trữ thông tin quan trọng về contact (sở thích, công việc, sự kiện) vào vector database Semantic Search - Tìm kiếm ngữ nghĩa trên lịch sử chat và contact info AI Copilot - Trợ lý AI gợi ý reply, phân tích sentiment, tóm tắt cuộc trò chuyện Smart Recommendations - Đề xuất follow-up, gợi ý tags, phân loại priority cho messages Social Alerts - Thông báo proactive về birthdays, anniversaries và các sự kiện quan trọng Các AI Agent trong hệ thống:
Orchestrator Agent - Điều phối và routing requests giữa các agents Memory Agent - Quản lý trí nhớ dài hạn, trích xuất entities và facts từ conversations Social Agent - Xử lý social context, relationship analysis và proactive recommendations Đóng góp và bảo mật:
JWT authentication với bcrypt password hashing Rate limiting với slowapi Structured logging với structlog Prometheus metrics cho monitoring