invoke
operator fun AIAgentService.Companion.invoke(promptExecutor: PromptExecutor, agentConfig: AIAgentConfig, strategy: AIAgentGraphStrategy<String, String> = singleRunStrategy(), toolRegistry: ToolRegistry = ToolRegistry.EMPTY, installFeatures: GraphAIAgent.FeatureContext.() -> Unit = {}): GraphAIAgentService<String, String>(source)
Invokes the process to create and return an instance of GraphAIAgentService
.
Parameters
promptExecutor
The executor responsible for handling prompts during the agent's operation.
agentConfig
The configuration object for the AI agent.
strategy
The strategy defining how the agent processes tasks and connections within the graph. Defaults to singleRunStrategy
.
toolRegistry
The registry containing tools available for the agent to use. Defaults to an empty