Class RuntimeAgentConfig.Builder
java.lang.Object
io.agentscope.extensions.scheduler.config.AgentConfig.Builder
io.agentscope.extensions.scheduler.config.RuntimeAgentConfig.Builder
- Enclosing class:
- RuntimeAgentConfig
Builder for creating RuntimeAgentConfig instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the RuntimeAgentConfig instance.Set the hooks (optional).modelConfig(ModelConfig modelConfig) Set the model configuration (required).Set the agent name (required).Set the system prompt (optional).toolkit(io.agentscope.core.tool.Toolkit toolkit) Set the toolkit (optional).
-
Method Details
-
name
Set the agent name (required).- Overrides:
namein classAgentConfig.Builder- Parameters:
name- The agent name- Returns:
- This builder
-
modelConfig
Set the model configuration (required).This method automatically creates the Model instance from the ModelConfig during the build process, so it's ready for use without repeated creation.
- Overrides:
modelConfigin classAgentConfig.Builder- Parameters:
modelConfig- The model configuration- Returns:
- This builder
-
sysPrompt
Set the system prompt (optional).- Overrides:
sysPromptin classAgentConfig.Builder- Parameters:
sysPrompt- The system prompt- Returns:
- This builder
-
toolkit
Set the toolkit (optional).The toolkit provides tools that the agent can use during execution.
- Parameters:
toolkit- The toolkit instance- Returns:
- This builder
-
hooks
Set the hooks (optional).The hooks provide extension points for agent lifecycle events.
- Parameters:
hooks- The list of hooks- Returns:
- This builder
-
build
Build the RuntimeAgentConfig instance.- Overrides:
buildin classAgentConfig.Builder- Returns:
- A new RuntimeAgentConfig instance
- Throws:
IllegalArgumentException- if required fields are missing or invalid
-