Plugin Architecture
Each plugin is a standalone process that communicates with the Lukan agent via IPC:- Discovery - Plugins are installed to
~/.config/lukan/plugins/ - Manifest - Each plugin defines a
plugin.tomlwith metadata, commands, tools, and auth requirements - Lifecycle - Init -> Ready (60s timeout) -> Running -> Shutdown
- Tools - Declared in
tools.jsonand executed via a handler script (e.g.,tools.js)
Managing Plugins
CLI Commands
Auto-Start
Configure plugins to auto-start inconfig.json:
Plugin Registry
Lukan maintains a remote plugin registry athttps://get.lukan.ai/registry.toml. Install plugins from it:
The registry URL can be customized with the
LUKAN_REGISTRY_URL environment variable.Plugin Manifest (plugin.toml)
Key Manifest Fields
| Field | Description |
|---|---|
name | Plugin identifier |
runtime | Required runtime (node, python, bun, deno) |
commands | CLI aliases the plugin registers |
tools.default | Default tools available to the plugin |
auth.type | Authentication method (qr, token, command) |
security | Security configuration injection |
Plugin Overrides
Override plugin behavior per-plugin inconfig.json:
CLI Aliases
Plugins can register CLI command aliases. For example, the WhatsApp plugin registerswa so lukan wa auth works directly. Reserved aliases (chat, setup, doctor, plugin, sandbox, etc.) cannot be used by plugins.
Plugin Authentication
Plugins support three authentication methods:- QR Code - Scan a QR code (e.g., WhatsApp)
- Token - Enter an API key or token
- Command - Run a custom auth command
Custom Tools
Plugins declare tools in atools.json file:
tools.js running with Node.js.
Plugin Prompt
Plugins can include aprompt.txt file that is automatically loaded into the system prompt when the plugin is active. This allows plugins to provide context-specific instructions to the agent.
Activity Bar & Views
Plugins can contribute to the desktop/web UI:- Activity Bar - Custom sidebar icons and labels
- Views - Custom UI views with unique IDs and view types
