VirtualKimi commited on
Commit
12f7734
Β·
verified Β·
1 Parent(s): 798bcc6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +431 -421
README.md CHANGED
@@ -1,421 +1,431 @@
1
- <div align="center">
2
-
3
- <b>Virtual Kimi</b>
4
-
5
- [![Open Source](https://img.shields.io/badge/Open%20Source-GitHub-brightgreen?style=flat-square&logo=github)](https://github.com/virtualkimi)
6
- [![No Commercial Use](https://img.shields.io/badge/No%20Commercial%20Use-%F0%9F%9A%AB-red?style=flat-square)](#license)
7
-
8
- </div>
9
-
10
- # Virtual Kimi - AI Companion Application πŸ’–
11
-
12
- Web-based AI companion girlfriends featuring adaptive personalities, intelligent memory systems, and immersive conversational experiences.
13
-
14
- ## Overview
15
-
16
- Virtual Kimi is an advanced virtual companion application that combines modern web technologies with state-of-the-art AI models to create meaningful, evolving relationships between users and AI girlfriend personalities.
17
-
18
- - **Lightweight:** ~600 KB of pure JavaScript, HTML, and CSS (no frameworks)
19
- - **Local-first:** All data is stored in your browser's IndexedDB (managed by Dexie.js)
20
- - **No tracking:** The only external calls are to FontAwesome (for icons) and the OpenRouter API (for AI)
21
-
22
- Built with vanilla JavaScript and modern web APIs, it offers a rich, responsive experience across devices.
23
-
24
- ---
25
-
26
- ## 🌐 Support & Links
27
-
28
- - **Website**: [virtualkimi.com](https://virtualkimi.com)
29
- - **Email**: [[email protected]](ijohn@virtualkimi.com)
30
- - **X (Twitter)**: [x.com/virtualkimi](https://x.com/virtualkimi)
31
- - **GitHub**: [github.com/virtualkimi](https://github.com/virtualkimi)
32
- - **HuggingFace**: [huggingface.co/VirtualKimi](https://huggingface.co/VirtualKimi)
33
- - **YouTube**: [YouTube Channel](https://www.youtube.com/@VirtualKimi)
34
-
35
- - **Support the project**: [ko-fi.com/virtualkimi](https://ko-fi.com/virtualkimi)
36
- _If you like this project or want to help me (I'm currently without a permanent job), you can buy me a coffee or make a donation. Every bit helps keep Virtual Kimi alive and evolving!_
37
-
38
- - **ETH Wallet**: 0x836C9D2e605f98Bc7144C62Bef837627b1a9C30c
39
-
40
- ---
41
-
42
- ## Key Features
43
-
44
- ### πŸ€– **Advanced AI Integration**
45
-
46
- **Available recommended models and pricing for Openrouter (per 1M tokens):**
47
-
48
- - **Mistral-small-3.2**: 0.05$ input, 0.1$ output (128k context)
49
- - **Nous Hermes Llama 3.1 70B**: 0.1$ input, 0.28$ output (131k context)
50
- - **Cohere Command-R-08-2024**: 0.15$ input, 0.6$ output (131k context)
51
- - **Qwen3-235b-a22b-think**: 0.13$ input, 0.6$ output (262k context)
52
- - **Grok 3 mini**: 0.3$ input, 0.5$ output (131k context)
53
- - **Nous Hermes Llama 3.1 405B**: 0.7$ input, 0.8$ output (131k context)
54
- - **Anthropic Claude 3 Haiku**: 0.25$ input, 1.25$ output (131k context)
55
- - **Local Model (Ollama)**: 0$ input, 0$ output (4k context, runs offline β€” _experimental, not fully functional yet_)
56
-
57
- ### πŸ‘₯ **Multiple AI Personalities**
58
-
59
- - **Kimi**: Cosmic dreamer and astrophysicist with ethereal sensibilities
60
- - **Bella**: Nurturing botanist who sees people as plants needing care
61
- - **Rosa**: Chaotic prankster thriving on controlled chaos
62
- - **Stella**: Digital artist transforming reality through pixelated vision
63
-
64
- ### Personality Trait Ranges
65
-
66
- All personality traits operate on a 0-100 scale:
67
-
68
- - **Affection**: Emotional warmth and attachment
69
- - **Playfulness**: Fun-loving and spontaneous behavior
70
- - **Intelligence**: Analytical and thoughtful responses
71
- - **Empathy**: Understanding and emotional support
72
- - **Humor**: Wit and lighthearted interactions
73
- - **Romance**: Romantic and intimate expressions
74
-
75
- ### 🧠 **Intelligent Memory System**
76
-
77
- - Automatic extraction and categorization of conversation memories
78
- - Seven memory categories: Personal, Preferences, Relationships, Activities, Goals, Experiences, Events
79
- - Persistent memory across sessions with search and management capabilities
80
- - Character-specific memory isolation
81
-
82
- ### πŸ’« **Dynamic Personality Evolution**
83
-
84
- - Six personality traits that evolve based on interactions:
85
- - Affection, Playfulness, Intelligence, Empathy, Humor, Romance
86
- - Real-time trait adjustments based on conversation tone and content
87
- - Visual personality indicators and progression tracking
88
- - Intelligent model selection and switching
89
- - Real-time emotion detection and analysis
90
- - Contextually-aware responses
91
-
92
- ### 🎬 **Emotion-Driven Visual Experience**
93
-
94
- - Real-time video responses matching detected emotions
95
- - Smooth transitions between emotional states
96
- - Character-specific visual libraries with 50+ video clips
97
- - Context-aware video selection system
98
-
99
- ### 🎨 **Customizable Interface**
100
-
101
- - Five professionally designed themes
102
- - Adjustable interface transparency
103
- - Responsive design optimized for desktop, tablet, and mobile
104
- - Accessibility features and keyboard navigation
105
-
106
- ### 🌍 **Multilingual Support**
107
-
108
- - Full localization in 7 languages: English, French, Spanish, German, Italian, Japanese, Chinese
109
- - Automatic language detection from user input
110
- - Culturally-aware responses and emotion keywords
111
-
112
- ### πŸ”Œ **Extensible Plugin System**
113
-
114
- - Theme plugins for visual customization (currently, only the color theme plugin is functional)
115
- - Voice plugins for speech synthesis options (planned)
116
- - Behavior plugins for personality modifications (planned)
117
- - Secure plugin loading with validation
118
-
119
- ### πŸ›‘οΈ **Security & Privacy**
120
-
121
- - Input validation and sanitization
122
- - Secure API key handling
123
- - Local data storage with IndexedDB
124
- - No server dependencies for core functionality
125
-
126
- ## πŸ—οΈ Technical Architecture
127
-
128
- ### 🧩 Core Technologies
129
-
130
- - **Frontend**: Vanilla JavaScript (ES6+), HTML5, CSS3
131
- - **Database**: IndexedDB with Dexie.js
132
- - **AI Integration**: OpenRouter API
133
- - **Speech**: Web Speech API
134
- - **Audio**: Web Audio API
135
-
136
- ---
137
-
138
- ## ✨ Inspiration & Assets
139
-
140
- This project was originally inspired by the [JackyWine GitHub repository](https://github.com/Jackywine).
141
- @Jackywine on X (Twitter)
142
-
143
- The four main characters are visually based on images from four creators on X (Twitter):
144
-
145
- - @JulyFox33 (Kimi)
146
- - @BelisariaNew (Bella)
147
- - @JuliAIkiko (Rosa and Stella)
148
-
149
- All character videos were generated using the image-to-video AI from Kling.ai, specifically with the Kling v2.1 model.
150
-
151
- Get 50% bonus Credits in your first month with this code referral 7BR9GT2WQ6JF - link: [https://klingai.com](https://klingai.com/h5-app/invitation?code=7BR9GT2WQ6JF)
152
-
153
- ---
154
-
155
- ### πŸ—‚οΈ Module Structure
156
-
157
- ```
158
-
159
- β”œβ”€β”€ Core System
160
- β”‚ β”œβ”€β”€ kimi-script.js # Main initialization
161
- β”‚ β”œβ”€β”€ kimi-database.js # Data persistence layer
162
- β”‚ β”œβ”€β”€ kimi-config.js # Configuration management
163
- β”‚ └── kimi-security.js # Security utilities
164
- β”œβ”€β”€ AI & Memory
165
- β”‚ β”œβ”€β”€ kimi-llm-manager.js # LLM integration
166
- β”‚ β”œβ”€β”€ kimi-emotion-system.js # Emotion analysis
167
- β”‚ β”œβ”€β”€ kimi-memory-system.js # Intelligent memory
168
- β”‚ └── kimi-memory-ui.js # Memory interface
169
- β”œβ”€β”€ Interface & Media
170
- β”‚ β”œβ”€β”€ kimi-appearance.js # Theme management
171
- β”‚ β”œβ”€β”€ kimi-voices.js # Speech synthesis
172
- β”‚ β”œβ”€β”€ kimi-utils.js # Utility classes
173
- β”‚ └── kimi-module.js # Core functions
174
- β”œβ”€β”€ Localization
175
- β”‚ └── kimi-locale/ # Translation files
176
- └── Extensions
177
- └── kimi-plugins/ # Plugin system
178
-
179
- ```
180
-
181
- ### Data Flow
182
-
183
- 1. **Input Processing**: User input β†’ Security validation β†’ Language detection
184
- 2. **AI Analysis**: Emotion detection β†’ Memory extraction β†’ LLM processing
185
- 3. **Response Generation**: Personality-aware response β†’ Emotion mapping β†’ Visual selection
186
- 4. **Memory Update**: Trait evolution β†’ Memory storage β†’ UI synchronization
187
-
188
- ## Installation & Setup
189
-
190
- ### Prerequisites
191
-
192
- - Modern web browser (Chrome, Edge, Firefox recommended)
193
- - OpenRouter API key (optional but recommended for full functionality)
194
-
195
- ### Quick Start
196
-
197
- 1. **Clone the repository**
198
-
199
- ```bash
200
- git clone https://github.com/virtualkimi/virtual-kimi.git
201
- cd virtual-kimi
202
- ```
203
-
204
- 2. **Open the application**
205
-
206
- - Open `index.html` in your web browser
207
- - Or serve via local web server for optimal performance:
208
- ```bash
209
- python -m http.server 8000
210
- # Navigate to http://localhost:8000
211
- ```
212
-
213
- 3. **Configure API access**
214
-
215
- - Open Settings β†’ AI & Models
216
- - Add your OpenRouter API key
217
- - Select preferred AI model
218
-
219
- 4. **Customize your experience**
220
- - Choose a character in Personality tab
221
- - Enable memory system in Data tab
222
- - Adjust themes in Appearance tab
223
-
224
- ### Production Deployment
225
-
226
- For production deployment, ensure:
227
-
228
- - HTTPS is enabled (required for microphone access)
229
- - Gzip compression for assets
230
- - Proper cache headers
231
- - CSP headers for enhanced security
232
-
233
- ## βš™οΈ Configuration
234
-
235
- ### API Integration
236
-
237
- The application supports multiple AI providers through OpenRouter:
238
-
239
- - Mistral models
240
- - Nous Hermes models
241
- - Qwen3 models
242
- - Open-source alternatives
243
-
244
- ### Memory System Configuration
245
-
246
- ```javascript
247
- // Memory categories can be customized
248
- const memoryCategories = [
249
- "personal", // Personal information
250
- "preferences", // Likes and dislikes
251
- "relationships", // People and connections
252
- "activities", // Hobbies and activities
253
- "goals", // Aspirations and plans
254
- "experiences", // Past events
255
- "important" // Significant moments
256
- ];
257
- ```
258
-
259
- ## πŸ› οΈ Development
260
-
261
- ### Project Structure
262
-
263
- ```
264
- virtual-kimi/
265
- β”œβ”€β”€ index.html # Main application
266
- β”œβ”€β”€ virtualkimi.html # Landing page
267
- β”œβ”€β”€ kimi-*.js # Core modules
268
- β”œβ”€β”€ kimi-locale/ # Localization
269
- β”œβ”€β”€ kimi-plugins/ # Plugin examples
270
- β”œβ”€β”€ kimi-videos/ # Character videos
271
- β”œβ”€β”€ kimi-icons/ # Character assets
272
- └── docs/ # Documentation
273
- ```
274
-
275
- ### Adding New Features
276
-
277
- #### Creating a New Plugin
278
-
279
- ```javascript
280
- // manifest.json
281
- {
282
- "name": "Custom Theme",
283
- "version": "1.0.0",
284
- "type": "theme",
285
- "style": "theme.css",
286
- "main": "theme.js",
287
- "enabled": true
288
- }
289
- ```
290
-
291
- > **Note:** As of version 1.0, only the color theme plugin is fully functional. Voice and behavior plugins are planned for future releases. See `kimi-plugins/sample-theme/` for a working example.
292
-
293
- #### Extending Memory Categories
294
-
295
- ```javascript
296
- // Add to kimi-memory-system.js
297
- const customCategory = {
298
- name: "custom",
299
- icon: "fas fa-star",
300
- keywords: ["keyword1", "keyword2"],
301
- confidence: 0.7
302
- };
303
- ```
304
-
305
- ### Health Check System
306
-
307
- The application includes a comprehensive health check system:
308
-
309
- ```javascript
310
- // Run health check
311
- const healthCheck = new KimiHealthCheck();
312
- const report = await healthCheck.runAllChecks();
313
- console.log(report.status); // 'HEALTHY' or 'NEEDS_ATTENTION'
314
- ```
315
-
316
- ## Browser Compatibility
317
-
318
- | Browser | Voice Recognition | Full Features | Notes |
319
- | ----------- | ----------------- | ------------- | ------------------------- |
320
- | Chrome 90+ | βœ… | βœ… | Recommended |
321
- | Edge 90+ | βœ… | βœ… | Optimal voice performance |
322
- | Firefox 88+ | ⚠️ | βœ… | Limited voice support |
323
- | Safari 14+ | ⚠️ | βœ… | iOS limitations |
324
-
325
- ## Performance
326
-
327
- ### Optimization Features
328
-
329
- - Lazy loading of non-critical modules
330
- - Efficient batch database operations
331
- - Debounced UI interactions
332
- - Memory management with cleanup
333
- - Optimized video preloading
334
-
335
- ### Resource Usage
336
-
337
- - Memory footprint: ~15-30MB active usage
338
- - Storage: Scales with conversation history
339
- - Network: API calls only, no tracking
340
- - CPU: Minimal background processing
341
-
342
- ## Privacy & Security
343
-
344
- ### Data Handling
345
-
346
- - All data stored locally in browser
347
- - No telemetry or analytics
348
- - API keys encrypted in local storage
349
- - User content never sent to external servers (except chosen AI provider)
350
-
351
- ### Security Measures
352
-
353
- - Input validation and sanitization
354
- - XSS protection
355
- - Safe plugin loading
356
- - Secure API communication
357
-
358
- ## Troubleshooting
359
-
360
- ### Common Issues
361
-
362
- - **Microphone not working**: Ensure HTTPS and browser permissions
363
- - **API errors**: Verify OpenRouter key and model availability
364
- - **Performance issues**: Clear browser cache, check available memory
365
- - **Memory system not learning**: Ensure system is enabled in Data tab
366
-
367
- ## Contributing
368
-
369
- We welcome contributions! Please see our contributing guidelines:
370
-
371
- 1. Fork the repository
372
- 2. Create a feature branch
373
- 3. Make your changes with appropriate tests
374
- 4. Submit a pull request with detailed description
375
-
376
- ### Development Guidelines
377
-
378
- - Follow existing code style and patterns
379
- - Add comments for complex functionality
380
- - Test across multiple browsers
381
- - Update documentation for new features
382
-
383
- ## πŸ”„ TODO / Roadmap
384
-
385
- - [ ] Full support for local models (Ollama integration, offline mode)
386
- - [ ] Voice plugin system (custom voices, TTS engines)
387
- - [ ] Behavior plugin system (custom AI behaviors)
388
- - [ ] Better advanced memory management UI
389
- - [ ] More character personalities and backgrounds
390
- - [ ] In-app onboarding and help system
391
- - [ ] Enhanced mobile experience (UI/UX)
392
- - [ ] More granular privacy controls
393
- - [ ] User profile and persistent settings sync (optional)
394
- - [ ] Community plugin/theme sharing platform
395
- - [ ] Improved error reporting and diagnostics
396
- - [ ] Accessibility improvements (screen reader, contrast, etc.)
397
- - [ ] Automated testing and CI/CD pipeline
398
- - [ ] Documentation in multiple languages
399
- - [ ] Performance profiling and optimization for large histories
400
- - [ ] Create new character videos better matching specific contexts
401
- - [ ] Improve emotion and context logic
402
- - [ ] Enhance memory management and logic
403
-
404
- ---
405
-
406
- ## πŸ“œ License
407
-
408
- This project is distributed under a custom license. **Any commercial use, resale, or monetization of this application or its derivatives is strictly prohibited without the explicit written consent of the author.**
409
-
410
- See the [LICENSE](LICENSE) file for details.
411
-
412
- [![Open Source](https://img.shields.io/badge/Open%20Source-GitHub-brightgreen?style=flat-square&logo=github)](https://github.com/virtualkimi)
413
- [![No Commercial Use](https://img.shields.io/badge/No%20Commercial%20Use-%F0%9F%9A%AB-red?style=flat-square)](#license)
414
-
415
- ---
416
-
417
- **Virtual Kimi** - Creating meaningful connections between humans and AI, one conversation at a time.
418
-
419
- > _"Love is the most powerful code"_ πŸ’•
420
- >
421
- > β€” 2025 Virtual Kimi - Created with πŸ’œ by Jean & Kimi
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail
3
+ title: Virtual Kimi - AI Companion App πŸ’–
4
+ sdk: static
5
+ emoji: 😻
6
+ colorFrom: indigo
7
+ colorTo: purple
8
+ pinned: true
9
+ short_description: AI companion girlfriends with adaptive personalities
10
+ ---
11
+ <div align="center">
12
+
13
+ <b>Virtual Kimi</b>
14
+
15
+ [![Open Source](https://img.shields.io/badge/Open%20Source-GitHub-brightgreen?style=flat-square&logo=github)](https://github.com/virtualkimi)
16
+ [![No Commercial Use](https://img.shields.io/badge/No%20Commercial%20Use-%F0%9F%9A%AB-red?style=flat-square)](#license)
17
+
18
+ </div>
19
+
20
+ # Virtual Kimi - AI Companion Application πŸ’–
21
+
22
+ Web-based AI companion girlfriends featuring adaptive personalities, intelligent memory systems, and immersive conversational experiences.
23
+
24
+ ## Overview
25
+
26
+ Virtual Kimi is an advanced virtual companion application that combines modern web technologies with state-of-the-art AI models to create meaningful, evolving relationships between users and AI girlfriend personalities.
27
+
28
+ - **Lightweight:** ~600 KB of pure JavaScript, HTML, and CSS (no frameworks)
29
+ - **Local-first:** All data is stored in your browser's IndexedDB (managed by Dexie.js)
30
+ - **No tracking:** The only external calls are to FontAwesome (for icons) and the OpenRouter API (for AI)
31
+
32
+ Built with vanilla JavaScript and modern web APIs, it offers a rich, responsive experience across devices.
33
+
34
+ ---
35
+
36
+ ## 🌐 Support & Links
37
+
38
+ - **Website**: [virtualkimi.com](https://virtualkimi.com)
39
40
+ - **X (Twitter)**: [x.com/virtualkimi](https://x.com/virtualkimi)
41
+ - **GitHub**: [github.com/virtualkimi](https://github.com/virtualkimi)
42
+ - **HuggingFace**: [huggingface.co/VirtualKimi](https://huggingface.co/VirtualKimi)
43
+ - **YouTube**: [YouTube Channel](https://www.youtube.com/@VirtualKimi)
44
+
45
+ - **Support the project**: [ko-fi.com/virtualkimi](https://ko-fi.com/virtualkimi)
46
+ _If you like this project or want to help me (I'm currently without a permanent job), you can buy me a coffee or make a donation. Every bit helps keep Virtual Kimi alive and evolving!_
47
+
48
+ - **ETH Wallet**: 0x836C9D2e605f98Bc7144C62Bef837627b1a9C30c
49
+
50
+ ---
51
+
52
+ ## Key Features
53
+
54
+ ### πŸ€– **Advanced AI Integration**
55
+
56
+ **Available recommended models and pricing for Openrouter (per 1M tokens):**
57
+
58
+ - **Mistral-small-3.2**: 0.05$ input, 0.1$ output (128k context)
59
+ - **Nous Hermes Llama 3.1 70B**: 0.1$ input, 0.28$ output (131k context)
60
+ - **Cohere Command-R-08-2024**: 0.15$ input, 0.6$ output (131k context)
61
+ - **Qwen3-235b-a22b-think**: 0.13$ input, 0.6$ output (262k context)
62
+ - **Grok 3 mini**: 0.3$ input, 0.5$ output (131k context)
63
+ - **Nous Hermes Llama 3.1 405B**: 0.7$ input, 0.8$ output (131k context)
64
+ - **Anthropic Claude 3 Haiku**: 0.25$ input, 1.25$ output (131k context)
65
+ - **Local Model (Ollama)**: 0$ input, 0$ output (4k context, runs offline β€” _experimental, not fully functional yet_)
66
+
67
+ ### πŸ‘₯ **Multiple AI Personalities**
68
+
69
+ - **Kimi**: Cosmic dreamer and astrophysicist with ethereal sensibilities
70
+ - **Bella**: Nurturing botanist who sees people as plants needing care
71
+ - **Rosa**: Chaotic prankster thriving on controlled chaos
72
+ - **Stella**: Digital artist transforming reality through pixelated vision
73
+
74
+ ### Personality Trait Ranges
75
+
76
+ All personality traits operate on a 0-100 scale:
77
+
78
+ - **Affection**: Emotional warmth and attachment
79
+ - **Playfulness**: Fun-loving and spontaneous behavior
80
+ - **Intelligence**: Analytical and thoughtful responses
81
+ - **Empathy**: Understanding and emotional support
82
+ - **Humor**: Wit and lighthearted interactions
83
+ - **Romance**: Romantic and intimate expressions
84
+
85
+ ### 🧠 **Intelligent Memory System**
86
+
87
+ - Automatic extraction and categorization of conversation memories
88
+ - Seven memory categories: Personal, Preferences, Relationships, Activities, Goals, Experiences, Events
89
+ - Persistent memory across sessions with search and management capabilities
90
+ - Character-specific memory isolation
91
+
92
+ ### πŸ’« **Dynamic Personality Evolution**
93
+
94
+ - Six personality traits that evolve based on interactions:
95
+ - Affection, Playfulness, Intelligence, Empathy, Humor, Romance
96
+ - Real-time trait adjustments based on conversation tone and content
97
+ - Visual personality indicators and progression tracking
98
+ - Intelligent model selection and switching
99
+ - Real-time emotion detection and analysis
100
+ - Contextually-aware responses
101
+
102
+ ### 🎬 **Emotion-Driven Visual Experience**
103
+
104
+ - Real-time video responses matching detected emotions
105
+ - Smooth transitions between emotional states
106
+ - Character-specific visual libraries with 50+ video clips
107
+ - Context-aware video selection system
108
+
109
+ ### 🎨 **Customizable Interface**
110
+
111
+ - Five professionally designed themes
112
+ - Adjustable interface transparency
113
+ - Responsive design optimized for desktop, tablet, and mobile
114
+ - Accessibility features and keyboard navigation
115
+
116
+ ### 🌍 **Multilingual Support**
117
+
118
+ - Full localization in 7 languages: English, French, Spanish, German, Italian, Japanese, Chinese
119
+ - Automatic language detection from user input
120
+ - Culturally-aware responses and emotion keywords
121
+
122
+ ### πŸ”Œ **Extensible Plugin System**
123
+
124
+ - Theme plugins for visual customization (currently, only the color theme plugin is functional)
125
+ - Voice plugins for speech synthesis options (planned)
126
+ - Behavior plugins for personality modifications (planned)
127
+ - Secure plugin loading with validation
128
+
129
+ ### πŸ›‘οΈ **Security & Privacy**
130
+
131
+ - Input validation and sanitization
132
+ - Secure API key handling
133
+ - Local data storage with IndexedDB
134
+ - No server dependencies for core functionality
135
+
136
+ ## πŸ—οΈ Technical Architecture
137
+
138
+ ### 🧩 Core Technologies
139
+
140
+ - **Frontend**: Vanilla JavaScript (ES6+), HTML5, CSS3
141
+ - **Database**: IndexedDB with Dexie.js
142
+ - **AI Integration**: OpenRouter API
143
+ - **Speech**: Web Speech API
144
+ - **Audio**: Web Audio API
145
+
146
+ ---
147
+
148
+ ## ✨ Inspiration & Assets
149
+
150
+ This project was originally inspired by the [JackyWine GitHub repository](https://github.com/Jackywine).
151
+ @Jackywine on X (Twitter)
152
+
153
+ The four main characters are visually based on images from four creators on X (Twitter):
154
+
155
+ - @JulyFox33 (Kimi)
156
+ - @BelisariaNew (Bella)
157
+ - @JuliAIkiko (Rosa and Stella)
158
+
159
+ All character videos were generated using the image-to-video AI from Kling.ai, specifically with the Kling v2.1 model.
160
+
161
+ Get 50% bonus Credits in your first month with this code referral 7BR9GT2WQ6JF - link: [https://klingai.com](https://klingai.com/h5-app/invitation?code=7BR9GT2WQ6JF)
162
+
163
+ ---
164
+
165
+ ### πŸ—‚οΈ Module Structure
166
+
167
+ ```
168
+
169
+ β”œβ”€β”€ Core System
170
+ β”‚ β”œβ”€β”€ kimi-script.js # Main initialization
171
+ β”‚ β”œβ”€β”€ kimi-database.js # Data persistence layer
172
+ β”‚ β”œβ”€β”€ kimi-config.js # Configuration management
173
+ β”‚ └── kimi-security.js # Security utilities
174
+ β”œβ”€β”€ AI & Memory
175
+ β”‚ β”œβ”€β”€ kimi-llm-manager.js # LLM integration
176
+ β”‚ β”œβ”€β”€ kimi-emotion-system.js # Emotion analysis
177
+ β”‚ β”œβ”€β”€ kimi-memory-system.js # Intelligent memory
178
+ β”‚ └── kimi-memory-ui.js # Memory interface
179
+ β”œβ”€β”€ Interface & Media
180
+ β”‚ β”œβ”€β”€ kimi-appearance.js # Theme management
181
+ β”‚ β”œβ”€β”€ kimi-voices.js # Speech synthesis
182
+ β”‚ β”œβ”€β”€ kimi-utils.js # Utility classes
183
+ β”‚ └── kimi-module.js # Core functions
184
+ β”œβ”€β”€ Localization
185
+ β”‚ └── kimi-locale/ # Translation files
186
+ └── Extensions
187
+ └── kimi-plugins/ # Plugin system
188
+
189
+ ```
190
+
191
+ ### Data Flow
192
+
193
+ 1. **Input Processing**: User input β†’ Security validation β†’ Language detection
194
+ 2. **AI Analysis**: Emotion detection β†’ Memory extraction β†’ LLM processing
195
+ 3. **Response Generation**: Personality-aware response β†’ Emotion mapping β†’ Visual selection
196
+ 4. **Memory Update**: Trait evolution β†’ Memory storage β†’ UI synchronization
197
+
198
+ ## Installation & Setup
199
+
200
+ ### Prerequisites
201
+
202
+ - Modern web browser (Chrome, Edge, Firefox recommended)
203
+ - OpenRouter API key (optional but recommended for full functionality)
204
+
205
+ ### Quick Start
206
+
207
+ 1. **Clone the repository**
208
+
209
+ ```bash
210
+ git clone https://github.com/virtualkimi/virtual-kimi.git
211
+ cd virtual-kimi
212
+ ```
213
+
214
+ 2. **Open the application**
215
+
216
+ - Open `index.html` in your web browser
217
+ - Or serve via local web server for optimal performance:
218
+ ```bash
219
+ python -m http.server 8000
220
+ # Navigate to http://localhost:8000
221
+ ```
222
+
223
+ 3. **Configure API access**
224
+
225
+ - Open Settings β†’ AI & Models
226
+ - Add your OpenRouter API key
227
+ - Select preferred AI model
228
+
229
+ 4. **Customize your experience**
230
+ - Choose a character in Personality tab
231
+ - Enable memory system in Data tab
232
+ - Adjust themes in Appearance tab
233
+
234
+ ### Production Deployment
235
+
236
+ For production deployment, ensure:
237
+
238
+ - HTTPS is enabled (required for microphone access)
239
+ - Gzip compression for assets
240
+ - Proper cache headers
241
+ - CSP headers for enhanced security
242
+
243
+ ## βš™οΈ Configuration
244
+
245
+ ### API Integration
246
+
247
+ The application supports multiple AI providers through OpenRouter:
248
+
249
+ - Mistral models
250
+ - Nous Hermes models
251
+ - Qwen3 models
252
+ - Open-source alternatives
253
+
254
+ ### Memory System Configuration
255
+
256
+ ```javascript
257
+ // Memory categories can be customized
258
+ const memoryCategories = [
259
+ "personal", // Personal information
260
+ "preferences", // Likes and dislikes
261
+ "relationships", // People and connections
262
+ "activities", // Hobbies and activities
263
+ "goals", // Aspirations and plans
264
+ "experiences", // Past events
265
+ "important" // Significant moments
266
+ ];
267
+ ```
268
+
269
+ ## πŸ› οΈ Development
270
+
271
+ ### Project Structure
272
+
273
+ ```
274
+ virtual-kimi/
275
+ β”œβ”€β”€ index.html # Main application
276
+ β”œβ”€β”€ virtualkimi.html # Landing page
277
+ β”œβ”€β”€ kimi-*.js # Core modules
278
+ β”œβ”€β”€ kimi-locale/ # Localization
279
+ β”œβ”€β”€ kimi-plugins/ # Plugin examples
280
+ β”œβ”€β”€ kimi-videos/ # Character videos
281
+ β”œβ”€β”€ kimi-icons/ # Character assets
282
+ └── docs/ # Documentation
283
+ ```
284
+
285
+ ### Adding New Features
286
+
287
+ #### Creating a New Plugin
288
+
289
+ ```javascript
290
+ // manifest.json
291
+ {
292
+ "name": "Custom Theme",
293
+ "version": "1.0.0",
294
+ "type": "theme",
295
+ "style": "theme.css",
296
+ "main": "theme.js",
297
+ "enabled": true
298
+ }
299
+ ```
300
+
301
+ > **Note:** As of version 1.0, only the color theme plugin is fully functional. Voice and behavior plugins are planned for future releases. See `kimi-plugins/sample-theme/` for a working example.
302
+
303
+ #### Extending Memory Categories
304
+
305
+ ```javascript
306
+ // Add to kimi-memory-system.js
307
+ const customCategory = {
308
+ name: "custom",
309
+ icon: "fas fa-star",
310
+ keywords: ["keyword1", "keyword2"],
311
+ confidence: 0.7
312
+ };
313
+ ```
314
+
315
+ ### Health Check System
316
+
317
+ The application includes a comprehensive health check system:
318
+
319
+ ```javascript
320
+ // Run health check
321
+ const healthCheck = new KimiHealthCheck();
322
+ const report = await healthCheck.runAllChecks();
323
+ console.log(report.status); // 'HEALTHY' or 'NEEDS_ATTENTION'
324
+ ```
325
+
326
+ ## Browser Compatibility
327
+
328
+ | Browser | Voice Recognition | Full Features | Notes |
329
+ | ----------- | ----------------- | ------------- | ------------------------- |
330
+ | Chrome 90+ | βœ… | βœ… | Recommended |
331
+ | Edge 90+ | βœ… | βœ… | Optimal voice performance |
332
+ | Firefox 88+ | ⚠️ | βœ… | Limited voice support |
333
+ | Safari 14+ | ⚠️ | βœ… | iOS limitations |
334
+
335
+ ## Performance
336
+
337
+ ### Optimization Features
338
+
339
+ - Lazy loading of non-critical modules
340
+ - Efficient batch database operations
341
+ - Debounced UI interactions
342
+ - Memory management with cleanup
343
+ - Optimized video preloading
344
+
345
+ ### Resource Usage
346
+
347
+ - Memory footprint: ~15-30MB active usage
348
+ - Storage: Scales with conversation history
349
+ - Network: API calls only, no tracking
350
+ - CPU: Minimal background processing
351
+
352
+ ## Privacy & Security
353
+
354
+ ### Data Handling
355
+
356
+ - All data stored locally in browser
357
+ - No telemetry or analytics
358
+ - API keys encrypted in local storage
359
+ - User content never sent to external servers (except chosen AI provider)
360
+
361
+ ### Security Measures
362
+
363
+ - Input validation and sanitization
364
+ - XSS protection
365
+ - Safe plugin loading
366
+ - Secure API communication
367
+
368
+ ## Troubleshooting
369
+
370
+ ### Common Issues
371
+
372
+ - **Microphone not working**: Ensure HTTPS and browser permissions
373
+ - **API errors**: Verify OpenRouter key and model availability
374
+ - **Performance issues**: Clear browser cache, check available memory
375
+ - **Memory system not learning**: Ensure system is enabled in Data tab
376
+
377
+ ## Contributing
378
+
379
+ We welcome contributions! Please see our contributing guidelines:
380
+
381
+ 1. Fork the repository
382
+ 2. Create a feature branch
383
+ 3. Make your changes with appropriate tests
384
+ 4. Submit a pull request with detailed description
385
+
386
+ ### Development Guidelines
387
+
388
+ - Follow existing code style and patterns
389
+ - Add comments for complex functionality
390
+ - Test across multiple browsers
391
+ - Update documentation for new features
392
+
393
+ ## πŸ”„ TODO / Roadmap
394
+
395
+ - [ ] Full support for local models (Ollama integration, offline mode)
396
+ - [ ] Voice plugin system (custom voices, TTS engines)
397
+ - [ ] Behavior plugin system (custom AI behaviors)
398
+ - [ ] Better advanced memory management UI
399
+ - [ ] More character personalities and backgrounds
400
+ - [ ] In-app onboarding and help system
401
+ - [ ] Enhanced mobile experience (UI/UX)
402
+ - [ ] More granular privacy controls
403
+ - [ ] User profile and persistent settings sync (optional)
404
+ - [ ] Community plugin/theme sharing platform
405
+ - [ ] Improved error reporting and diagnostics
406
+ - [ ] Accessibility improvements (screen reader, contrast, etc.)
407
+ - [ ] Automated testing and CI/CD pipeline
408
+ - [ ] Documentation in multiple languages
409
+ - [ ] Performance profiling and optimization for large histories
410
+ - [ ] Create new character videos better matching specific contexts
411
+ - [ ] Improve emotion and context logic
412
+ - [ ] Enhance memory management and logic
413
+
414
+ ---
415
+
416
+ ## πŸ“œ License
417
+
418
+ This project is distributed under a custom license. **Any commercial use, resale, or monetization of this application or its derivatives is strictly prohibited without the explicit written consent of the author.**
419
+
420
+ See the [LICENSE](LICENSE) file for details.
421
+
422
+ [![Open Source](https://img.shields.io/badge/Open%20Source-GitHub-brightgreen?style=flat-square&logo=github)](https://github.com/virtualkimi)
423
+ [![No Commercial Use](https://img.shields.io/badge/No%20Commercial%20Use-%F0%9F%9A%AB-red?style=flat-square)](#license)
424
+
425
+ ---
426
+
427
+ **Virtual Kimi** - Creating meaningful connections between humans and AI, one conversation at a time.
428
+
429
+ > _"Love is the most powerful code"_ πŸ’•
430
+ >
431
+ > β€” 2025 Virtual Kimi - Created with πŸ’œ by Jean & Kimi