Skip to content
Tracon

SubAgentSettings

Namespace Tracon · Assembly Tracon.Abstractions.dll

Determines how an agent calls the agents it may call, and how long it waits for them.

public sealed record SubAgentSettings : IEquatable<SubAgentSettings>
Inheritance
object ← SubAgentSettings
Implements
IEquatable<SubAgentSettings>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

A router that hands work to a sub-agent that must answer within 10 seconds, with a 20-second hard cutoff if it hangs:

new AgentDefinition
{
Name = "router",
Model = new ModelBinding { Provider = "openai", Model = "gpt-5" },
CallableAgents = ["researcher"],
SubAgents = new SubAgentSettings
{
ChildDeadline = TimeSpan.FromSeconds(10),
WaitTimeout = TimeSpan.FromSeconds(20),
},
};

SubAgentSettings.CallMode picks the surface the model sees: the Microsoft Agent Framework background task tools (SubAgentCallMode.Background, the default), or one tool per callable agent (SubAgentCallMode.Tool). The wait limits below, the depth limit, the tree budget and the refusal of a sub-agent that needs tool approval apply in both modes. In SubAgentCallMode.Tool mode the agent tool does not go through the tool registry: the tool authorization, approval rules and per-tool timeout of the registry do not apply to the call itself, only to the tools the sub-agent runs.

The limit is enforced in two independent layers, the same pattern OnlineEvaluationOptions.JudgeTimeout uses for a judge call: SubAgentSettings.ChildDeadline is a cooperative cutoff — the sub-agent’s own cancellation token is canceled, and a sub-agent that reads it genuinely stops and releases its resources. SubAgentSettings.WaitTimeout is a hard cutoff for the one case the cooperative layer cannot catch: a sub-agent that ignores cancellation. Past SubAgentSettings.WaitTimeout the caller stops waiting; the sub-agent keeps running in the background and its eventual result — success or failure — is discarded without writing a further event, a metric, or producing an unobserved exception.

When left null, both fields fall back to TraconAgentGraphOptions.ChildDeadline and TraconAgentGraphOptions.WaitTimeout. An invalid combination (zero, negative, or SubAgentSettings.WaitTimeout not greater than SubAgentSettings.ChildDeadline) is rejected while the agent is built, with TraconCompilationException; it is not ignored silently.

public SubAgentSettings()

Gets how the agent calls every agent in CallableAgents. Defaults to Background.

public SubAgentCallMode CallMode { get; init; }

SubAgentCallMode

With SubAgentCallMode.Tool, the tool of a callable agent is named after the agent, with each run of characters other than letters and digits replaced by one underscore (support-agent becomes support_agent). A name that equals another tool of the agent, or that another callable agent also gets, fails validation and compilation.

Gets the deadline applied to a single sub-agent run (the cooperative layer).

public TimeSpan? ChildDeadline { get; init; }

TimeSpan?

Must be from one millisecond to about 49.7 days; any other value fails to compile.

Gets the hard wait cutoff handed to the framework (the hard-cutoff layer). Must be greater than ChildDeadline.

public TimeSpan? WaitTimeout { get; init; }

TimeSpan?

Must be from one millisecond to about 49.7 days; any other value fails to compile.

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(SubAgentSettings? other)

other SubAgentSettings?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(SubAgentSettings?, SubAgentSettings?)

Section titled “ operator ==(SubAgentSettings?, SubAgentSettings?)”
public static bool operator ==(SubAgentSettings? left, SubAgentSettings? right)

left SubAgentSettings?

right SubAgentSettings?

bool

operator !=(SubAgentSettings?, SubAgentSettings?)

Section titled “ operator !=(SubAgentSettings?, SubAgentSettings?)”
public static bool operator !=(SubAgentSettings? left, SubAgentSettings? right)

left SubAgentSettings?

right SubAgentSettings?

bool