langbot-app/langbot/langbot-eba-adapter-dev
Claude Code and agent skill by langbot-app/langbot
- community
Checking that the SKILL.md file is still in the repository.
Build, refactor, and test LangBot platform adapters for the Event-Based Agents architecture. Use when adding or migrating Telegram, Discord, or other messaging platform adapters to the EBA adapter layout, validating unified event/message conversion, writing live adapter probes, or using standalone plugin runtime plus Computer Use for end-to-end platform testing.
Install
npx vskill@latest install langbot-app/langbot/langbot-eba-adapter-devSKILL.md
The same SKILL.md was published earlier as langbot-app/langbot/langbot-eba-adapter-dev.
LangBot EBA Adapter Development
Use this skill when implementing or reviewing a LangBot platform adapter under the Event-Based Agents architecture.
Drive a live instance through the langbot-mcp-ops skill. Repository-wide adapter rules: "Platform Adapters" in the root AGENTS.md.
Core Rule
Do not let platform-native event or message shapes leak into LangBot's common path. Each adapter must convert incoming SDK objects into unified EBA entities before dispatch:
- Events:
langbot_plugin.api.entities.builtin.platform.events - Message chains:
langbot_plugin.api.entities.builtin.platform.message.MessageChain - Users/groups/members:
langbot_plugin.api.entities.builtin.platform.entities - Raw platform objects may remain only in
source_platform_objectfor debugging or platform-specific escape hatches.
Align With the Standard Definitions
Standard events: dev-docs/event-based-agents/01-event-system.md. Standard entities and APIs: 02-platform-api.md. Both include the per-platform support matrix.
- For each native event or operation, find the standard event/API with the same semantics first, even when the platform's naming or payload differs. Map to it; use
PlatformSpecificEvent/call_platform_apionly when no standard equivalent exists. - Prefer extending an existing standard message or API (for example, Slack threads use the standard message APIs) over adding new actions.
- A new standard event/API is justified only for a capability common across platforms. Change it as one unit: SDK entity/event, the matrices in
01/02, all affected adapters,docs/*/plugin/dev/apis/platform.mdx, and the ExecutionAPI/Workspace API consumers that expose it. - Keep
manifest.yaml(supported_events,supported_apis.required/optional,platform_specific_apis) identical to what is implemented and tested.
Start Here
- Read the EBA design docs in
LangBot/dev-docs/event-based-agents/, at least01-event-system.mdand02-platform-api.md. - Read the architecture-level acceptance checklist before writing or validating code:
LangBot/dev-docs/event-based-agents/adapters/acceptance-checklist.md
- Read the current reference adapter before writing code. Prefer Telegram first:
LangBot/src/langbot/pkg/platform/adapters/telegram/LangBot/dev-docs/event-based-agents/adapters/telegram.md
- Read the legacy source adapter for the target platform:
LangBot/src/langbot/pkg/platform/sources/<platform>.pyLangBot/src/langbot/pkg/platform/sources/<platform>.yaml
- Inspect SDK entity definitions in
LangBot/sdk/src/langbot_plugin/api/entities/builtin/platform/. - Search before assuming APIs. Platform SDKs change often.
Adapter Layout
Create one directory per adapter:
Add optional helpers such as voice.py only when the platform has a real domain-specific surface.
Ensure pyproject.toml package data includes adapter assets:
Implementation Checklist
manifest.yamldeclaresmetadata.name, config schema,supported_events,supported_apis(required/optional), andplatform_specific_apis.adapter.pycreates the platform client, subscribes to native events, filters self/bot loops where appropriate, callsevent_converter.target2yiri(...), then dispatches the EBA event.event_converter.pymaps native events to EBA event classes such asMessageReceivedEvent,MessageEditedEvent,MessageDeletedEvent,MessageReactionEvent,MemberJoinedEvent,BotInvitedToGroupEvent, andPlatformSpecificEvent.message_converter.pymaps native messages toMessageChain, and mapsMessageChainback to the platform send format.api_impl.pyimplements common EBA APIs: send, reply, edit, delete, forward, user/group/member lookup, moderation, upload/file URL, leave group.platform_api.pykeeps platform-specific calls behindcall_platform_api(action, params).- Unsupported common APIs must raise explicit SDK platform errors such as
NotSupportedError; do not silently no-op. - Destructive APIs such as kick, ban, leave, delete, or moderation must be gated in live tests and documented.
Conversion Contract
For message events, the common shape should look like this regardless of platform:
Message content should use common components:
Sourcefor original message id/time when available.Plainfor text.At/AtAllfor mentions.Image,Voice,Filefor media.Forwardonly when the platform can represent or emulate it safely.
If a platform event cannot cleanly map to a common event, emit PlatformSpecificEvent with a compact action and structured data.
Unit Tests
Add focused tests under LangBot/tests/unit_tests/platform/test_<platform>_eba_adapter.py.
Cover at least:
- Manifest supported events match adapter
supported_events(). - Manifest supported APIs match adapter
supported_apis(). - Platform API map matches manifest actions.
- Dispatcher chooses the most specific EBA listener.
- Message converter maps every supported common component both directions where possible:
SourcePlainAtAtAllImageVoiceFileQuoteFaceForwardUnknown- mixed chains preserving order
- Event converter maps message received/edited/deleted/reaction, raw uncached gateway events, member events, and bot join/leave events.
- Send/reply methods pass correct platform kwargs and return
MessageResult.
Run the existing reference adapter tests too:
Live Test Workflow
Direct adapter live probes are useful diagnostics, but they are not sufficient acceptance evidence for EBA. Treat tests/e2e/live_<platform>_eba_probe.py as an auxiliary tool only. The final adapter record must distinguish:
plugin-e2e-ui: real SDK plugin through standalone runtime, LangBot core, adapter, and a real/simulator UI action. This can mark an inbound UI item complete.plugin-e2e-protocol: real SDK plugin through standalone runtime, LangBot core, adapter, and a protocol-boundary injected event. This is useful evidence but must not be claimed as UI coverage.plugin-e2e-outbound: real SDK plugin calls an API and the bot output is visible in the real/simulator UI. This can mark send/API coverage complete.adapter-live: direct adapter probe connected to a real/simulator endpoint. This is auxiliary only.unit: mocked conversion/API-shape coverage. This is auxiliary only.not-supported: platform protocol or SDK has no equivalent. Must include the reason.blocked: intended capability could not be verified. This is not complete.
Write a live probe in LangBot/tests/e2e/live_<platform>_eba_probe.py. It should:
- Read token/client ids from environment variables or CLI args.
- Start the adapter directly.
- Register an EBA listener and write JSONL evidence to
LangBot/data/temp/. - Wait for a real user/platform event instead of fabricating the entrypoint.
- Exercise common APIs and
call_platform_apiactions. - Observe returned gateway events for edit/delete/reaction/member/bot lifecycle where available.
- Print a summary containing passed, failed, skipped, and observed event types.
- Redact or avoid printing secrets.
- Keep destructive operations behind flags and run them last.
Use Computer Use when the user asks for real platform end-to-end coverage. Actually send messages/click reactions in the platform UI or otherwise trigger real user-side events; do not replace that with unit tests.
For media/component acceptance, keep the direction and trigger source explicit:
- Real inbound media only counts when a human-side platform UI or simulator UI sends the image/file/voice to the bot and the plugin JSONL records the corresponding common component.
- Bot outbound media only proves
send_message/adapter send conversion. It does not prove inbound conversion. - Protocol-boundary injection, such as sending a OneBot event directly into a reverse WebSocket adapter, is useful and should be labelled
plugin-e2e-protocol, but it must not be reported as UI-level end-to-end media upload. - If the UI cannot send or upload the media, record the item as
blockedwith the exact client/simulator limitation.
Standalone Runtime + Plugin Test
When validating the whole LangBot EBA path, test with the SDK standalone runtime and a real test plugin. This is the required acceptance path; direct adapter calls do not prove the EBA architecture path.
The required path is:
Typical shape:
Use an EBA probe plugin that subscribes to all relevant EBA event classes and runs SDK API calls after the first MessageReceived.
The plugin evidence should be JSONL and include:
- event class and
event.type - adapter name
- chat type and chat ID
- sender/user/group IDs with secrets redacted
bot_uuidandadapter_name, proving LangBot filled common routing fields before plugin dispatch- received
message_chaincomponent list - API action name, input summary, result or error
- unsupported or blocked reason when an item is skipped
For full adapter acceptance, enable both probe sweeps:
EBA_PROBE_COMPONENT_SWEEP=1sends the required outbound message components throughsend_message.EBA_PROBE_PLATFORM_API=1calls common safe APIs plus selectedcall_platform_apiactions for the adapter.
The SDK must support plugin.call_platform_api(bot_uuid, action, params) for platform-specific acceptance. If the SDK cannot call a platform-specific action from the plugin, the adapter cannot be fully accepted even if direct adapter probes pass.
Required EBA Acceptance Coverage
Before marking an adapter migrated, fill out an adapter record against LangBot/dev-docs/event-based-agents/adapters/acceptance-checklist.md.
At minimum, the record must cover these categories:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/skills/langbot-eba-adapter-dev/SKILL.md
Popularity
- Repository stars
- 19,177
- Repository forks
- 1,722
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Nov 2026, 9 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/langbot-app/langbot/langbot-eba-adapter-dev)