LoopAgentOptions.ExcludeOnBehalfOfMessages Property

Definition

Gets or sets a value indicating whether the on-behalf-of messages the loop injects for re-invocations are omitted from the output surfaced back to the caller. Defaults to false.

public bool ExcludeOnBehalfOfMessages { get; set; }
member this.ExcludeOnBehalfOfMessages : bool with get, set
Public Property ExcludeOnBehalfOfMessages As Boolean

Property Value

Remarks

When false (the default) a streaming run emits the injected feedback / evaluator-supplied messages as updates before each re-invocation, and a non-streaming run includes them in the aggregated transcript, so callers can see the loop acting autonomously on their behalf. Set this to true to omit those messages from the returned output and surface only the wrapped agent's responses; the messages are still sent to the wrapped agent. This setting has no effect when NonStreamingReturnsLastResponseOnly causes a non-streaming run to return only the final response.

Applies to