create

abstract fun create(llmMessageSender: LlmMessageSender, objectMapper: <Error class: unknown class>, injectionStrategy: ToolInjectionStrategy, maxIterations: Int, toolDecorator: (Tool) -> Tool?, inspectors: List<ToolLoopInspector>, transformers: List<ToolLoopTransformer>, toolCallContext: ToolCallContext, toolNotFoundPolicy: ToolNotFoundPolicy? = null): ToolLoop

Create a ToolLoop instance.

Parameters

llmMessageSender

message sender for LLM communication

objectMapper

for JSON deserialization

injectionStrategy

strategy for dynamic tool injection

maxIterations

maximum loop iterations

toolDecorator

optional decorator for injected tools

inspectors

read-only observers for tool loop lifecycle events

transformers

transformers for modifying conversation history or tool results

toolCallContext

context propagated to tool invocations