Skip to main content

Module tool

Module tool 

Source
Expand description

AI Tool Invocation Definition

A ToolInvocation records a specific action taken by an agent, such as reading a file, running a command, or querying a search engine.

§Purpose

  • Audit Trail: Allows reconstructing exactly what the agent did.
  • Cost Tracking: Can be used to calculate token/resource usage.
  • Debugging: Helps understand why an agent made a particular decision.

§Fields

  • tool_name: The identifier of the tool (e.g., “read_file”).
  • args: JSON arguments passed to the tool.
  • io_footprint: Files read/written during the operation (for dependency tracking).
  • status: Whether the tool call succeeded or failed.

Structs§

IoFootprint
IO footprint of a tool invocation. Tracks reads and writes for auditability.
ToolInvocation
Tool invocation record. Records a single tool call within a run.

Enums§

ToolStatus
Tool invocation status.