copy

abstract fun copy(environment: AIAgentEnvironment? = null, agentInput: String? = null, config: AIAgentConfigBase? = null, llm: AIAgentLLMContext? = null, stateManager: AIAgentStateManager? = null, storage: AIAgentStorage? = null, sessionUuid: Uuid? = null, strategyId: String? = null, pipeline: AIAgentPipeline? = null): 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, or null to retain the current environment.

agentInput

The agent input to be used, or null to retain the current input.

config

The AI agent configuration, or null to retain the current configuration.

llm

The AI agent LLM context, or null to retain the current LLM context.

stateManager

The state manager for the AI agent, or null to retain the current state manager.

storage

The AI agent's key-value storage, or null to retain the current storage.

sessionUuid

The UUID of the session, or null to retain the current session UUID.

strategyId

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

pipeline

The AI agent pipeline, or null to retain the current pipeline.