onToolCalls

fun onToolCalls(condition: SimpleCondition<ERROR CLASS: Symbol not found for MessagePart.Tool.Call> = { true }): FullAgentEdgeBuilder<IncomingOutput, ToolCalls, OutgoingInput>(source)

Creates an edge that filters assistant messages containing tool calls matching the provided condition. The default condition onToolCalls { true } accepts any message with at least one tool call.

Parameters

condition

A predicate that determines whether a tool call should be accepted.