Presentation Renderer Protocol • AI Agent SDK

PresentationRendererProtocol: Contract a channel presentation renderer implements.

PresentationRendererProtocol

Defined in the protocols module.

AI Agent

Contract a channel presentation renderer implements.

A renderer converts a portable :class:MessagePresentation into a native, platform-specific payload (Telegram inline keyboard, Slack blocks, …). It should run `adapt_presentation against its own :meth:get_limits` first so capability-driven degradation is applied uniformly.

This protocol is the core seam that lets any channel — built-in or a pip-installed plugin — register a native renderer via `register_presentation_renderer, mirroring how a channel already contributes config via :class:ChannelDescriptor. Heavy renderer implementations still live in praisonai-bot`; only the contract and the registry live in core.

Methods

Source

View on GitHub

praisonaiagents/bots/protocols.py at line 1404