A2aEngine.Types.Message (a2a_engine v0.1.0)

Copy Markdown View Source

A single message in the conversation between a user and an agent.

Required: messageId, role ("user" | "agent"), parts. Always carries kind: "message" on the wire.

Summary

Types

role()

@type role() :: String.t()

t()

@type t() :: %A2aEngine.Types.Message{
  context_id: String.t() | nil,
  extensions: [String.t()] | nil,
  message_id: String.t(),
  metadata: map() | nil,
  parts: [A2aEngine.Types.Part.t()],
  reference_task_ids: [String.t()] | nil,
  role: role(),
  task_id: String.t() | nil
}

Functions

from_map(m)

@spec from_map(map()) :: {:ok, t()} | {:error, term()}

to_map(m)

@spec to_map(t()) :: map()