org.llm4s.toolapi.ToolExecutionStrategy
See theToolExecutionStrategy companion object
Determines how multiple tool calls in a single agent step are executed by ToolRegistry.executeAll.
Choose ToolExecutionStrategy.Sequential when calls depend on one another or mutate shared state. Choose ToolExecutionStrategy.Parallel when calls are independent and mostly wait on I/O. Choose ToolExecutionStrategy.ParallelWithLimit when calls can run concurrently but external systems or local resources need bounded concurrency.
Attributes
- Example
-
val results = registry.executeAll( requests, strategy = ToolExecutionStrategy.ParallelWithLimit(2) ) val agentState = agent.runWithStrategy( query = "Get weather in London, Paris, and Tokyo", tools = registry, toolExecutionStrategy = ToolExecutionStrategy.Parallel, maxSteps = Some(5) ) - Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
In this article