मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)19k · #10512

langbot-plugin-dev

यह क्या करती है

यह स्किल एक AI एजेंट को LangBot, एक bot प्लेटफ़ॉर्म, के लिए plugins लिखने और ठीक करने में मार्गदर्शन देती है। यह उन डेवलपरों के लिए है जो LangBot में नई सुविधाएँ जोड़ते हैं।

कब इस्तेमाल करें

  • ✓जब आप commands, event listeners या tools के साथ नया LangBot plugin बनाना चाहते हों।
  • ✓जब किसी LangBot plugin में बग हो जिसे ठीक करके परखना हो।
  • ✓जब आप चल रहे LangBot इंस्टेंस के खिलाफ़ plugin परखना चाहते हों।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/langbot-app/LangBot/blob/master/skills/skills/langbot-plugin-dev/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं एक LangBot plugin बनाना चाहता हूँ जो चैट संदेशों का सार बनाने वाला command जोड़े।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट एक plugin संरचना का पालन करता है, जिसमें manifest, मुख्य फ़ाइल और listeners, commands व tools के लिए component फ़ाइलें होती हैं। फिर वह स्वचालित WebSocket जाँच से plugin परखता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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-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:

  • Root README.md MUST be in English. It is the default and the fallback — when no per-language README matches the viewer's locale, the page serves the root README.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.yaml metadata.label / metadata.description should carry the same 8-locale i18n set (repository must 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

अक्सर पूछे जाने वाले सवाल

LangBot plugin के कौन-से हिस्से होते हैं?

एक plugin में manifest फ़ाइल, मुख्य फ़ाइल, और event listeners, commands व tools के फ़ोल्डर होते हैं। हर component की एक सेटिंग्स फ़ाइल और एक code फ़ाइल होती है।

क्या एजेंट वेब इंटरफ़ेस के बिना plugin परख सकता है?

हाँ। स्किल स्वचालित WebSocket आधारित परीक्षणों का वर्णन करती है, जो लाइव इंस्टेंस के खिलाफ़ चलते हैं।

क्या एजेंट चल रहे इंस्टेंस को भी संभाल सकता है?

हाँ। स्किल लाइव इंस्टेंस नियंत्रित करने के लिए LangBot MCP operations स्किल की ओर इशारा करती है।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
19k
रैंकिंग में स्थान
#10512
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

langbot-deploy

19k

आपके एजेंट को Docker, Compose या Kubernetes से अपना होस्ट किया गया LangBot इंस्टेंस डिप्लॉय और कॉन्फ़िगर करने में मदद करती है, जिसमें उसकी model और API key सेटिंग्स शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

langbot-env-setup

19k

आपके एजेंट को स्थानीय LangBot परीक्षण वातावरण चालू करने में मदद करती है, जिसमें startup जाँच, proxy सेटिंग्स और ऐसा browser शामिल है जो साइन इन रहता है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

langbot-mcp-ops

19k

आपके एजेंट को LangBot इंस्टेंस को उसके अंतर्निहित MCP server से संभालने देती है, bots, pipelines, models और knowledge bases को कच्चे वेब कॉल के बिना नियंत्रित करते हुए।

AI और एजेंटकनेक्टर (MCP)

langbot-space-ops

19k

आपके एजेंट को LangBot Space marketplace में plugins, MCP servers और skills खोजने देती है, और setup के लिए models की क्रमबद्ध सूची लेने देती है।

AI और एजेंटकनेक्टर (MCP)

मिलती-जुलती skills