ExAgent.Message.Part.ToolReturn (ExAgent v1.1.0)

Copy Markdown View Source

The return value of a tool call, fed back to the model.

usage is an optional contributed token usage (e.g. from a delegated sub-agent run) that the agent loop merges into the run's accumulated usage. It is nil for ordinary tools and is not part of the serialized message history (usage is accounted for at runtime).

Summary

Types

t()

@type t() :: %ExAgent.Message.Part.ToolReturn{
  content: term(),
  tool_call_id: String.t(),
  tool_name: String.t(),
  usage: ExAgent.Message.Usage.t() | nil
}