Copyright Β© Belkis Aslani
Create your perfect digital twin through natural conversation.
K.Ai is the app for Digital Immortality. As intuitive as TikTok, but with sophisticated AI running underneath. Users simply chat with the AI β which asks questions back β and gradually, a perfect digital clone emerges.
- Invisible Authentication: FaceID/TouchID, Google, Apple Sign-In (no passwords!)
- Zero-Knowledge Encryption: Your conversations are encrypted client-side. Even we can't read them.
- 10-Agent AI Swarm: Specialized AI agents work together to capture your essence
- Convergence Score: Real-time percentage showing how complete your digital twin is
- Budget-Based Scaling: Single slider from "Standard Clone" to "High-Fidelity Clone"
Location: /mobile/
- Framework: Flutter 3.x (iOS & Android)
- Auth: Firebase Authentication + Biometrics
- State: Riverpod
- Animations: flutter_animate (60fps)
- Encryption: AES-256-GCM (client-side)
Screens:
SplashScreen: Instant login if user existsLoginScreen: Minimalist auth (FaceID/Google/Apple only)ChatScreen: Main conversational interfaceConvergenceIndicator: Shows % completion
Location: /backend/
- Framework: FastAPI
- Database: PostgreSQL (metadata)
- Vector DB: Qdrant (embeddings)
- Cache/Queue: Redis
- AI Models: Anthropic Claude API
The true innovation: 10 specialized AI agents working together.
| Agent | Name | Model | Role |
|---|---|---|---|
| 1 | Interviewer | Claude Opus 4.5 | User-facing conversation |
| 2 | Psychologist | Claude Sonnet 4.5 | Emotional analysis |
| 3 | Biographer | Claude Haiku | Fact extraction |
| 4 | Vault Keeper | Rule-based | Security & encryption |
| 5 | Stylist | Fine-tuned LLM | Speech pattern capture |
| 6 | Fact-Checker | Claude Sonnet 4.5 | Consistency validation |
| 7 | Connector | RAG System | Context linking |
| 8 | Visualizer | Rule-based | Dynamic UI/UX |
| 9 | Budget Broker | Algorithm | Resource allocation |
| 10 | Convergence Engine | Multi-metric | Completion % calculator |
Communication: Redis message bus for inter-agent coordination.
How we calculate "Digital Twin Completion" (0-100%):
Transcendence Score (TS) = Ξ£ (Wi Γ Mi)
- Vocabulary Coverage (40%): Unique words captured / 10,000 target
- Emotional Range (15%): Distinct emotions observed / 20 target
- Memory Density (20%): Significant events / expected lifetime events
- Style Fidelity (15%): Cosine similarity of speech patterns
- Consistency Score (10%): 1 - (contradictions / total statements)
Example:
- User has 3,500 unique words β 35% vocab coverage
- Observed 12 emotions β 60% emotional range
- Stored 250 events β 17% memory density
- Style match 72%
- 99.4% consistency
Result: 47.1% complete
One slider. Three tiers.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Standard Enhanced High-Fidelity β
β β¬5/mo β¬25/mo β¬100/mo β
β β
β ββββββββββββββββββββββββββββββββββ β
β 1 50 100 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Slider | Model | GPU | Training | Cost |
|---|---|---|---|---|
| 1-29 | Haiku | None | 100 iterations | β¬5-15/mo |
| 30-69 | Sonnet | A100 | 500 iterations | β¬15-50/mo |
| 70-100 | Opus | H100 | 5000 iterations | β¬50-200/mo |
Implementation: backend/agents/agent_9_budget_broker.py
The server NEVER sees plaintext conversations.
-
Client-Side Key Derivation
biometric_secret = FaceID/TouchID encryption_key = PBKDF2(biometric_secret, salt, 100k iterations) // Stored in iOS Keychain / Android Keystore
-
Message Encryption (Before Send)
plaintext = "I was born in Berlin" encrypted = AES_GCM_256(plaintext, encryption_key) send_to_server(encrypted)
-
Server Processing
- Option A: Client-side processing (decrypt locally)
- Option B: Trusted Execution Environment (AWS Nitro, Intel SGX)
-
Data Storage
{ "user_id": "uuid-abc-123", "encrypted_content": "AES_GCM_BASE64_BLOB", "iv": "...", "auth_tag": "..." }
Even database admins cannot read your conversations.
- Flutter: 3.2+
- Python: 3.11+
- PostgreSQL: 15+
- Redis: 7+
- Qdrant: Latest
- Anthropic API Key
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# Start services (Docker)
docker-compose up -d # Starts PostgreSQL, Redis, Qdrant
# Run backend
python main.py
# Backend runs on http://localhost:8000cd mobile
# Install dependencies
flutter pub get
# Configure Firebase
# 1. Create Firebase project at https://console.firebase.google.com
# 2. Download google-services.json (Android) and GoogleService-Info.plist (iOS)
# 3. Place in android/app/ and ios/Runner/ respectively
# Run app
flutter run- Open app on emulator/device
- Sign in with Google/Apple/Biometric
- Start chatting with the AI
- Watch your convergence score grow!
Convergence/
βββ ARCHITECTURE.md # Detailed architecture document
βββ README.md # This file
β
βββ mobile/ # Flutter app
β βββ lib/
β β βββ main.dart
β β βββ services/
β β β βββ auth_service.dart
β β β βββ encryption_service.dart
β β βββ screens/
β β β βββ splash_screen.dart
β β β βββ login_screen.dart
β β β βββ chat_screen.dart
β β βββ widgets/
β β β βββ convergence_indicator.dart
β β β βββ message_bubble.dart
β β βββ models/
β β βββ message.dart
β βββ pubspec.yaml
β
βββ backend/ # Python FastAPI backend
βββ main.py
βββ requirements.txt
βββ core/
β βββ config.py
βββ api/
β βββ auth.py
β βββ chat.py
β βββ convergence.py
βββ services/
β βββ agent_orchestrator.py
βββ agents/
βββ base_agent.py
βββ agent_1_interviewer.py
βββ agent_2_psychologist.py
βββ agent_3_biographer.py
βββ agent_4_vault_keeper.py
βββ agent_5_stylist.py
βββ agent_6_fact_checker.py
βββ agent_7_connector.py
βββ agent_8_visualizer.py
βββ agent_9_budget_broker.py
βββ agent_10_convergence_engine.py
cd backend
pytest tests/cd mobile
flutter testRadical Simplicity
- No technical menus
- Everything flows
- Feels like millions were invested in design
- As addictive as TikTok
- As powerful as cutting-edge AI research
- Flutter app with Firebase auth
- Basic encryption
- Single-agent chat
- PostgreSQL backend
- Implement all 10 agents
- Redis message bus
- Convergence engine
- Budget slider
- UI/UX refinement
- Performance optimization
- Security audit
- Beta testing
- App Store submission (iOS)
- Play Store submission (Android)
- Marketing campaign
- User acquisition
Copyright Β© Belkis Aslani
All code, concepts, and architectures are proprietary.
This is a proprietary project. Contributions are by invitation only.
For inquiries: [Your Contact Information]
Built with:
- Anthropic Claude API (Claude Opus 4.5, Sonnet 4.5, Haiku)
- Flutter (Google)
- FastAPI (SebastiΓ‘n RamΓrez)
- Firebase (Google)
- Countless open-source libraries
K.Ai - Your legacy, preserved forever. β¨