.NET API
ToolLoopSettings
Tracon.Abstractions.dllTool-call loop settings for a ModelBinding.
public sealed record ToolLoopSettings : IEquatable<ToolLoopSettings>- Inheritance
- object ← ToolLoopSettings
- Implements
- IEquatable<ToolLoopSettings>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The loop is the one the model pipeline builds around the provider client; it runs the tools the model asks for and sends their results back. Every member keeps the loop’s own default when it is left unset, so a binding without ModelBinding.ToolLoop behaves exactly as it did before the settings existed.
A fallback link runs the same agent’s tools, so it takes the primary binding’s loop settings as one object. The tools’ thread-safety and the limits of the agent do not change with the model.
Constructors
Section titled “Constructors”ToolLoopSettings()
Section titled “ ToolLoopSettings()”public ToolLoopSettings()Properties
Section titled “Properties”AllowConcurrentToolCalls
Section titled “ AllowConcurrentToolCalls”Gets whether independent tool calls within one turn may run at the same time.
public bool AllowConcurrentToolCalls { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”false by default: with no change, tool calls within a turn run one after another exactly as they do today. A tool body that is not written to be thread-safe (a non-thread-safe field it shares across calls, for example) is only safe to run concurrently with itself once this is turned on for its agent. It is not the same as ModelBinding.AllowMultipleToolCalls: that one lets the model ask for several calls in one turn, this one decides whether Tracon runs them at the same time.
MaximumConsecutiveErrors
Section titled “ MaximumConsecutiveErrors”Gets how many tool-call iterations in a row may fail before the loop rethrows the error; the loop’s default (3) is used when it is null.
public int? MaximumConsecutiveErrors { get; init; }Property Value
Section titled “Property Value”int?
Remarks
Section titled “Remarks”0 rethrows the first failure. A negative value is rejected while the
agent is built, with TraconCompilationException.
TerminateOnUnknownCalls
Section titled “ TerminateOnUnknownCalls”Gets whether the loop ends when the model asks for a tool the agent does not have; the loop’s default (false) is used when it is null.
public bool? TerminateOnUnknownCalls { get; init; }Property Value
Section titled “Property Value”bool?
Remarks
Section titled “Remarks”With the default, the model gets an error result for the unknown call and the loop goes on. Set it to true to hand the unknown call back to the caller instead.
Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(ToolLoopSettings?)
Section titled “ Equals(ToolLoopSettings?)”public bool Equals(ToolLoopSettings? other)Parameters
Section titled “Parameters”other ToolLoopSettings?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(ToolLoopSettings?, ToolLoopSettings?)
Section titled “ operator ==(ToolLoopSettings?, ToolLoopSettings?)”public static bool operator ==(ToolLoopSettings? left, ToolLoopSettings? right)Parameters
Section titled “Parameters”left ToolLoopSettings?
right ToolLoopSettings?
Returns
Section titled “Returns”operator !=(ToolLoopSettings?, ToolLoopSettings?)
Section titled “ operator !=(ToolLoopSettings?, ToolLoopSettings?)”public static bool operator !=(ToolLoopSettings? left, ToolLoopSettings? right)Parameters
Section titled “Parameters”left ToolLoopSettings?
right ToolLoopSettings?