.NET API
LoopCriterion
Tracon.Abstractions.dllOne declarative stop criterion of the harness loop (see LoopSettings).
public sealed record LoopCriterion : IEquatable<LoopCriterion>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”A criterion carries data only, never code. That is the same
boundary tools and eval checks live behind: a definition can arrive from the
management API, and an interface-authored definition must never be able to
define behavior. A criterion whose logic is written in code is registered
with ITraconBuilder.AddLoopEvaluator(kind, evaluator) and is
referenced here by its registered Kind name alone.
Four kinds are built in. Each reads only the fields listed for it, and ignores the rest:
| Kind | Fields it reads |
|---|---|
| `completionMarker` | `Marker` (required). The loop stops once the agent's answer contains that text. |
| `todoCompletion` | `Modes` (optional). The loop stops once the agent's todo list has no open item left. |
| `aiJudge` | `JudgeCriteria` (required) and `JudgeInstructions` (optional). A judge model decides whether the work is finished. |
| `backgroundTaskCompletion` | None. The loop stops once no background task is still running. |
An unknown Kind is rejected when the agent is
built, with TraconCompilationException; it is never ignored.
A silently ignored stop criterion is a loop with no stop criterion.
Constructors
Section titled “Constructors”LoopCriterion()
Section titled “ LoopCriterion()”public LoopCriterion()Properties
Section titled “Properties”JudgeCriteria
Section titled “ JudgeCriteria”Gets the criteria the judge model scores the answer against. Read by
aiJudge only, where at least one entry is required.
public IReadOnlyList<string> JudgeCriteria { get; init; }Property Value
Section titled “Property Value”JudgeInstructions
Section titled “ JudgeInstructions”Gets the extra instructions handed to the judge model. Read by
aiJudge only.
public string? JudgeInstructions { get; init; }Property Value
Section titled “Property Value”Gets the criterion kind: completionMarker, todoCompletion,
aiJudge, backgroundTaskCompletion, or a kind registered in
code with AddLoopEvaluator.
public required string Kind { get; init; }Property Value
Section titled “Property Value”Marker
Section titled “ Marker”Gets the completion marker text. Read by completionMarker only,
where it is required.
public string? Marker { get; init; }Property Value
Section titled “Property Value”Gets the agent modes the criterion applies to. Read by
todoCompletion only.
public IReadOnlyList<string> Modes { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Tracon does not configure the harness mode provider today, so a definition has no mode names of its own to match. Leave this empty unless the agent’s own instructions establish the modes.
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(LoopCriterion?)
Section titled “ Equals(LoopCriterion?)”public bool Equals(LoopCriterion? other)Parameters
Section titled “Parameters”other LoopCriterion?
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 ==(LoopCriterion?, LoopCriterion?)
Section titled “ operator ==(LoopCriterion?, LoopCriterion?)”public static bool operator ==(LoopCriterion? left, LoopCriterion? right)Parameters
Section titled “Parameters”left LoopCriterion?
right LoopCriterion?
Returns
Section titled “Returns”operator !=(LoopCriterion?, LoopCriterion?)
Section titled “ operator !=(LoopCriterion?, LoopCriterion?)”public static bool operator !=(LoopCriterion? left, LoopCriterion? right)Parameters
Section titled “Parameters”left LoopCriterion?
right LoopCriterion?