singleRunStrategy
Creates a single-run strategy for an AI agent. This strategy defines a simple execution flow where the agent processes input, calls tools, and sends results back to the agent. The flow consists of the following steps:
Start the agent.
Call the LLM with the input.
Execute a tool based on the LLM's response.
Send the tool result back to the LLM.
Repeat until LLM indicates no further tool calls are needed or the agent finishes.
Return
An instance of AIAgentStrategy configured according to the specified single-run mode.
Parameters
The mode in which the single-run strategy should operate. Defaults to SingleRunMode.SINGLE. - SingleRunMode.SINGLE: Executes without allowing multiple simultaneous tool calls. - SingleRunMode.SEQUENTIAL: Executes simultaneous tool calls sequentially. - SingleRunMode.PARALLEL: Executes multiple tool calls in parallel.