langbot-plugin-dev
What it does
This skill guides an AI agent through writing and fixing plugins for LangBot, a bot platform. It is for developers who extend LangBot with new features.
When to use it
- βWhen you want to create a new LangBot plugin with commands, event listeners, or tools.
- βWhen a LangBot plugin has a bug that needs to be fixed and tested.
- βWhen you want to test a plugin against a running LangBot instance.
Skill link
https://github.com/langbot-app/LangBot/blob/master/skills/skills/langbot-plugin-dev/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to build a LangBot plugin that adds a command to summarize chat messages.β
5 new skills a week. 1 minute to read.
How it works
The agent follows a plugin layout with a manifest, a main file, and component files for listeners, commands, and tools. It then tests the plugin with automated WebSocket checks.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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-UIlbk_key or theapi.global_api_keyfromconfig.yaml). Manage bots, pipelines, models, knowledge bases, and skills. See thelangbot-mcp-opsskill. - LangBot Space marketplace β
https://space.langbot.app/mcp(auth: Personal Access Token). Search plugins / MCP servers / skills. See thelangbot-space-opsskill.
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:
- Root
README.mdMUST be in English. It is the default and the fallback β when no per-language README matches the viewer's locale, the page serves the rootREADME.md. A non-English root README makes the English/default view show the wrong language. - All other languages live under
readme/README_{lang}.mdβ e.g.readme/README_zh_Hans.md,readme/README_ja_JP.md. The 8 supported locales:en_US, zh_Hans, zh_Hant, ja_JP, th_TH, vi_VN, es_ES, ru_RU. manifest.yamlmetadata.label/metadata.descriptionshould carry the same 8-locale i18n set (repositorymust be a real, alive URL).
MyPlugin/
βββ manifest.yaml
βββ README.md # English (default + fallback) β REQUIRED, must be English
βββ readme/
βββ README_zh_Hans.md
βββ README_zh_Hant.md
βββ README_ja_JP.md
βββ README_th_TH.md
βββ README_vi_VN.md
βββ README_es_ES.md
βββ README_ru_RU.md
manifest.yaml (incl. repository) is the source of truth β the marketplace
syncs from it, so edit the package and re-publish rather than patching live data.
Critical SDK Pitfalls
1. MessageChain is a RootModel β iterate directly
# β WRONG β MessageChain has no .components attribute
for component in event.message_chain.components:
# β
CORRECT β MessageChain is a Pydantic RootModel, iterate directly
for component in event.message_chain:
2. Message.content must be list[ContentElement] or str, not a single ContentElement
from langbot_plugin.api.entities.builtin.provider import message as provider_message
# β WRONG β single ContentElement
Message(role="user", content=ContentElement.from_text("hello"))
# β
CORRECT β list of ContentElement
Message(role="user", content=[ContentElement.from_text("hello")])
# β
ALSO CORRECT β plain string
Message(role="user", content="hello")
3. invoke_llm does NOT accept timeout
# β WRONG
await self.invoke_llm(llm_model_uuid=uuid, messages=msgs, timeout=60)
# β
CORRECT
await self.invoke_llm(llm_model_uuid=uuid, messages=msgs)
4. invoke_llm response.content can be str OR list
response = await self.invoke_llm(...)
if response.content:
if isinstance(response.content, str):
return response.content
elif isinstance(response.content, list):
parts = [e.text for e in response.content if hasattr(e, "text") and e.text]
return "\n".join(parts)
5. get_llm_models() returns UUIDs
# Returns list[str] of model UUIDs
models = await self.get_llm_models()
model_uuid = models[0] # First available model UUID
Known bug (v4.9.3): The host handler may return list[dict] instead of list[str]. If you hit TypeError: unhashable type: 'dict' in invoke_llm, the fix is in LangBot/src/langbot/pkg/plugin/handler.py β change 'llm_models': llm_models to `'llm_models': [m['uuid'] for m in ll
FAQ
What parts make up a LangBot plugin?
A plugin has a manifest file, a main file, and folders for event listeners, commands, and tools. Each component has a settings file and a code file.
Can the agent test the plugin without the web interface?
Yes. The skill describes automated WebSocket-based tests that run against a live instance.
Can the agent also manage the running instance?
Yes. The skill points to the LangBot MCP operations skill for controlling a live instance.
Details
Original description by the author
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".
repo: langbot-app/LangBot
Popularity
- GitHub stars
- 19k
- Ranking position
- #10512
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
langbot-deploy
19kHelps your agent deploy and configure a self-hosted LangBot instance with Docker, Compose or Kubernetes, including its model and API key settings.
langbot-env-setup
19kHelps your agent get a local LangBot test environment running, including startup checks, proxy settings, and a browser that stays signed in.
langbot-mcp-ops
19kLets your agent manage a LangBot instance through its built-in MCP server, handling bots, pipelines, models, and knowledge bases without raw web calls.
langbot-space-ops
19kLets your agent search the LangBot Space marketplace for plugins, MCP servers, and skills, and get a ranked list of models for setup.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.