withPrompt

open suspend fun withPrompt(block: Prompt.() -> Prompt)(source)

Updates the current AIAgentLLMContext with a new prompt and ensures thread-safe access using a read lock.

Parameters

block

transformation to produce the next Prompt.