A local assistant that learns from your own writing and conversations
A privacy-focused, locally running assistant that can learn from user-provided writing samples and conversations.
- π¬ Natural Chat Interface: Clean, modern UI for seamless conversations
- π€ Voice Input (STT): Speak to JARVIS using OpenAI Whisper - just like ChatGPT!
- π Voice Output (TTS): Hear JARVIS respond with natural-sounding voice using Microsoft Edge TTS
- π§ RAG-Powered Memory: Retrieves relevant context from past conversations using vector search
- π Personality Training: Learns your unique writing style from text samples
- π Confidence Scoring: Shows how confident the AI is in each response
- π Local-first: LLM inference, memory, and embeddings run locally; voice output may use Microsoft Edge TTS
- π Memory Management: View, search, and manage all stored conversations
- LLM: Ollama (llama3.2:3b) - Local inference
- Vector DB: ChromaDB - Semantic search and storage
- Embeddings: sentence-transformers (all-MiniLM-L6-v2)
- Voice Input: OpenAI Whisper - Speech-to-text (STT)
- Voice Output: Microsoft Edge TTS - Text-to-speech (TTS)
- UI: Gradio - Modern web interface
- Framework: LangChain - RAG orchestration
-
Install Ollama (https://ollama.com)
# On Windows (PowerShell) winget install Ollama.Ollama # Or download from: https://ollama.com/download
-
Pull the LLM model
ollama pull llama3.2:3b
-
Clone the project
git clone <repository-url> cd jarvis
-
Install Python dependencies
pip install -r requirements.txt
-
Create local configuration
copy .env.example .env
On macOS/Linux, use
cp .env.example .env. Edit.envonly if you need to change the defaults.Note: The first time you run the app, Whisper will automatically download the model (~150MB for base model). This only happens once.
-
Run the application
python app.py
-
Open in browser
- Navigate to: http://localhost:7860
Voice chat features are automatically enabled when dependencies are installed:
- Voice Input (STT): Uses OpenAI Whisper (automatically downloaded on first use)
- Voice Output (TTS): Uses Microsoft Edge TTS (works out of the box, no API key needed)
Voice Models: The app uses the "base" Whisper model by default (good balance of speed and accuracy). You can change this in app.py by modifying the VoiceHandler initialization.
- Go to the π Training tab
- Upload text files containing your writing:
- Emails you've written
- Chat message exports (WhatsApp, Discord, Slack)
- Notes, blog posts, tweets
- Any text in
.txt,.md, or.jsonformat
- Click "Analyze & Train"
- Review the personality analysis
- Switch to the π¬ Chat tab
- Text Chat: Type your message and press Enter or click Send
- Voice Chat (Like ChatGPT!):
- π€ Click "Voice Input" to speak your message (voice will be transcribed to text)
- π Enable "Voice Output" checkbox to hear AI responses
- Speak naturally - the AI will understand and respond!
- Watch the confidence score - higher is better!
- The AI will reference past conversations when relevant
- Go to π§ Memory tab
- View all stored conversations
- Export your data
- Clear memories if needed
βββββββββββββββββββββββββββββββββββββββββββ
β User Input β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββββββ
β Conversation Manager β
β - Retrieves context from vector DB β
β - Builds enhanced prompt β
β - Generates response via Ollama β
β - Calculates confidence score β
ββββββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββ΄βββββββββββ
β β
βββββββββΌβββββββββ ββββββββββΌββββββββββ
β ChromaDB β β Ollama LLM β
β Vector Store β β llama3.2:3b β
βββββββββ¬βββββββββ ββββββββββ¬ββββββββββ
β β
ββββββββββββ¬βββββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββββββ
β Response + Confidence β
βββββββββββββββββββββββββββββββββββββββββββ
- Stores conversations in ChromaDB
- Retrieves relevant context using semantic search
- Manages training data
- Interfaces with Ollama
- Generates responses
- Handles streaming
- Extracts writing style patterns
- Analyzes tone, vocabulary, sentence structure
- Generates personality-aware system prompts
- Evaluates response quality
- Checks context relevance
- Detects uncertainty in responses
- Orchestrates all components
- Builds prompts with context
- Stores conversations
my-jarvis/
βββ app.py # Main Gradio application
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ .env.example # Safe configuration template
β
βββ core/
β βββ conversation_manager.py # Main orchestration
β βββ rag_engine.py # Vector DB & retrieval
β βββ llm_handler.py # Ollama interface
β βββ personality_analyzer.py # Style extraction
β βββ confidence_scorer.py # Response scoring
β
βββ utils/
β βββ file_processor.py # Process training files
β βββ config.py # Configuration management
β
βββ data/ # Local runtime data (ignored by Git)
β
βββ prompts/
βββ system_prompt.txt # Base personality prompt
βββ rag_prompt_template.txt # RAG query template
- Local-first: Core inference and storage run on your machine
- Local inference: Ollama, ChromaDB, and sentence-transformers run on your machine
- Your Data Stays Yours: Conversations and training data are stored locally
- Open Source: Full transparency - audit the code
- No Tracking: No analytics, no telemetry
Do not commit .env, personal writing samples, conversation exports, audio, vector databases, or correction history. The repository includes .env.example for safe setup. Whisper downloads a model on first use, and Edge TTS may send text to Microsoftβs speech service when voice output is enabled. See SECURITY.md for reporting guidance.
See CONTRIBUTING.md for development and pull request guidance.
This project is licensed under the MIT License.
- Quantity Matters: Upload at least 500-1000 messages for good results
- Quality Matters: Use text that represents your actual communication style
- Variety Helps: Include different contexts (casual, formal, technical)
- Recent Content: Your current writing style is most relevant
β Good Training Data:
- Personal emails you've written
- Chat message exports
- Blog posts or articles
- Social media posts
- Text messages
- Work communications
β Not Helpful:
- Text written by others
- Generic content
- Auto-generated text
- Very old writing (unless still relevant)
Problem: "Ollama connection test failed"
Solution:
# Make sure Ollama is running
ollama serve
# Pull the model
ollama pull llama3.2:3b
# Test it works
ollama run llama3.2:3b "Hello"Problem: AI always shows low confidence
Solution:
- Upload more training data
- Have more conversations to build memory
- Check that training files are in supported formats
Problem: Responses take a long time
Solution:
- Use a smaller model (already using 3b)
- Close other applications
- Check CPU/RAM usage
- Consider GPU acceleration if available
Edit .env file:
OLLAMA_MODEL=llama3.2:1b # Faster, less accurate
# or
OLLAMA_MODEL=llama3.2:8b # Slower, more accurateIn .env:
CONFIDENCE_THRESHOLD=0.6 # Lower = more lenientRAG chunking currently uses the built-in defaults of 500 words with 50 words of overlap. Change CHUNK_SIZE and CHUNK_OVERLAP in utils/config.py if you need different behavior.
- Email Assistant: Draft emails in your style
- Meeting Stand-in: Answer questions as you would
- Content Creation: Generate text matching your voice
- Learning Tool: See what patterns define your writing
- Time Saver: Quick responses to common questions
- Backup Brain: Never forget past conversations
Perfect for presentations:
- Show Privacy: "Everything runs locally - watch my data folder"
- Upload Training: "Here are 1,000 messages I've written"
- Ask Questions: "JARVIS, how would I explain RAG to a beginner?"
- Show Confidence: "See? 87% confidence - it knows me!"
- Show Memory: "It remembers past conversations automatically"
- Voice clone integration
- WhatsApp export auto-parser
- Multi-language support
- Response A/B testing
- Mobile app
- Browser extension
- Ollama - Amazing local LLM runtime
- ChromaDB - Simple yet powerful vector database
- Gradio - Beautiful web UI framework
- LangChain - RAG implementation made easy
Having issues?
- Check the Troubleshooting section
- Make sure Ollama is running
- Verify all dependencies installed
- Check that you have enough disk space
Built with β€οΈ for privacy and personalization
Your AI clone, your rules, your machine.