AI Assistant for KDE Plasma 6
Built for Linux power users who want hands-free control over their Plasma desktop.
K-Pilot is an AI-powered desktop assistant designed specifically for KDE Plasma 6 on Wayland.
It brings hands-free automation to your Linux workflow through:
- 🎙️ Wake-word activation — Just say "Hey K-Pilot"
- 🧠 Dual-model architecture — Gemini Live for conversation, DeepSeek for tool execution
- ⚡ Real-time tool calling — Control windows, media, notifications, and more
- 🔒 Privacy-first — Local wake-word detection, minimal data exposure
K-Pilot keeps your desktop domain clean while AI capabilities stay modular and replaceable.
- 🎯 Plasma-native — Deep integration with KWin, MPRIS, and KDE notifications
- 🗣️ Natural conversations — Low-latency voice interaction with Gemini Live
- 🛠️ Extensible tools — Hexagonal architecture makes adding capabilities trivial
- 🖥️ Wayland-ready — Built for modern Linux, no X11 legacy baggage
K-Pilot follows Hexagonal Architecture (Ports & Adapters):
┌─────────────────────────────────────┐
│ Application Layer │
│ (Agent Orchestration, Tools) │
├─────────────────────────────────────┤
│ Domain Layer │
│ (Models, Ports, Services) │
├─────────────────────────────────────┤
│ Infrastructure Layer │
│ (Gemini Live, KWin, MPRIS, D-Bus) │
└─────────────────────────────────────┘
src/k_pilot/domain: Core business logic, models, and port definitionssrc/k_pilot/application: Agent coordination and tool implementationssrc/k_pilot/infrastructure: External adapters (AI providers, KDE APIs, audio)
This keeps the domain clean and AI providers replaceable.
- ✅ Window Management — List, focus, move, resize via KWin D-Bus
- ✅ Media Control — MPRIS integration (play, pause, metadata)
- ✅ Notifications — Read and dismiss KDE notifications
- ✅ Wake Word — Local "Hey K-Pilot" detection with
local-wake - ✅ Voice I/O — Real-time audio streaming with Gemini Live
- KDE Plasma 6 (Wayland session)
- Python 3.14+
uvfor dependency management- Microphone access (PipeWire/PulseAudio)
# Clone and enter directory
git clone https://github.com/Undead34/k-pilot && cd k-pilot
# Create venv with system site packages (for PyGObject/D-Bus)
deactivate 2>/dev/null || true
rm -rf .venv
uv python pin 3.14
python3.14 -m venv --system-site-packages .venv
source .venv/bin/activate
uv sync --python 3.14Create a .env file:
GOOGLE_API_KEY=your_gemini_api_key
DEEPSEEK_API_KEY=your_deepseek_api_key
K_PILOT_LOG_LEVEL=INFO# Start the assistant
k-pilot
# Or via module
python -m k_pilotSay "Hey K-Pilot" followed by your command!
| Tool | Description | Example |
|---|---|---|
window.list |
List all open windows | "Show me my windows" |
window.focus |
Focus window by title/app | "Focus Firefox" |
media.play_pause |
Toggle playback | "Pause the music" |
media.get_info |
Current track info | "What's playing?" |
notification.list |
Read notifications | "Do I have any notifications?" |
notification.dismiss |
Clear notifications | "Dismiss all notifications" |
| Variable | Effect |
|---|---|
K_PILOT_LOG_LEVEL=DEBUG |
Verbose turn timing and tool traces |
K_PILOT_LOG_JSON=1 |
Structured JSON logging |
K_PILOT_MOCK_AUDIO=1 |
Test without microphone |
Every agent turn emits:
agent.turn.started/agent.turn.completed— withduration_ms,provider,modeltool.started/tool.completed/tool.failed— withtool_name,tool_call_id
🔒 Sensitive arguments (
command,text,summary) are automatically redacted in logs.
# Type checking (basedpyright)
uv run basedpyright
# Run tests
uv run pytest
# Check dependencies
uv treeK-Pilot is free software licensed under the GNU General Public License v3.0.
See LICENSE for full terms.