Deskpilot: A native Python/Tkinter agentic desktop client for local LLMs with Model Context Protocol (MCP), tool sandboxing, and much much more.
Hey all,
I (with lots of help from Qwen 3.8 27B) built a native, standalone desktop AI client app built entirely in Python + Tkinter with an OpenAI compatible backend and a security first agentic architecture.
GitHub: https://github.com/shuhdonk/DeskPilot
Features:
Universal Local Backend Support: Connects to Ollama, LM Studio, vLLM, llama.cpp, Unsloth Desktop, or any OpenAI compatible endpoint.
MCP Integration: Features a built-in, dependency-free stdio JSON-RPC 2.0 client. You can plug in any external MCP server in settings, and Deskpilot dynamically converts the server's tools into OpenAI function calling schemas on the fly.
Granular Tool Permission Bar: Every built-in tool and dynamic MCP tool gets a dropdown right on the main window (Always Allow, Ask Permission, or Off). Unvetted tools default to Ask Permission with a threadb safe prompt.
Built in Agentic Tools:
Web Search & Scraping: Local SearXNG, Exa neural search, and Firecrawl scraping.
OS & System: File reading/writing (supports text & PDFs), directory listing, clipboard reader, screen capture (queued for vision models), and sandboxed Node.js JavaScript execution.
Reasoning/Thinking Support: Native streaming support for <think> / reasoning_content (DeepSeek-R1, Qwen, etc.). It displays reasoning in collapsible drawers, times the thought phase, and automatically collapses it to "Thought for X.Xs" when standard generation begins.
100% Local Voice Stack:
STT (Dictation): Continuous microphone dictation powered locally by faster-whisper (base.en on CPU int8).
TTS (Playback): Natural text to speech powered locally by kokoro-onnx using a look ahead pipeline to eliminate sentence lag.
Smart Context Handoff & Metrics:
Displays accurate decode tok/s (excluding prefill from the denominator), TTFT, and a live used / max context gauge.
(I personally love this feature) When your chat reaches a user defined context threshold (e.g., 75%), Deskpilot will trigger an automatic structured handoff summary so you can roll seamlessly into a fresh conversation session without context overflow.
Security & Architecture:
Running local agentic models with tool access requires guardrails:
SSRF & DNS Rebinding Protection: fetch_url inspects and blocks requests to loopback (127.0.0.1), LAN subnets (RFC1918), and cloud metadata IP ranges by default.
Filesystem Sandboxing: Hard blocks against touching core OS directories (C:\Windows, /etc, etc.) plus an optional user defined workspace directory.
Pure Daemon Threading: All tool execution, inference streaming, and audio run on background worker threads, marshalled safely to Tkinter via thread safe queues to keep the UI completely fluid.
It runs directly via Python (3.10+) or can be compiled into a single .exe using PyInstaller:
Step by step Linux and Windows installation instructions.
Source: r/ArtificialInteligence · by /u/poofph