Skip to content

ToolLoopHelpers

Namespace: E2E

public sealed class ToolLoopHelpers

Loop services for the tool bodies that run work of their own (upstream’s ToolLoopHelpers).

Inheritance: object

View source

public bool Concluding { get; }

True once a verdict or a hard stop landed. A late tool call has nothing left to do.

Value: bool

View source

public Task<string> GuardAsync(Func<Task<string>> body, string? label = null)

Runs one tool body under the loop’s policy: nothing runs once the step is concluding, a hard stop of the step ends the loop, and any other failure goes back to the model as text it can react to, named by <code class=“paramref”>label</code>.

Parameters

Name Type Description
body Func<Task<string>>
label string

Returns: Task<string>

View source

public void ReportHardStop(AgentException error)

Records a hard stop of the step that ends the loop.

Parameters

Name Type Description
error AgentException

View source