.NET API
SubAgentSettings
Tracon.Abstractions.dllDetermines 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()
Examples
Section titled “Examples”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), },};Remarks
Section titled “Remarks”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.
Constructors
Section titled “Constructors”SubAgentSettings()
Section titled “ SubAgentSettings()”public SubAgentSettings()Properties
Section titled “Properties”CallMode
Section titled “ CallMode”Gets how the agent calls every agent in CallableAgents.
Defaults to Background.
public SubAgentCallMode CallMode { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
ChildDeadline
Section titled “ ChildDeadline”Gets the deadline applied to a single sub-agent run (the cooperative layer).
public TimeSpan? ChildDeadline { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Must be from one millisecond to about 49.7 days; any other value fails to compile.
WaitTimeout
Section titled “ WaitTimeout”Gets the hard wait cutoff handed to the framework (the hard-cutoff layer).
Must be greater than ChildDeadline.
public TimeSpan? WaitTimeout { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Must be from one millisecond to about 49.7 days; any other value fails to compile.
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(SubAgentSettings?)
Section titled “ Equals(SubAgentSettings?)”public bool Equals(SubAgentSettings? other)Parameters
Section titled “Parameters”other SubAgentSettings?
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 ==(SubAgentSettings?, SubAgentSettings?)
Section titled “ operator ==(SubAgentSettings?, SubAgentSettings?)”public static bool operator ==(SubAgentSettings? left, SubAgentSettings? right)Parameters
Section titled “Parameters”left SubAgentSettings?
right SubAgentSettings?
Returns
Section titled “Returns”operator !=(SubAgentSettings?, SubAgentSettings?)
Section titled “ operator !=(SubAgentSettings?, SubAgentSettings?)”public static bool operator !=(SubAgentSettings? left, SubAgentSettings? right)Parameters
Section titled “Parameters”left SubAgentSettings?
right SubAgentSettings?