klyn.llm.LLMChatSession.withMaxToolCalls
method
public withMaxToolCalls(limit as Int) as LLMChatSession
Description

Configures the maximum number of tool calls.

A value less than or equal to zero disables the hard limit. Context compaction bounds the provider context, not the number of tool calls.

Parameters
ParameterDescription
limitMaximum number of tool calls, or zero to disable the limit.
Returns

This session for fluent configuration.

Example
agent = LLMChatSession(provider).withMaxToolCalls(16)