A single turn of communication between user and agent.
Messages contain typed parts and are identified by role (:user or :agent).
Summary
Functions
Creates a new agent message from text or parts.
Creates a new user message from text or parts.
Extracts the text from the first A2A.Part.Text part, or nil if none.
Types
Functions
@spec new_agent(String.t() | [A2A.Part.t()]) :: t()
Creates a new agent message from text or parts.
@spec new_user(String.t() | [A2A.Part.t()]) :: t()
Creates a new user message from text or parts.
Extracts the text from the first A2A.Part.Text part, or nil if none.