Built-in Plugins
xbot ships three built-in plugins in the repository under plugins/:
| Plugin ID | Directory | Type | Purpose |
|---|---|---|---|
xbot.genui | plugins/xbot-genui/ | Go stdio channel plugin | The display_html tool — LLM-generated interactive UI (charts, 3D, animations) rendered as a streaming preview in the web chat |
xbot.git-fancy | plugins/xbot-git-fancy/ | Go stdio plugin | Fancy Git panel — branches, working-tree changes, paginated commit history, commit details, and a full-width Monaco diff tab |
xbot.ambience | plugins/xbot-ambience/ | script runtime (UI-only) | Web ambience layer — wallpapers, glass effects, an animated desk-pet widget and particle overlays |
All three are zero- or minimal-dependency and installed by xbot-cli setup into
$XBOT_HOME/plugins/builtin/ (version-pinned to the release).
Two supported ways to use them:
1. Install into the user plugin directory (production-style)
# From the repository root: builds and installs BOTH plugins
make plugins-install
# → ~/.xbot/plugins/xbot.genui/ and ~/.xbot/plugins/xbot.git-fancy/
Reload to activate (or restart xbot):
tui_control(action=reload_plugins)
2. Run directly from the repository checkout (development)
make plugins-build
XBOT_PLUGIN_DIRS="$(pwd)/plugins" xbot
The XBOT_PLUGIN_DIRS environment variable is a path-separated list of
extra directories scanned during plugin discovery. Alternatively, list the
repository path permanently in config.json:
{
"plugins": {
"enabled": true,
"dirs": ["/path/to/xbot/plugins"]
}
}
User-installed copies always take precedence: discovery dedups by plugin ID
and scans ~/.xbot/plugins/ first, so an installed copy shadows the
repository version.
- At startup, the agent creates the
PluginManager(whenplugins.enabledis true) and callsDiscover()(seeagent/agent.go). Discover()scans the directories returned byplugin.DefaultPluginDirs(xbotHome)—~/.xbot/plugins/,~/.xbot/plugins/builtin/, plus anyXBOT_PLUGIN_DIRSentries and theplugins.dirsentries fromconfig.json.- Every subdirectory containing a valid
plugin.jsonbecomes a candidate plugin; duplicates (same manifestid) are skipped with a warning. ActivateAll()then activates every discovered plugin whoseactivationEventsincludesonStart.
The GenUI plugin additionally declares a channel provider (genui).
Channel plugin instances are only created when the channel is enabled in
config.json:
{
"channels": {
"genui": { "enabled": "true" }
}
}
Installing the plugin alone is NOT enough — without the channels.genui
entry, IsEnabled returns false and the display_html tool stays invisible
to the LLM.
- xbot-genui — GenUI (display_html): interactive UI generation
- xbot-git-fancy — Fancy Git panel
- xbot-ambience — Web ambience layer (wallpapers, glass, desk pet)