Nous.Eval.Trace.ToolCall (nous v0.21.1)

Copy Markdown View Source

One tool call reconstructed from a Nous.Eval.Trace by Nous.Eval.Trace.tool_calls/2.

Built by pairing [:nous, :agent, :tool_call, :start] and :stop on tool_call_id.

  • :id - the tool_call_id
  • :name - the tool name
  • :arguments - the arguments the tool ran with: the post-edit arguments when approval is :edited, else the requested ones
  • :original_arguments - the arguments the model requested (differs from :arguments only when the call was edited at approval)
  • :outcome - :executed | :invalid_arguments | :collapsed | :hook_denied | :hook_stage_failed | :approval_rejected | :not_found | :timeout | :crashed, or :incomplete when the trace holds a start without a stop (the run was killed mid-call, or the tail was truncated)

  • :approval - :not_required | :approved | :edited | :rejected, nil when incomplete

  • :result / :error - from the stop event
  • :iteration - the agent loop iteration that requested the call
  • :agent_run_id / :parent_agent_run_id - the run that made the call and its parent run (nil for the root run)
  • :batch - {agent_run_id, iteration}; calls requested by the same model response share it and may have run in parallel
  • :seq - the seq of the start event (or of the stop event when the start is missing); orders calls within the trace

Summary

Functions

Every outcome a reconstructed call may have, including :incomplete.

Types

approval()

@type approval() :: :not_required | :approved | :edited | :rejected

outcome()

@type outcome() ::
  :executed
  | :invalid_arguments
  | :collapsed
  | :hook_denied
  | :hook_stage_failed
  | :approval_rejected
  | :not_found
  | :timeout
  | :crashed
  | :incomplete

t()

@type t() :: %Nous.Eval.Trace.ToolCall{
  agent_run_id: String.t() | nil,
  approval: approval() | nil,
  arguments: map() | nil,
  batch: {String.t() | nil, non_neg_integer() | nil},
  error: term(),
  id: String.t() | nil,
  iteration: non_neg_integer() | nil,
  name: String.t() | nil,
  original_arguments: map() | nil,
  outcome: outcome(),
  parent_agent_run_id: String.t() | nil,
  result: term(),
  seq: non_neg_integer()
}

Functions

outcomes()

@spec outcomes() :: [outcome()]

Every outcome a reconstructed call may have, including :incomplete.