Skip to main content
Plugins are the primary extension mechanism for Lukan. They add new tools, CLI commands, channels, and UI views.

Plugin Architecture

Each plugin is a standalone process that communicates with the Lukan agent via IPC:
  1. Discovery - Plugins are installed to ~/.config/lukan/plugins/
  2. Manifest - Each plugin defines a plugin.toml with metadata, commands, tools, and auth requirements
  3. Lifecycle - Init -> Ready (60s timeout) -> Running -> Shutdown
  4. Tools - Declared in tools.json and executed via a handler script (e.g., tools.js)

Managing Plugins

CLI Commands

Auto-Start

Configure plugins to auto-start in config.json:

Plugin Registry

Lukan maintains a remote plugin registry at https://get.lukan.ai/registry.toml. Install plugins from it:
The registry supports platform-specific binaries (linux-x86_64, linux-aarch64, darwin, etc.) and universal Node.js plugins.
The registry URL can be customized with the LUKAN_REGISTRY_URL environment variable.

Plugin Manifest (plugin.toml)

Key Manifest Fields

Plugin Overrides

Override plugin behavior per-plugin in config.json:

CLI Aliases

Plugins can register CLI command aliases. For example, the WhatsApp plugin registers wa 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 a tools.json file:
Tools are executed through the plugin’s handler script, typically tools.js running with Node.js.

Plugin Prompt

Plugins can include a prompt.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