copy

open fun copy(environment: AIAgentEnvironment = this.environment, agentId: String = this.agentId, agentInput: Any? = this.agentInput, agentInputType: TypeToken = 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, executionInfo: AgentExecutionInfo = this.executionInfo, parentContext: AIAgentGraphContextBase? = this): 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 the current one if not specified.

agentId

The unique agent identifier, or the current one if not specified.

agentInput

The input data for the agent, or the current input if not specified.

agentInputType

The TypeToken representing the type of agentInput, or the current type if not specified.

config

The AIAgentConfig for the new context, or the current configuration if not specified.

llm

The AIAgentLLMContext to be used, or the current LLM context if not specified.

stateManager

The AIAgentStateManager to be used, or the current state manager if not specified.

storage

The AIAgentStorage to be used, or the current storage if not specified.

runId

The run identifier, or the current run ID if not specified.

strategyName

The strategy name, or the current strategy name if not specified.

pipeline

The AIAgentGraphPipeline to be used, or the current pipeline if not specified.

executionInfo

The AgentExecutionInfo to be used, or the current execution info if not specified.

parentContext

The parent context, or the current instance if not specified.