Skip to main content

Module executor

Module executor 

Source
Expand description

Tool executor: manages concurrent and serial tool execution.

The executor partitions tool calls into batches:

  • Read-only (concurrency-safe) tools run in parallel
  • Mutation tools run serially

This mirrors the streaming tool executor pattern where tools begin execution as soon as their input is fully parsed from the stream, maximizing throughput.

Structs§

PendingToolCall
A pending tool call extracted from the model’s response.
ToolCallResult
Result of executing a tool call.

Functions§

execute_tool_calls
Execute a batch of tool calls, respecting concurrency constraints.
extract_tool_calls
Extract pending tool calls from assistant content blocks.