|
|
||
|---|---|---|
| daemon | ||
| dolphin | ||
| kate | ||
| krunner | ||
| lib | ||
| plasmoid | ||
| tray | ||
| .gitignore | ||
| CMakeLists-active.txt | ||
| CMakeLists-kf5.txt | ||
| CMakeLists.txt | ||
| Makefile | ||
| README.md | ||
| org.ollie.SessionManager.desktop | ||
| test-e2e.sh | ||
| test-peers.sh | ||
README.md
ollie-kde
KDE-native integration for ollie — a long-lived D-Bus daemon that manages AI agent sessions, with thin KDE clients (system tray, Plasmoid, KRunner, Kate plugin, Dolphin menus).
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Plasma Desktop │
│ System Tray │ KRunner │ Plasmoid │ Kate Plugin │ Dolphin │
└──────────────────────────┬───────────────────────────────────┘
│ D-Bus (org.ollie.SessionManager)
┌──────────────────────────┴───────────────────────────────────┐
│ ollie-kde daemon │
│ C++ Qt6 │ D-Bus adaptor │ libollie.so (Go) │
└──────────────────────────────────────────────────────────────┘
The daemon owns all sessions and the Go runtime (libollie.so). KDE components are pure D-Bus clients — lightweight, stateless, and independently restartable.
Dependencies
- Go 1.25+
- Qt 6 (Core, DBus, Widgets, Quick) or Qt 5 (Core, DBus, Widgets, Quick, Qml)
- KDE Frameworks 6 (StatusNotifierItem, Runner, TextEditor, CoreAddons, Config) or KDE Frameworks 5 (Notifications, Runner, TextEditor, CoreAddons, Config, Plasma)
- Plasma 6 or Plasma 5 (for Plasmoid)
- ECM (Extra CMake Modules)
- ollie/core (sibling directory at
../ollie/core)
KF6/Qt6 is the default (CMakeLists.txt). To build against KF5/Qt5, point CMake
at the alternate file:
cmake -S . -B build-cmake -DCMAKE_PROJECT_INCLUDE=CMakeLists-kf5.txt
# or copy/symlink it:
ln -sf CMakeLists-kf5.txt CMakeLists.txt
Build
make # builds libollie.so (Go) then ollie-kde + ollie-tray (CMake)
Outputs:
build/libollie.so— Go shared library (cgo c-shared)build-cmake/ollie-kde— D-Bus daemonbuild-cmake/ollie-tray— system tray iconbuild-cmake/lib/kf6/krunner/krunner_ollie.so— KRunner plugin (kf5/ on KF5 builds)build-cmake/lib/kf6/ktexteditor/ollie_kate.so— Kate plugin (kf5/ on KF5 builds)build-cmake/org/ollie/private/— Plasmoid QML plugin
Install
# Daemon + tray
sudo install -m755 build-cmake/ollie-kde /usr/bin/
sudo install -m755 build/libollie.so /usr/lib64/
# KRunner plugin (use kf5/ and qt5 paths on KF5 builds)
sudo cp build-cmake/lib/kf6/krunner/krunner_ollie.so /usr/lib64/qt6/plugins/kf6/krunner/
# Kate plugin
sudo cp build-cmake/lib/kf6/ktexteditor/ollie_kate.so /usr/lib64/qt6/plugins/kf6/ktexteditor/
# Plasmoid
make plasmoid-install
# KRunner (restart needed)
make krunner-install
# Dolphin service menus
make dolphin-install
# System tray (optional standalone)
sudo install -m755 build-cmake/ollie-tray /usr/bin/
Service Setup
The daemon starts automatically via XDG autostart when you log into a KDE Plasma
session. No manual service configuration is needed after make install.
To disable autostart without uninstalling:
# Per-user override
cp /etc/xdg/autostart/org.ollie.SessionManager.desktop ~/.config/autostart/
echo "Hidden=true" >> ~/.config/autostart/org.ollie.SessionManager.desktop
Manual
make run # foreground, for development
Usage
D-Bus API
The daemon registers as org.ollie.SessionManager on the session bus.
# Create a session
dbus-send --session --dest=org.ollie.SessionManager --type=method_call --print-reply \
/org/ollie/SessionManager org.ollie.SessionManager.CreateSession \
string:"$HOME" string:"" string:"" string:"default"
# Submit a prompt
dbus-send --session --dest=org.ollie.SessionManager --type=method_call --print-reply \
/org/ollie/SessionManager org.ollie.SessionManager.Submit \
string:"<session_id>" string:"your prompt here"
# Get chat output
gdbus call --session --dest org.ollie.SessionManager --object-path /org/ollie/SessionManager \
--method org.ollie.SessionManager.GetChat "<session_id>" 0
KRunner
ollie <prompt>— one-shot: creates session, submits, shows popup with resultollie list— show active sessionsollie kill <id>— terminate a session
Dolphin
Right-click any file or directory:
- Ask Ollie about this — one-shot prompt with file context, shows result in kdialog
- Start Ollie session here — creates a persistent session in that directory
Kate
Enable the "Ollie" plugin in Settings → Configure Kate → Plugins. Panel appears on the right with:
- Session indicator + CWD label
- New — create session in project/file directory
- Ask File — send current file path for description
- Explain — send selected text for explanation
- Prompt input for free-form messages
- Live-streaming chat view
Plasmoid
Add the "Ollie" widget to your panel or desktop:
- Session list with state indicators (○ idle, ● thinking, ⚡ tool call)
- Live chat view with auto-scroll
- Inline prompt input
- Real-time updates via D-Bus signals
System Tray
- Tooltip: session count
- Status: passive (no sessions), active (sessions idle), attention (agent working)
- Right-click: New Session, Sessions submenu (kill each), Stop All, Quit
D-Bus Interface
Methods:
CreateSession(cwd, backend, model, agent) → session_idListSessions() → [id\tstate\tmodel\tagent, ...]KillSession(session_id) → successRenameSession(session_id, new_name) → successSubmit(session_id, prompt) → successInterrupt(session_id) → successGetState(session_id) → stateGetChat(session_id, offset) → text, new_offsetGetUsage(session_id) → usageGetCost(session_id) → costGetConfig(session_id) → key=value pairsSetConfig(session_id, key, value) → successGetContext(session_id) → JSONL messagesListBackends() → [names]ListModels(session_id) → [names]ListAgents() → [names]PeerAdd(session_id, peer_id) → successPeerRemove(session_id, peer_id) → successPeerList(session_id) → [peer_ids]PeerSubmit(session_id, peer_id, prompt) → success
Signals:
SessionCreated(session_id)SessionKilled(session_id)StateChanged(session_id, new_state)ChatUpdated(session_id, offset, new_text)
File Layout
ollie-kde/
├── Makefile # Go + CMake orchestration
├── CMakeLists.txt
├── lib/
│ └── capi.go # cgo exports (libollie.so)
├── daemon/
│ ├── main.cpp # D-Bus registration, event loop
│ ├── session_manager.h/cpp # D-Bus adaptee, bridges C API
│ └── org.ollie.SessionManager.xml
├── tray/
│ ├── main.cpp
│ └── ollie_tray.h/cpp # KStatusNotifierItem
├── krunner/
│ ├── metadata.json
│ └── ollie_runner.h/cpp # KRunner plugin
├── kate/
│ ├── metadata.json
│ └── ollie_kate.h/cpp # KTextEditor plugin
├── plasmoid/
│ ├── metadata.json
│ ├── contents/ui/main.qml
│ └── plugin/
│ └── olliedbusclient.h/cpp # QML singleton (D-Bus client)
├── dolphin/
│ ├── ollie-actions.desktop # Service menu entries
│ ├── ollie-ask # One-shot helper script
│ └── ollie-session-here # Session creation helper
├── org.ollie.SessionManager.desktop # XDG autostart entry
└── test-e2e.sh # End-to-end test script