Platform Capabilities • AI Agent SDK
PlatformCapabilities: Platform-specific capabilities descriptor for bot adapters.
PlatformCapabilities
Defined in the protocols module.
AI Agent
Platform-specific capabilities descriptor for bot adapters.
Declares what a messaging platform can do, enabling the shared delivery machinery to apply features like streaming, rate limiting, and chunking uniformly across all platforms.
Attributes: max_message_length: Maximum message length in the platform’s unit length_unit: Unit for message length (“codepoints” or “utf16”) supports_edit: Whether the platform supports in-place message edits (for streaming) supports_delete: Whether the platform supports deleting a sent message. When True the adapter MUST override `delete_message; the capability contract is verified at adapter build time so a declared-but-unbacked flag fails early rather than silently no-opping mid-turn. supports_typing: Whether the platform supports typing indicators markdown_dialect: Markdown flavor the platform uses (e.g., "markdown", "telegram_markdown_v2") needs_rate_limit: Whether the platform needs rate limiting edit_interval_ms: Minimum milliseconds between message edits (for streaming) max_files_per_message: Maximum number of file attachments per message max_file_size_mb: Maximum file size in megabytes supported_file_types: List of supported file extensions/mime types accepts_webhooks: Whether the platform delivers inbound messages via webhook verifies_webhook_signature: Whether the adapter verifies inbound webhook authenticity. Adapters that accept webhooks MUST set this True and expose a webhook_verifier so central ingress can enforce it fail-closed. reconciles_unknown_send: Whether the adapter can confirm whether a prior send attempt actually landed (e.g. via a provider message-status lookup keyed on the idempotency key). When True the durable outbox reconciles an in-flight (sending) entry on restart before re-dispatch, upgrading delivery from at-least-once to effectively-once. When False, delivery remains at-least-once and a crash mid-send may re-send the message. supports_media: Whether the adapter can attach/upload media files on outbound sends (photos, documents). When False, the gateway's delivery router degrades gracefully and reports media as not attached rather than silently dropping it. supports_idempotency_token: Whether the transport accepts a provider-level idempotency token so the platform itself de-duplicates a retried send. This is an informational capability descriptor only; the durable outbox does not forward a token on resend, so adapters relying on provider-side dedupe should also set reconciles_unknown_send to get effectively-once delivery. supports_threads: Whether the adapter can open a new thread/topic under a chat (e.g. Telegram forum topics, Discord threads, Slack thread anchoring). When False, create_thread returns a typed unsupported outcome and callers fall back to the parent channel rather than raising. supports_status_text: Whether the adapter can render a short, replaceable textual status line (e.g. "🔍 Searching the web...") without editing a message or adding reactions. When True the adapter SHOULD implement async set_status_text(channel_id, text) (an empty text clears the line when the turn ends); streaming auto/progress on a non-edit channel then routes the curated activity line there instead of degrading to off`.
Properties
intNo description available.
strNo description available.
boolNo description available.
boolNo description available.
strNo description available.
boolNo description available.
intNo description available.
intNo description available.
intNo description available.
List[str]No description available.
boolNo description available.
boolNo description available.
boolNo description available.
boolNo description available.
boolNo description available.
boolNo description available.
boolNo description available.
boolNo description available.
Internal & Generic Methods
- from_dict: Create from dictionary.
- to_dict: Convert to dictionary.
Source
View on GitHubpraisonaiagents/bots/protocols.py at line 74