Skip to main content

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_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.

Properties

int
No description available.
str
No description available.
bool
No description available.
bool
No description available.
str
No description available.
bool
No description available.
int
No description available.
int
No description available.
int
No description available.
List[str]
No description available.
bool
No description available.
bool
No description available.
bool
No description available.
bool
No description available.
bool
No description available.
  • from_dict: Create from dictionary.
  • to_dict: Convert to dictionary.

Source

View on GitHub

praisonaiagents/bots/protocols.py at line 72