ExAgent. Tool. Content
(ExAgent v3.0.0)
View Source
Model-visible image output from a tool declared with result_mode: :multimodal.
Stability — Candidate.
Return {:content, parts}. Each part is a string-keyed map with either
"type" => "text" and UTF-8 "text", or "type" => "image",
"media_type" (PNG, JPEG or WebP) and padded base64 "data" with the
corresponding image signature.
At least one image is required. The content struct must fit within 1 MiB
measured as an Erlang external term before base64 decoding. The run's
reservation for the entire return also applies. Guardrails and result hooks
receive this struct as the successful tool return's content.
Summary
Types
@type t() :: %ExAgent.Tool.Content{parts: [ExAgent.Message.Part.User.content_part()]}