Skip to content

[Gap] Channels ship in-tree + register_platform(), not installable plugin packs — vs OpenClaw channel SDK #1328

@Dhivya-Bharathy

Description

@Dhivya-Bharathy

[Gap] Channels ship in-tree + register_platform(), not installable plugin packs — vs OpenClaw channel SDK

Executive summary

Field Content
OpenClaw reference Channel plugin SDK, SDK overview, community/distribution — installable channel plugins as a product concept.
PraisonAI reality New messengers are Python modules under praisonai/bots/ registered in _BUILTIN_PLATFORMS or via register_platform() at runtime — no packaged plugin manifest, versioned channel package format, or marketplace flow comparable to OpenClaw’s channel-plugin story in this repo.
Gap type Extensibility model — contributor path is edit core tree or imperative register_platform, not “drop in channel plugin package.”
Severity Platform / parity. Affects: long-tail enterprise messengers, community-owned channels.

1. Built-in platforms — static dictionary + lazy import

File: src/praisonai/praisonai/bots/_registry.py

_BUILTIN_PLATFORMS: Dict[str, tuple] = {
    "telegram": ("praisonai.bots.telegram", "TelegramBot"),
    "discord": ("praisonai.bots.discord", "DiscordBot"),
    "slack": ("praisonai.bots.slack", "SlackBot"),
    "whatsapp": ("praisonai.bots.whatsapp", "WhatsAppBot"),
    "email": ("praisonai.bots.email", "EmailBot"),
    "agentmail": ("praisonai.bots.agentmail", "AgentMailBot"),
}

Resolution loads the module by string path:

    if key in _BUILTIN_PLATFORMS:
        ref = _BUILTIN_PLATFORMS[key]
        if isinstance(ref, tuple):
            module_path, class_name = ref
            import importlib
            mod = importlib.import_module(module_path)
            return getattr(mod, class_name)

Takeaway: Adding a new first-class channel today implies shipping a new module under praisonai.bots.* and editing _BUILTIN_PLATFORMS (or relying on register_platform at process start — see below).


2. Runtime registration API (no package format)

File: src/praisonai/praisonai/bots/_registry.py

def register_platform(name: str, adapter_class: Type) -> None:
    """Register a custom platform adapter.
    ...
    """
    _custom_platforms[name.lower()] = adapter_class

Takeaway: This is a process-local registry hook — powerful, but not equivalent to OpenClaw’s channel plugin SDK (manifest, entrypoints, install UX, versioning, isolation). There is no plugins/ channel bundle layout in-tree for third parties.


3. Public package surface — fixed lazy exports

File: src/praisonai/praisonai/bots/__init__.py

__getattr__ hard-codes imports for TelegramBot, DiscordBot, SlackBot, WhatsAppBot, EmailBot, AgentMailBot, Bot, BotOS, approval helpers (__init__.py:25–65).

__all__ lists the same concrete names (__init__.py:68–73).

Takeaway: The documented ergonomic API is tied to known bots — not “load_plugin('acme-slack-fork')”.


4. Directory inventory (in-tree channels)

Under src/praisonai/praisonai/bots/ (authoring snapshot):

  • Adapters: telegram.py, discord.py, slack.py, whatsapp.py, email.py, agentmail.py
  • Core: bot.py, botos.py, _registry.py, shared _*.py helpers

No subdirectory such as plugins/, third_party_channels/, or dynamic wheel-loading samples in this trace.


5. Architecture (Mermaid)

OpenClaw (conceptual — channel plugins)

flowchart LR
  H[Channel hub / SDK]
  P1[Plugin pkg A]
  P2[Plugin pkg B]
  H --> P1
  H --> P2
Loading

PraisonAI (this repo)

flowchart TB
  REG[_BUILTIN_PLATFORMS dict]
  MOD[praisonai.bots.* modules]
  CUST[register_platform at runtime]
  REG --> MOD
  CUST --> REG
Loading

Gap: No third box for installable channel plugin packages with stable ABI documented like OpenClaw.


6. Comparison matrix

Dimension OpenClaw (documented) PraisonAI (this repo)
Add channel Plugin SDK / bundles New module in bots/ + registry edit or register_platform
Discovery Community / registry story Code + docs
Versioning Plugin versioning Praison release cadence
Isolation Plugin boundary Shared process / imports

7. MCP / webhooks (related, not duplicate)

Praison can integrate external systems via MCP and webhooks elsewhere in the stack — this issue is only about in-process channel adapter parity with OpenClaw’s channel plugin model. MCP is a different integration style.


8. Suggested engineering directions

  1. Wontfix: Position MCP + webhooks as the extension path; close with rationale.
  2. RFC: Define praisonai-channel-*.whl manifest (name, entrypoint class, config schema) + praisonai bots plugin install.
  3. Minimal spike: Load one example plugin from entry_points (importlib.metadata) behind feature flag.

9. Acceptance criteria

  • Decision: plugin SDK epic | MCP-only | hybrid.
  • If SDK: hello-world plugin repo + tests + docs.
  • If wontfix: evaluator-facing paragraph on extension model.

10. Out of scope

  • Rewriting Telegram/Slack adapters.
  • Marketplace payments / legal review — until technical load path exists.

Appendix — files cited

Path Role
src/praisonai/praisonai/bots/_registry.py Built-ins + register_platform + resolve_adapter
src/praisonai/praisonai/bots/__init__.py Lazy exports, __all__
src/praisonai/praisonai/bots/*.py Concrete channel implementations

Evidence from PraisonAI src/praisonai/; re-verify after refactors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions