copy
open fun copy(environment: AIAgentEnvironment = this.environment, agentId: String = this.agentId, agentInput: Any? = this.agentInput, agentInputType: KType = this.agentInputType, config: AIAgentConfig = this.config, llm: AIAgentLLMContext = this.llm, stateManager: AIAgentStateManager = this.stateManager, storage: AIAgentStorage = this.storage, runId: String = this.runId, strategyName: String = this.strategyName, pipeline: AIAgentGraphPipeline = this.pipeline): AIAgentGraphContextBase(source)
Creates a copy of the current AIAgentGraphContext, allowing for selective overriding of its properties.
Parameters
environment
The AIAgentEnvironment to be used in the new context, or null to retain the current one.
config
The AIAgentConfig for the new context, or null to retain the current configuration.
llm
The AIAgentLLMContext to be used, or null to retain the current LLM context.
stateManager
The AIAgentStateManager to be used, or null to retain the current state manager.
storage
The AIAgentStorage to be used, or null to retain the current storage.
runId
The run identifier, or null to retain the current run ID.
strategyName
The strategy name, or null to retain the current identifier.
pipeline
The AIAgentPipeline to be used, or null to retain the current pipeline.