aiAgent
Creates an AI agent using the provided AI agent strategy within the specified route.
Return
An instance of AIAgent
configured with the specified strategy and the route's resources.
Parameters
The type of input data for the AI agent.
The type of output data for the AI agent.
The AI agent strategy defining the workflow and execution logic of the agent.
Throws
If the agent configuration (agentConfig
) is not set in the route.
Creates an agent using aiAgent, and immediately runs it given the input. When the agent is completed it provides the final Output.
A default aiAgent
is an agent that runs using singleRunStrategy, by default, it relies on sequential ToolCalls. Inside the block lambda you can use the agent to perform tasks, and calculate a result, such as GraphAIAgent.run.
A default aiAgent
is an agent that runs using singleRunStrategy, by default, it relies on sequential ToolCalls. It takes an input, and when the agent finishes running provides a final result String.