MessagePresentation alongside their reply text β Telegram renders it as a native inline keyboard; other platforms fall back to plain text until their renderer is wired.
Quick Start
1
Quick-Reply Buttons
The simplest way to add buttons β each tapped choice feeds the value back to the agent as the next user message:
2
Inline Keyboard with Callbacks
Full control over button appearance and callback data:
3
Use with an Agent and Telegram Bot
How It Works
Theadapt_presentation() function runs a channel-agnostic adaptation pass before rendering: it truncates buttons to platform limits, degrades select menus to button rows when unsupported, and degrades web_app actions to URLs on channels without mini-app support.
Block Types
Action Types
Platform Support & Limits
Telegram Limits
WhatsApp Limits
Button Priorities
When more buttons are defined than the platform limit allows, the adaptation pass keeps the highest-priority buttons and drops the rest:
Best Practices
Use reply actions for simple choices
Use reply actions for simple choices
PresentationAction.reply(value) feeds the chosen value back directly as the userβs next message β your agent sees it as normal input without needing any callback handler.Keep callback values short and ASCII
Keep callback values short and ASCII
Telegramβs 64-byte callback cap is measured in UTF-8 bytes. Emoji, CJK, or long UUIDs can exhaust the budget quickly. Use compact IDs (e.g.
"approve:42") as callback payloads.Presentations are cleared after each turn
Presentations are cleared after each turn
The captured presentation is popped after
chat() in both streaming and non-streaming paths, so cancelling or returning never leaves stale buttons visible.Test with adapt_presentation()
Test with adapt_presentation()
Call
adapt_presentation(presentation, PresentationLimits.telegram()) before sending to preview which buttons survive the Telegram limit and how select menus are degraded. Use PresentationLimits.whatsapp(), .slack(), or .discord() to preview the other channels.Related
Approval Secure Backend
Durable approval buttons with actor authorisation
Bot Presentations
Overview of bot presentation capabilities
Interactive Bot Actions
Handling button taps and callbacks
Channel Capabilities
What each platform can render

