public withMaxToolCalls(limit as Int) as LLMChatSession
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.
| Parameter | Description |
|---|---|
limit | Maximum number of tool calls, or zero to disable the limit. |
This session for fluent configuration.
agent = LLMChatSession(provider).withMaxToolCalls(16)