Nox-Lumen MfgNox-Lumen Mfg

channel-sdk

One-liner

Feishu / WeCom / Slack / email / SCM webhooks ship in-box. If you run a custom IM, customer-specific ticketing, or any entry we didn’t wire, write a channel SKILL.

Install

Email for access

Request ragbase-channel-sdk at info@nox-lumen.com.

pip install ragbase-channel-sdk

Five-minute sample

ragbase-cli init channel my-im
cd my-im
vi src/my_im/adapter.py
from ragbase.channel_sdk import Channel, on_inbound, OutboundMessage
 
class MyIMChannel(Channel):
    @on_inbound
    def receive(self, ctx, raw_event):
        # Your IM payload → platform inbound message
        return ctx.normalize(
            sender=raw_event["user_id"],
            text=raw_event["body"],
            session_key=raw_event["thread_id"],
        )
 
    def send(self, ctx, msg: OutboundMessage):
        # Platform outbound → your IM API
        token = ctx.credentials["im_bot_token"]
        ctx.http.post(
            "https://my-im.internal/send",
            json={"to": msg.recipient, "body": msg.text},
            headers={"Authorization": f"Bearer {token}"},
        )

Platform handles routing, debounce, dedupe, reconnect, auditing—you translate formats.

Boundary vs source-sdk

  • channel = bidirectional chat (user message → AI reply)
  • source = unidirectional ingestion (system → KB)

Industry sparks

IndustryIdea
AutomotiveOEM-internal collaboration chat
ManufacturingLine-side work orders / scan terminals
Office appsHomegrown IM / support consoles

See also

On this page