.NET API
CallableAgentReference
Tracon.Abstractions.dllOne agent another agent may call, and the version of it that runs.
public sealed record CallableAgentReference : IEquatable<CallableAgentReference>- Inheritance
- object ← CallableAgentReference
- Implements
- IEquatable<CallableAgentReference>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
Section titled “Examples”Calls researcher as it was at version 3 and editor as it is now:
new AgentDefinition{ Name = "writer", Model = new ModelBinding { Provider = "openai", Model = "gpt-5" }, CallableAgents = [new CallableAgentReference { Name = "researcher", Version = 3 }, "editor"],};Remarks
Section titled “Remarks”Without a CallableAgentReference.Version the callee runs its current version: an edit of the callee reaches the caller at the next call. With one, the callee runs that stored version, and for an agent kept in the database its description (the text the model reads to decide when to call it) is read from that version too. A callee from a custom agent source keeps its current description; the source decides whether it has the version. A caller pinned to a version of its own (a workflow step, an approval resumption) runs the callee versions its own definition names, not the ones the callee has now.
Only an agent kept in the database has versions. A pin on an agent defined in code is refused when the definition is saved and when it is compiled.
A name converts to a reference without a version, so a list of names stays a list of names:
CallableAgents = ["researcher"].
Constructors
Section titled “Constructors”CallableAgentReference()
Section titled “ CallableAgentReference()”public CallableAgentReference()Properties
Section titled “Properties”Gets the name of the agent to call.
public required string Name { get; init; }Property Value
Section titled “Property Value”Version
Section titled “ Version”Gets the version of the agent to run. null runs its current version.
public int? Version { get; init; }Property Value
Section titled “Property Value”int?
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(CallableAgentReference?)
Section titled “ Equals(CallableAgentReference?)”public bool Equals(CallableAgentReference? other)Parameters
Section titled “Parameters”other CallableAgentReference?
Returns
Section titled “Returns”FromName(string)
Section titled “ FromName(string)”Makes a reference to the current version of the agent with the given name.
public static CallableAgentReference FromName(string name)Parameters
Section titled “Parameters”name string
The agent name.
Returns
Section titled “Returns”A reference with no version.
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 ==(CallableAgentReference?, CallableAgentReference?)
Section titled “ operator ==(CallableAgentReference?, CallableAgentReference?)”public static bool operator ==(CallableAgentReference? left, CallableAgentReference? right)Parameters
Section titled “Parameters”left CallableAgentReference?
right CallableAgentReference?
Returns
Section titled “Returns”implicit operator CallableAgentReference(string)
Section titled “ implicit operator CallableAgentReference(string)”Makes a reference to the current version of the agent with the given name.
public static implicit operator CallableAgentReference(string name)Parameters
Section titled “Parameters”name string
The agent name.
Returns
Section titled “Returns”A reference with no version.
Remarks
Section titled “Remarks”Same as CallableAgentReference.FromName.
operator !=(CallableAgentReference?, CallableAgentReference?)
Section titled “ operator !=(CallableAgentReference?, CallableAgentReference?)”public static bool operator !=(CallableAgentReference? left, CallableAgentReference? right)Parameters
Section titled “Parameters”left CallableAgentReference?
right CallableAgentReference?