-
Notifications
You must be signed in to change notification settings - Fork 0
Home
xtosutosu edited this page Apr 12, 2026
·
2 revisions
Welcome to the MonikAI wiki! Here you'll find everything you need to know about the architecture, structure, and operation of this project.
- System Overview โ You are here
- Architecture - How everything connects
- Backend - Python documentation
- Frontend - React documentation
- Integrations - Minecraft, Spotify, Telegram, etc.
- Progression System - Achievements, quests, personality
- API Reference - All endpoints
- Setup & Installation - How to run the project
- Development Guide - How to contribute
- Troubleshooting - Problem solving
MonikAI is an advanced AI system with personality, built around the Gemini 2.5 Live API. It combines:
- ๐๏ธ Conversational AI - Natural voice/text conversations
- ๐ซ Dynamic Personality - Mood, affection, energy changing over time
- ๐ฏ Progression System - 9 connected systems (relationships, quests, achievements, unlocks, narrative)
- ๐ฎ Game Integrations - Minecraft bot with autonomy
- ๐ต Media Integrations - Spotify awareness, Telegram bridge
- ๐ Smart Home - Control TP-Link devices
- ๐ Advanced Memory - JSONL + SQLite FTS for episodic memories
- ๐ Multi-Platform - Desktop (Electron), Web, Telegram
| Feature | Description |
|---|---|
| Personality System | Dynamic personality state (mood, affection, energy, comfort, synergy, intimacy) |
| Progression Track | 9 systems: profile, metrics, quests, achievements, unlocks, narrative, activities, briefing, seasonal |
| Memory Engine | Episodic memory with FTS indexing in SQLite, organized into pages and topics |
| Real-time Communication | Socket.IO WebSocket for instant audio/text output |
| Tool Ecosystem | Web automation, skills system, external service integrations |
| Autonomous Agents | Minecraft bot, Spotify, Telegram, Kasa smart home |
| Local-First | Entire operation offline, optional cloud integrations |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ELECTRON DESKTOP APP (React 18 + Vite) โ
โ - Socket.IO client โ
โ - MediaPipe (face auth, gestures) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PYTHON BACKEND (FastAPI + Socket.IO Server) โ
โ - Gemini 2.5 Live API โ
โ - AI engines (personality, memory, etc.) โ
โ - Tool execution โ
โ - Service integrations โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ NODE.JS MINECRAFT BOT (Optional subprocess) โ
โ - Mineflayer for Minecraft automation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Frontend Stack:
- React 18.2, Vite 7.3, Socket.IO, Tailwind CSS, Framer Motion, MediaPipe
Backend Stack:
- Python 3.10+, FastAPI, Uvicorn, Socket.IO-Python
- Google Gemini 2.5 API (native audio), PyAudio, OpenCV, Playwright, SQLite
Desktop:
- Electron 40.1, electron-builder
Mobile Bridge:
- Telegram Bot API
monikai/
โโโ backend/
โ โโโ core/ # Server, AI engine, session manager
โ โโโ ai/ # 9 progression engines, memory, personality
โ โโโ agents/ # External service managers
โ โโโ integrations/ # Minecraft, Spotify, Telegram
โ โโโ state/ # State tracking
โ โโโ tools/ # Tool definitions
โ โโโ audio/ # Audio I/O
โ โโโ data/ # User data, sessions, memory
โ
โโโ frontend/
โ โโโ src/
โ โโโ components/ # React components
โ โโโ contexts/ # Context providers
โ โโโ hooks/ # Custom hooks
โ โโโ layout/ # Layout components
โ โโโ styles/ # Global styles
โ โโโ config/ # Configuration
โ
โโโ scripts/ # Migration, setup scripts
โโโ skills/ # Integration skills
โโโ .github/wiki/ # Wiki documentation (YOU ARE HERE)
โ
โโโ package.json, requirements.txt, vite.config.js, etc.
User speaks โ Frontend captures audio โ Socket.IO sends to Backend
Backend routes to Gemini 2.5 Live API โ Streaming response received
Personality engine analyzes message โ Progression system observes
โ RelationshipMetrics +XP
โ QuestSystem checks completion
โ AchievementTracker triggers unlocks
โ NarrativeEngine checks story milestones
If tool requested โ Execute (web automation, skills, integrations)
Audio response โ Socket.IO back to Frontend
State changes โ HTTP updates for progression
Notifications โ For achievements/quests
| Component | Location | Description |
|---|---|---|
| Gemini Live Loop | backend/core/monikai.py |
Main AI engine |
| Personality Engine | backend/ai/personality.py |
Personality state management |
| Progression Coordinator | backend/ai/integrated_progression_system.py |
Coordinator of 9 systems |
| Memory Storage | backend/ai/memory_engine.py |
JSONL + SQLite FTS |
| Session Manager | backend/core/session_manager.py |
Conversation persistence |
| FastAPI Server | backend/core/server.py |
REST API + WebSocket hub |
| Frontend Audio | src/components/ChatModule.jsx |
Conversation interface |
| Minecraft Agent | backend/agents/minecraft_agent.py |
Bot manager |
| Spotify Manager | backend/agents/spotify_manager.py |
OAuth + API |
| Telegram Bot | backend/agents/telegram_bot.py |
Mobile bridge |
Everything is stored locally in the data/ folder:
data/
โโโ sessions/ # Conversation logs (JSONL)
โโโ user_memory/ # Profile, metrics, achievements
โโโ memory/ # Episodic memory entries
โโโ quests/ # Quest templates
โโโ achievements/ # Achievement definitions
โโโ stories/ # Narrative sequences
โโโ unlocks/ # Content unlock requirements
โโโ seasonal_events/ # Holiday/calendar events
- Setup: Go to Setup & Installation to run the project
- Understand Architecture: Read Architecture Guide
- Contributing: Go to Development Guide
- Issues: Check Troubleshooting
If something is unclear or you need more information, open a GitHub Issue or review this wiki more carefully.
Last Updated: April 2026
MonikAI ยฉ 2026 | GitHub | Issues | Discussions