langbot-plugin-dev
O que ela faz
Esta skill guia um agente de IA na escrita e correção de plugins para o LangBot, uma plataforma de bots. Ela é para desenvolvedores que estendem o LangBot com novos recursos.
Quando usar
- ✓Quando você quer criar um novo plugin do LangBot com comandos, ouvintes de eventos ou ferramentas.
- ✓Quando um plugin do LangBot tem um bug que precisa ser corrigido e testado.
- ✓Quando você quer testar um plugin contra uma instância do LangBot em execução.
Link da skill
https://github.com/langbot-app/LangBot/blob/master/skills/skills/langbot-plugin-dev/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Quero construir um plugin do LangBot que adicione um comando para resumir mensagens de um chat.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente segue uma estrutura de plugin com um manifesto, um arquivo principal e arquivos de componentes para ouvintes, comandos e ferramentas. Depois testa o plugin com verificações automáticas por WebSocket.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Quais partes compõem um plugin do LangBot?
Um plugin tem um arquivo de manifesto, um arquivo principal e pastas para ouvintes de eventos, comandos e ferramentas. Cada componente tem um arquivo de configuração e um arquivo de código.
O agente consegue testar o plugin sem a interface web?
Sim. A skill descreve testes automáticos baseados em WebSocket que rodam contra uma instância ativa.
O agente também consegue gerenciar a instância em execução?
Sim. A skill aponta para a skill de operações MCP do LangBot, que controla uma instância ativa.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 19 mil
- Posição no ranking
- #10512
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
langbot-deploy
19 milAjuda seu agente a implantar e configurar uma instância LangBot self-hosted com Docker, Compose ou Kubernetes, incluindo as configurações de modelo e de chave de API.
langbot-env-setup
19 milAjuda seu agente a colocar um ambiente de teste local do LangBot em funcionamento, incluindo verificações de inicialização, configurações de proxy e um navegador que permanece conectado.
langbot-mcp-ops
19 milPermite que seu agente gerencie uma instância do LangBot pelo servidor MCP integrado, cuidando de bots, pipelines, modelos e bases de conhecimento sem chamadas web diretas.
langbot-space-ops
19 milPermite que seu agente pesquise no marketplace LangBot Space por plugins, servidores MCP e skills, e obtenha uma lista ranqueada de modelos para a configuração.
Skills parecidas
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.