# Langbot Plugin Dev

Develop, debug, and test LangBot plugins.

- Repository: https://github.com/langbot-app/LangBot (18661 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add langbot-app/LangBot --skill langbot-plugin-dev -g -a claude-code -y`
Codex: `npx skills add langbot-app/LangBot --skill langbot-plugin-dev -g -a codex -y`
Cursor: `npx skills add langbot-app/LangBot --skill langbot-plugin-dev -g -a cursor -y`
Gemini CLI: `npx skills add langbot-app/LangBot --skill langbot-plugin-dev -g -a gemini-cli -y`

## Description

Develop, debug, and test LangBot plugins. Use when creating new LangBot plugins, fixing plugin bugs, setting up a LangBot test environment, or testing plugins via WebSocket. Covers plugin component architecture (EventListener, Command, Tool), the plugin SDK API (invoke_llm, get_llm_models, send_message, plugin storage), common pitfalls, and automated WebSocket-based testing. Triggers on "langbot plugin", "lbp", "GroupChatSummary", "plugin debug", "langbot test".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# LangBot Plugin Development & Debugging

## Controlling a running instance via MCP

Beyond writing code, you can **drive a live LangBot instance over MCP**, no raw
HTTP needed. Two MCP servers exist (both reuse existing API keys; see `AGENTS.md`):

- **LangBot instance**, `http://<host>:5300/mcp` (auth: web-UI `lbk_` key or the
  `api.global_api_key` from `config.yaml`). Manage bots, pipelines, models,
  knowledge bases, and skills. See the **`langbot-mcp-ops`** skill.
- **LangBot Space marketplace**, `https://space.langbot.app/mcp` (auth: Personal
  Access Token). Search plugins / MCP servers / skills. See the
  **`langbot-space-ops`** skill.

> Any change to an agent-accessible HTTP API endpoint must keep the matching MCP
> tool and these skills in sync.

## Plugin Architecture

A LangBot plugin consists of:

```
MyPlugin/
├── manifest.yaml          # Plugin metadata, config schema
├── main.py                # BasePlugin subclass (entry point, shared state)
├── components/
│   ├── event_listener/    # Hook pipeline events
│   │   ├── collector.yaml
│   │   └── collector.py
│   ├── commands/          # !command handlers
│   │   ├── mycommand.yaml
│   │   └── mycommand.py
│   └── tools/             # LLM function-call tools
│       ├── mytool.yaml
│       └── mytool.py
```

Each component has a `.yaml` (metadata) and `.py` (implementation).

## README & i18n convention (enforced on the marketplace)

A plugin published to LangBot Space serves a localized README on its detail page.
The resolver (`langbot-space` `PluginService.GetPluginREADME`) works like this:

The rest: https://github.com/langbot-app/LangBot/blob/HEAD/skills/skills/langbot-plugin-dev/SKILL.md
