Package io.camunda.client.impl.command
Class CreateAgentInstanceCommandImpl
java.lang.Object
io.camunda.client.impl.command.CreateAgentInstanceCommandImpl
- All Implemented Interfaces:
CreateAgentInstanceCommandStep1,CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep2,CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep3,CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep4,CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5,FinalCommandStep<CreateAgentInstanceResponse>
public class CreateAgentInstanceCommandImpl
extends Object
implements CreateAgentInstanceCommandStep1, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep2, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep3, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep4, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.client.api.command.CreateAgentInstanceCommandStep1
CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep2, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep3, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep4, CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5 -
Constructor Summary
ConstructorsConstructorDescriptionCreateAgentInstanceCommandImpl(HttpClient httpClient, JsonMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptionelementInstanceKey(long elementInstanceKey) Sets the element instance key of the AHSP or AI Agent Task element instance.maxModelCalls(int maxModelCalls) Sets the maximum number of LLM model calls the agent instance may make.maxTokens(long maxTokens) Sets the maximum number of tokens the agent instance may use.maxToolCalls(int maxToolCalls) Sets the maximum number of tool calls the agent instance may make.Sets the LLM model identifier for the agent instance.Sets the LLM provider for the agent instance.requestTimeout(Duration requestTimeout) Sets the request timeout for the command.send()Sends the command to the Camunda gateway.systemPrompt(String systemPrompt) Sets the system prompt for the agent instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.client.api.command.FinalCommandStep
execute
-
Constructor Details
-
CreateAgentInstanceCommandImpl
-
-
Method Details
-
elementInstanceKey
public CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep2 elementInstanceKey(long elementInstanceKey) Description copied from interface:CreateAgentInstanceCommandStep1Sets the element instance key of the AHSP or AI Agent Task element instance.- Specified by:
elementInstanceKeyin interfaceCreateAgentInstanceCommandStep1- Parameters:
elementInstanceKey- the key of the element instance. Must be greater than 0.- Returns:
- this builder for method chaining
-
model
Description copied from interface:CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep2Sets the LLM model identifier for the agent instance.- Specified by:
modelin interfaceCreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep2- Parameters:
model- the model identifier (for example, gpt-4o). Must not be null or empty.- Returns:
- this builder for method chaining
-
provider
Description copied from interface:CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep3Sets the LLM provider for the agent instance.- Specified by:
providerin interfaceCreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep3- Parameters:
provider- the provider name (for example, openai). Must not be null or empty.- Returns:
- this builder for method chaining
-
systemPrompt
public CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5 systemPrompt(String systemPrompt) Description copied from interface:CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep4Sets the system prompt for the agent instance.- Specified by:
systemPromptin interfaceCreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep4- Parameters:
systemPrompt- the system prompt text. Must not be null or empty.- Returns:
- this builder for method chaining
-
maxTokens
Description copied from interface:CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5Sets the maximum number of tokens the agent instance may use. Defaults to -1 (no limit).- Specified by:
maxTokensin interfaceCreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5- Parameters:
maxTokens- the token limit. Use -1 for no limit.- Returns:
- this builder for method chaining
-
maxModelCalls
public CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5 maxModelCalls(int maxModelCalls) Description copied from interface:CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5Sets the maximum number of LLM model calls the agent instance may make. Defaults to -1 (no limit).- Specified by:
maxModelCallsin interfaceCreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5- Parameters:
maxModelCalls- the model-call limit. Use -1 for no limit.- Returns:
- this builder for method chaining
-
maxToolCalls
public CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5 maxToolCalls(int maxToolCalls) Description copied from interface:CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5Sets the maximum number of tool calls the agent instance may make. Defaults to -1 (no limit).- Specified by:
maxToolCallsin interfaceCreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5- Parameters:
maxToolCalls- the tool-call limit. Use -1 for no limit.- Returns:
- this builder for method chaining
-
requestTimeout
public CreateAgentInstanceCommandStep1.CreateAgentInstanceCommandStep5 requestTimeout(Duration requestTimeout) Description copied from interface:FinalCommandStepSets the request timeout for the command. The default request timeout can be configured usingCamundaClientBuilder.defaultRequestTimeout(Duration).- Specified by:
requestTimeoutin interfaceFinalCommandStep<CreateAgentInstanceResponse>- Parameters:
requestTimeout- the request timeout- Returns:
- the configured command
-
send
Description copied from interface:FinalCommandStepSends the command to the Camunda gateway. This operation is asynchronous. In case of success, the future returns the event that was generated by the Camunda gateway in response to the command.Call
CamundaFuture.join()to wait until the response is available.Future<JobEventinvalid input: '>' future = command.send(); JobEvent event = future.join();- Specified by:
sendin interfaceFinalCommandStep<CreateAgentInstanceResponse>- Returns:
- a future tracking state of success/failure of the command.
-