replace

open suspend override fun replace(context: AIAgentContext)(source)

Atomically replaces the stateful fields of this context with those of context, under the write lock of mutableAIAgentContext.

Concurrency caveats: