LocalMind is an offline AI-powered tool that lets you upload local documents (PDF, DOCX, TXT, Markdown), index them, and ask natural language questions. All processing happens entirely offline, with no data sent to the cloud.
- OS: Windows, macOS, or Linux
- Python 3.10 or newer
- Ollama — to run the large language model (LLM)
- At least 4 GB RAM (8 GB+ recommended for larger models)
-
Install Python (if not already installed):
https://www.python.org/downloads/ -
Install Ollama:
Follow the instructions at https://ollama.com/ -
Download the project (or clone the repository):
git clone https://github.com/RuslanKoynov/LocalMind.git cd localmind -
Install Python dependencies:
pip install fastapi uvicorn chromadb sentence-transformers python-multipart PyPDF2 python-docx
-
Pull a language model into Ollama (choose one):
For best Russian language support:
ollama pull qwen2.5:1.5b
Or a lighter option (works well on low-end machines):
ollama pull phi3:mini
To use a different LLM, edit the app.py file:
-
Locate the
ask_ollama(...)function -
Change the default
modelparameter:def ask_ollama(context: str, question: str, model: str = "qwen2:1.5b") -> str:
Replace it with a model name that appears in your
ollama list.
documents/— stores original uploaded files (created automatically)chroma_db/— local vector knowledge base (created automatically)static/— CSS and JavaScript for the web interface
All data remains on your device and never leaves your system.
In your terminal, navigate to the project folder and run:
uvicorn app:app --host 127.0.0.1 --port 8000Add the
--reloadflag during development.
The application will be available at:
👉 http://127.0.0.1:8000
- Supported formats:
.txt,.md,.pdf,.docx - You can upload one or multiple files at once
- Files are automatically indexed after upload (may take a few seconds)
- Type your question in the “Ask a question” field
- The AI analyzes your documents and returns an answer with source references
- If the answer isn’t found in your documents, the system will let you know
- “What are the system installation requirements?”
- “Who is the author of the ‘User Guide’ document?”
- “List the setup steps for module X.”
- “Who is Tatyana Larina?” (if you’ve uploaded Eugene Onegin)
The higher the value, the more "imagination" (or creativity) the AI will use in its responses. For text-based document search, a value of 0.3 is usually sufficient.
- All computation happens locally on your machine
- No data is transmitted over the internet (after initial model download)
- The vector database is stored on your local disk
- Safe for use in corporate environments with strict data policies
| Issue | Solution |
|---|---|
| “Generation error” | Ensure Ollama is running and the model is loaded (ollama list) |
| PDF files fail to upload | Make sure the PDF contains selectable text (not a scanned image) |
| Slow first launch | The embedding model downloads on first run (internet required once) |
| Server fails to start | Verify all Python dependencies are installed (pip list) |
localmind/
├── app.py # Main backend (FastAPI)
├── LocalMindBox.exe # Main backend (Executable Windows file)
├── index.html # Web UI
├── static/
│ ├── style.css # Styles
│ ├── main.js # Frontend logic
│ └── favicon.ico # Иконка вкладки браузера
├── documents/ # Uploaded files
└── chroma_db/ # Vector knowledge base
💡 Tip: For large document collections, use an SSD and at least 8 GB of RAM.
LocalMind — your private AI assistant for knowledge, fully under your control.