Message Params • AI Agent SDK

MessageParams: Validated “message“ frame — a client turn sent to the agent.

MessageParams

Defined in the protocols module.

AI Agent

Validated `message` frame — a client turn sent to the agent.

Completes the typed contract for the advertised `message` method so it is no longer hand-parsed per handler.

Attributes: content: The message body (text, or a structured payload). session_id: Optional session the message belongs to. message_id: Optional client-supplied idempotency/correlation id. request_id: Optional client-supplied request-idempotency key (Issue #5193). When present the gateway dedups a resend of the same `request_id — a request queued while reconnecting and flushed on reconnect runs the turn exactly once instead of being lost or double-run. Absent keeps the legacy fire-and-forget behaviour. attachments: Optional list of :class:AttachmentRef (Issue #5207) — a first-class, size-bounded way for any /ws` client (not just platform bots) to hand the agent files. Defaults to empty, so a frame without attachments decodes exactly as before. metadata: Optional additional message metadata.

Properties

ResponseField Union

No description available.

ResponseField Optional[str]

No description available.

ResponseField Optional[str]

No description available.

ResponseField Optional[str]

No description available.

ResponseField List[AttachmentRef]

No description available.

ResponseField Dict[str, Any]

No description available.

ResponseField str

No description available.

Methods

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 777