copy

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

Creates a copy of the current AIAgentContext with optional overrides for its properties.

Return

A new instance of AIAgentContext with the specified overrides.

Parameters

environment

The agent environment to be used

agentInput

The agent input to be used

config

The AI agent configuration

llm

The AI agent LLM context

stateManager

The state manager for the AI agent

storage

The AI agent's key-value storage

runId

The id of an agent run

strategyId

The strategy ID

pipeline

The AI agent pipeline