Send Result • AI Agent SDK

SendResult: Result of a single outbound send/edit through an adapter.

SendResult

Defined in the base module.

AI Agent

Result of a single outbound send/edit through an adapter.

A small, transport-neutral value returned by :meth:BasePlatformAdapter.send and the default delivery helpers so callers can react uniformly regardless of platform.

Attributes: ok: Whether the send succeeded. message_id: Platform message id of the last message sent (if any). For a chunked delivery this is the id of the final chunk. chat_id: The chat/channel the message was delivered to. message_ids: All platform message ids produced (one per chunk). error: Human-readable error string when `ok is False. error_kind: Structured, machine-readable classification of why the send failed (see :class:SendErrorKind). None on success or when a legacy adapter reports a failure without classifying it. retryable: Whether the failure is worth retrying. Derived from error_kind (permanent kinds → False); defaults True so an unclassified failure preserves the historical retry-everything behaviour rather than being silently dropped. retry_after: Suggested seconds to wait before retrying (from the platform's rate-limit response, if provided). queued: True when the send was persisted to a durable outbox for later delivery rather than delivered inline (status == "queued"). duplicate: True when a crash-recovered re-send may be a duplicate — an honest at-least-once outcome (status == "duplicate"`). metadata: Additional platform-specific result details.

Properties

ResponseField bool

No description available.

ResponseField Optional[str]

No description available.

ResponseField Optional[str]

No description available.

ResponseField List[str]

No description available.

ResponseField Optional[str]

No description available.

ResponseField Optional[SendErrorKind]

No description available.

ResponseField bool

No description available.

ResponseField Optional[float]

No description available.

ResponseField bool

No description available.

ResponseField bool

No description available.

ResponseField Dict[str, Any]

No description available.

Methods

Internal & Generic Methods
  • to_dict: Convert to a plain dictionary.

Source

View on GitHub

praisonaiagents/bots/base.py at line 346