Channel Plugin SDK
Channel plugins usedefineChannelPluginEntry(...) from
openclaw/plugin-sdk/core and implement the ChannelPlugin contract.
Minimal channel entry
ChannelPlugin shape
Important sections of the contract:
meta: docs, labels, and picker metadatacapabilities: replies, polls, reactions, threads, media, and chat typesconfigandconfigSchema: account resolution and config parsingsetupandsetupWizard: onboarding/setup flowsecurity: DM policy and allowlist behaviormessaging: target parsing and outbound session routingactions: sharedmessagetool discovery and executionpairing,threading,status,lifecycle,groups,directory
openclaw/plugin-sdk/channel-contract.
Shared message tool
Channel plugins own their channel-specific part of the shared message tool
through ChannelMessageActionAdapter.
ChannelMessageActionAdapterChannelMessageActionContextChannelMessageActionDiscoveryContextChannelMessageToolDiscovery
Outbound routing helpers
When a channel plugin needs custom outbound routing, implementmessaging.resolveOutboundSessionRoute(...).
Use buildChannelOutboundSessionRoute(...) from plugin-sdk/core to return the
standard route payload:
Pairing helpers
Useplugin-sdk/channel-pairing for DM approval flows:
Channel setup helpers
Use:plugin-sdk/channel-setupfor optional or installable channelsplugin-sdk/setupfor setup adapters, DM policy, and allowlist promptsplugin-sdk/webhook-ingressfor plugin-owned webhook routes
Channel plugin guidance
- Keep transport-specific execution inside the channel package.
- Use
channel-contracttypes in tests and local helpers. - Keep
describeMessageTool(...)andhandleAction(...)aligned. - Keep session routing in
messaging, not in ad-hoc command handlers. - Prefer focused subpaths over broad runtime coupling.