copy

open override fun copy(environment: AIAgentEnvironment, agentInput: Any?, agentInputType: KType, config: AIAgentConfigBase, llm: AIAgentLLMContext, stateManager: AIAgentStateManager, storage: AIAgentStorage, runId: String, strategyId: String, pipeline: AIAgentPipeline): AIAgentContextBase(source)

Creates a copy of the current AIAgentContext, 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 AIAgentConfigBase 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 Id, or null to retain the current run ID.

strategyId

The strategy identifier, or null to retain the current identifier.

pipeline

The AIAgentPipeline to be used, or null to retain the current pipeline.