An Personal Interface for running local LLMs
1
stars
3
commits
C++
primary language
Aug 9, 2026
updated
Map your files, code, and databases into an interactive 3D knowledge graph, interrogate them with local or cloud LLMs, and build in a full VS Code-style Studio — all running on your own machine.
Cortex is a privacy-first desktop application that turns any folder of files into a queryable, spatial knowledge base. It ingests your code, documents, and databases; embeds them into a per-project vector graph; and lets you explore, question, and generate from them — using local models via Ollama / MLX or any cloud provider through a single API-key box. Everything is processed and stored on your machine.
Why Cortex?
[!NOTE] Cortex is built to run with Ollama for local models. Cloud providers are optional and configured in-app with your own API key.
Point Cortex at a folder and it parses source code, PDFs, DOCX/PPTX/XLSX, CSVs, and SQLite/.sql databases (with image OCR), embeds everything into a per-project ChromaDB vector store, and renders it as an interactive 3D force-graph with semantic clustering. Incremental SHA-256 caching means only changed files are re-processed.
Ask questions grounded in your mapped project (HyDE + semantic retrieval). Responses render rich Markdown, syntax-highlighted code blocks, tables, and inline Chart.js charts & Mermaid diagrams. One-click export any answer to PDF.
A VS Code-style workspace powered by Monaco: multi-tab editing, a real multi-terminal (split panes + detachable windows), a ~45-language code runner that uses your installed toolchains, and a visual debugger (DAP) with breakpoints, stepping, variables, call stack, and a Debug Console. A built-in Copilot agent offers three modes — Ask permission, Accept edits, and Plan mode — with live edits in open editors.
A polymorphic editor: code files open in Monaco, while documents (.md / .txt / .docx) open in a themed Quill rich-text editor — one workspace, the right editor per file. It adds Grammarly-style grammar & style suggestions, AI ghost-text autocomplete and a one-click Continue writer, plus open / save / export. All imported and AI-streamed HTML is sanitized with DOMPurify.
One click runs an autonomous research agent: web search → page crawl + readable-text extraction → TF-IDF / KMeans topic analysis → LLM synthesis — streamed straight into a new document over SSE (batched at 30 fps for smooth, jank-free writing). Turn a single question into a structured, sourced report without leaving the app.
Turn any answer or dataset into a native, downloadable artifact — no copy-pasting:
A persistent mem0-backed memory that lets the assistant remember you across sessions — your preferences, persona, and standing constraints are mined from chats and injected into future prompts. Fully under your control: view, add, and delete entries in Settings → Memory Ledger, or bulk-load facts via Import Vault. Stored locally and never uploaded.
A hardware-aware Model Cookbook scans your RAM/VRAM and recommends one best-fit model per family, with one-click install / update / delete of Ollama models (no terminal). Model Compare runs blind A/B tests. A Utilities surface adds Notes & Tasks and draft-only Email & Calendar.
| Class | How |
|---|---|
| Local | Ollama over HTTP (streaming) — pick any installed model |
| Apple MLX | mlx-lm on Apple Silicon (unified memory) |
| Cloud | litellm — OpenAI, Anthropic, Google Gemini, Groq, xAI, or any provider/model |
Paste an API key and Cortex auto-detects the provider from the key prefix (sk-ant-, gsk_, AIza, xai-, sk-) and routes accordingly — no need to match the key to a dropdown.
A single FastAPI backend serves a vanilla-JS frontend and bundles the ML stack; a Tauri shell wraps it as a native desktop app with the backend running as a sidecar.
flowchart LR
subgraph Desktop["Tauri Desktop Shell"]
UI["Frontend (vanilla JS)\n3D Graph - Studio IDE - Docs - Chat"]
end
UI <-->|HTTP + WebSocket| API["FastAPI Backend"]
API --> Ingest["Ingestion\nparse -> embed -> cluster"]
Ingest --> Chroma["ChromaDB\nper-project vectors"]
API --> RAG["GraphRAG retrieval (HyDE)"]
RAG --> Chroma
API --> Router["AI Router"]
Router --> Ollama["Ollama / MLX (local)"]
Router --> Cloud["litellm (cloud)"]
API --> Mem["mem0 Memory Ledger"]
/api/brain/ws (Copilot agent state machine), /api/terminal/ws (real PTY), /api/dap/ws (generic debug-adapter proxy).backend/storage/ — cache.db (diff cache), chroma_db/ (GraphRAG vectors), mem0_chroma/ + mem0.db (Memory Ledger).| Layer | Technologies |
|---|---|
| Backend | FastAPI - Uvicorn - WebSockets |
| AI / RAG | sentence-transformers - ChromaDB - litellm - mem0 - scikit-learn - Ollama / MLX |
| Parsing | pypdf - python-docx - python-pptx - openpyxl - pandas - pytesseract (OCR) |
| Generators | ReportLab - fpdf2 - python-docx - python-pptx - matplotlib |
| Voice / Research | whisper.cpp - faster-whisper - DuckDuckGo Search - BeautifulSoup - readability |
| Frontend | Vanilla JS - Monaco Editor - 3D-Force-Graph - Chart.js - Mermaid - Quill - DOMPurify |
| Desktop | Tauri 2 (Rust) - PyInstaller sidecar |
Prerequisites: Python 3.11, Ollama running locally (for local models), and optionally Tesseract (image OCR).
# from the repository root (this folder)
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# start the app (serves the full UI)
uvicorn backend.main:app --port 8077
Open http://localhost:8077 in your browser. Pull a model from the in-app Cookbook (or ollama pull llama3.1:8b), point Cortex at a folder, and start mapping.
The first launch downloads a small embedding model and loads the ML stack, so it can take a little while.
Cortex packages the Python backend with PyInstaller and wraps it with Tauri to produce a native installer (.dmg / .exe / .AppImage).
requirements.txt installedpip install pyinstallercargo install tauri-cli --version "^2"src-tauri/icons/ (see the note below)# Debian / Ubuntu
sudo apt install libwebkit2gtk-4.1-dev libsoup-3.0-dev build-essential \
curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
# Fedora
sudo dnf install webkit2gtk4.1-devel libsoup3-devel openssl-devel \
curl wget file libxdo-devel libappindicator-gtk3-devel librsvg2-devel
scripts/build_installers.sh preflights these and prints the exact install line if any are missing.[!IMPORTANT] The repo does not include
src-tauri/icons/. Generate them once from any square PNG (≥ 1024×1024):cargo tauri icon path/to/icon.pngThis creates
32x32.png,128x128.png,icon.icns, andicon.ico(required for the Windows installer).
.exe (PowerShell)# 1) Python backend -> standalone binary
python -m venv .venv; .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt pyinstaller
pyinstaller --noconfirm cortex_backend.spec
# 2) Stage the backend as the Tauri sidecar (Tauri expects the target-triple suffix)
$triple = (rustc -Vv | Select-String 'host:').ToString().Split(' ')[-1]
New-Item -ItemType Directory -Force src-tauri\binaries | Out-Null
Copy-Item "dist\cortex-backend\cortex-backend.exe" "src-tauri\binaries\cortex-backend-$triple.exe"
# 3) Generate icons (first time only), then build the installer
cargo tauri icon path\to\icon.png
cd src-tauri
cargo tauri build
The installer lands in src-tauri\target\release\bundle\nsis\ (.exe). Run it — no terminal needed by the end user.
One script builds for whichever Unix platform you run it on — it detects the OS and selects the right bundle targets:
./scripts/build_installers.sh
src-tauri/target/release/bundle/{macos,dmg}/ (unsigned)src-tauri/target/release/bundle/{appimage,deb}/[!NOTE] For a signed + notarized macOS
.dmg, use./scripts/build_macos.shinstead — it adds Developer-ID signing, notarization, stapling, and a deep-sign pass over the bundled Python binaries.
On Linux the app stores its data under $XDG_DATA_HOME/Cortex (default
~/.local/share/Cortex), and the folder picker uses zenity or kdialog —
install one of them if "Browse" reports no dialog is available.
Voice transcription (optional): the bundled
backend/workers/whisper.cppsource must be compiled for your platform (cmake) and a model downloaded for speech features; the rest of the app works without it.
| Setting | How |
|---|---|
| API keys | Entered in-app (Intelligence Core panel) — never written to disk or committed |
CORTEX_PORT | Backend port (default 8077) |
CORTEX_HOST | Backend host (default 127.0.0.1) |
MINDPALACE_STORAGE_DIR | Override where cache.db / chroma_db / memory are stored |
In Settings → Cache & Index you can monitor index size and Purge Regional Indexes (clears the GraphRAG index + diff cache; never your Memory Ledger or notes).
Built on the shoulders of Ollama, litellm, ChromaDB, sentence-transformers, Monaco Editor, Tauri, 3D-Force-Graph, and whisper.cpp.
Released under the MIT License. See LICENSE for details.
Cortex IDE — your files, your models, your machine.
3 commits
C++
49.9%
C
31.2%
Cuda
6.1%
Python
1.9%
JavaScript
1.8%
Metal
1.7%
GLSL
1.3%
An Personal Interface for running local LLMs
1
stars
3
commits
C++
primary language
Aug 9, 2026
updated
Map your files, code, and databases into an interactive 3D knowledge graph, interrogate them with local or cloud LLMs, and build in a full VS Code-style Studio — all running on your own machine.
Cortex is a privacy-first desktop application that turns any folder of files into a queryable, spatial knowledge base. It ingests your code, documents, and databases; embeds them into a per-project vector graph; and lets you explore, question, and generate from them — using local models via Ollama / MLX or any cloud provider through a single API-key box. Everything is processed and stored on your machine.
Why Cortex?
[!NOTE] Cortex is built to run with Ollama for local models. Cloud providers are optional and configured in-app with your own API key.
Point Cortex at a folder and it parses source code, PDFs, DOCX/PPTX/XLSX, CSVs, and SQLite/.sql databases (with image OCR), embeds everything into a per-project ChromaDB vector store, and renders it as an interactive 3D force-graph with semantic clustering. Incremental SHA-256 caching means only changed files are re-processed.
Ask questions grounded in your mapped project (HyDE + semantic retrieval). Responses render rich Markdown, syntax-highlighted code blocks, tables, and inline Chart.js charts & Mermaid diagrams. One-click export any answer to PDF.
A VS Code-style workspace powered by Monaco: multi-tab editing, a real multi-terminal (split panes + detachable windows), a ~45-language code runner that uses your installed toolchains, and a visual debugger (DAP) with breakpoints, stepping, variables, call stack, and a Debug Console. A built-in Copilot agent offers three modes — Ask permission, Accept edits, and Plan mode — with live edits in open editors.
A polymorphic editor: code files open in Monaco, while documents (.md / .txt / .docx) open in a themed Quill rich-text editor — one workspace, the right editor per file. It adds Grammarly-style grammar & style suggestions, AI ghost-text autocomplete and a one-click Continue writer, plus open / save / export. All imported and AI-streamed HTML is sanitized with DOMPurify.
One click runs an autonomous research agent: web search → page crawl + readable-text extraction → TF-IDF / KMeans topic analysis → LLM synthesis — streamed straight into a new document over SSE (batched at 30 fps for smooth, jank-free writing). Turn a single question into a structured, sourced report without leaving the app.
Turn any answer or dataset into a native, downloadable artifact — no copy-pasting:
A persistent mem0-backed memory that lets the assistant remember you across sessions — your preferences, persona, and standing constraints are mined from chats and injected into future prompts. Fully under your control: view, add, and delete entries in Settings → Memory Ledger, or bulk-load facts via Import Vault. Stored locally and never uploaded.
A hardware-aware Model Cookbook scans your RAM/VRAM and recommends one best-fit model per family, with one-click install / update / delete of Ollama models (no terminal). Model Compare runs blind A/B tests. A Utilities surface adds Notes & Tasks and draft-only Email & Calendar.
| Class | How |
|---|---|
| Local | Ollama over HTTP (streaming) — pick any installed model |
| Apple MLX | mlx-lm on Apple Silicon (unified memory) |
| Cloud | litellm — OpenAI, Anthropic, Google Gemini, Groq, xAI, or any provider/model |
Paste an API key and Cortex auto-detects the provider from the key prefix (sk-ant-, gsk_, AIza, xai-, sk-) and routes accordingly — no need to match the key to a dropdown.
A single FastAPI backend serves a vanilla-JS frontend and bundles the ML stack; a Tauri shell wraps it as a native desktop app with the backend running as a sidecar.
flowchart LR
subgraph Desktop["Tauri Desktop Shell"]
UI["Frontend (vanilla JS)\n3D Graph - Studio IDE - Docs - Chat"]
end
UI <-->|HTTP + WebSocket| API["FastAPI Backend"]
API --> Ingest["Ingestion\nparse -> embed -> cluster"]
Ingest --> Chroma["ChromaDB\nper-project vectors"]
API --> RAG["GraphRAG retrieval (HyDE)"]
RAG --> Chroma
API --> Router["AI Router"]
Router --> Ollama["Ollama / MLX (local)"]
Router --> Cloud["litellm (cloud)"]
API --> Mem["mem0 Memory Ledger"]
/api/brain/ws (Copilot agent state machine), /api/terminal/ws (real PTY), /api/dap/ws (generic debug-adapter proxy).backend/storage/ — cache.db (diff cache), chroma_db/ (GraphRAG vectors), mem0_chroma/ + mem0.db (Memory Ledger).| Layer | Technologies |
|---|---|
| Backend | FastAPI - Uvicorn - WebSockets |
| AI / RAG | sentence-transformers - ChromaDB - litellm - mem0 - scikit-learn - Ollama / MLX |
| Parsing | pypdf - python-docx - python-pptx - openpyxl - pandas - pytesseract (OCR) |
| Generators | ReportLab - fpdf2 - python-docx - python-pptx - matplotlib |
| Voice / Research | whisper.cpp - faster-whisper - DuckDuckGo Search - BeautifulSoup - readability |
| Frontend | Vanilla JS - Monaco Editor - 3D-Force-Graph - Chart.js - Mermaid - Quill - DOMPurify |
| Desktop | Tauri 2 (Rust) - PyInstaller sidecar |
Prerequisites: Python 3.11, Ollama running locally (for local models), and optionally Tesseract (image OCR).
# from the repository root (this folder)
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# start the app (serves the full UI)
uvicorn backend.main:app --port 8077
Open http://localhost:8077 in your browser. Pull a model from the in-app Cookbook (or ollama pull llama3.1:8b), point Cortex at a folder, and start mapping.
The first launch downloads a small embedding model and loads the ML stack, so it can take a little while.
Cortex packages the Python backend with PyInstaller and wraps it with Tauri to produce a native installer (.dmg / .exe / .AppImage).
requirements.txt installedpip install pyinstallercargo install tauri-cli --version "^2"src-tauri/icons/ (see the note below)# Debian / Ubuntu
sudo apt install libwebkit2gtk-4.1-dev libsoup-3.0-dev build-essential \
curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
# Fedora
sudo dnf install webkit2gtk4.1-devel libsoup3-devel openssl-devel \
curl wget file libxdo-devel libappindicator-gtk3-devel librsvg2-devel
scripts/build_installers.sh preflights these and prints the exact install line if any are missing.[!IMPORTANT] The repo does not include
src-tauri/icons/. Generate them once from any square PNG (≥ 1024×1024):cargo tauri icon path/to/icon.pngThis creates
32x32.png,128x128.png,icon.icns, andicon.ico(required for the Windows installer).
.exe (PowerShell)# 1) Python backend -> standalone binary
python -m venv .venv; .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt pyinstaller
pyinstaller --noconfirm cortex_backend.spec
# 2) Stage the backend as the Tauri sidecar (Tauri expects the target-triple suffix)
$triple = (rustc -Vv | Select-String 'host:').ToString().Split(' ')[-1]
New-Item -ItemType Directory -Force src-tauri\binaries | Out-Null
Copy-Item "dist\cortex-backend\cortex-backend.exe" "src-tauri\binaries\cortex-backend-$triple.exe"
# 3) Generate icons (first time only), then build the installer
cargo tauri icon path\to\icon.png
cd src-tauri
cargo tauri build
The installer lands in src-tauri\target\release\bundle\nsis\ (.exe). Run it — no terminal needed by the end user.
One script builds for whichever Unix platform you run it on — it detects the OS and selects the right bundle targets:
./scripts/build_installers.sh
src-tauri/target/release/bundle/{macos,dmg}/ (unsigned)src-tauri/target/release/bundle/{appimage,deb}/[!NOTE] For a signed + notarized macOS
.dmg, use./scripts/build_macos.shinstead — it adds Developer-ID signing, notarization, stapling, and a deep-sign pass over the bundled Python binaries.
On Linux the app stores its data under $XDG_DATA_HOME/Cortex (default
~/.local/share/Cortex), and the folder picker uses zenity or kdialog —
install one of them if "Browse" reports no dialog is available.
Voice transcription (optional): the bundled
backend/workers/whisper.cppsource must be compiled for your platform (cmake) and a model downloaded for speech features; the rest of the app works without it.
| Setting | How |
|---|---|
| API keys | Entered in-app (Intelligence Core panel) — never written to disk or committed |
CORTEX_PORT | Backend port (default 8077) |
CORTEX_HOST | Backend host (default 127.0.0.1) |
MINDPALACE_STORAGE_DIR | Override where cache.db / chroma_db / memory are stored |
In Settings → Cache & Index you can monitor index size and Purge Regional Indexes (clears the GraphRAG index + diff cache; never your Memory Ledger or notes).
Built on the shoulders of Ollama, litellm, ChromaDB, sentence-transformers, Monaco Editor, Tauri, 3D-Force-Graph, and whisper.cpp.
Released under the MIT License. See LICENSE for details.
Cortex IDE — your files, your models, your machine.
3 commits
C++
49.9%
C
31.2%
Cuda
6.1%
Python
1.9%
JavaScript
1.8%
Metal
1.7%
GLSL
1.3%