Skip to content
Tracon

CallableAgentReference

Namespace Tracon · Assembly Tracon.Abstractions.dll

One 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()

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"],
};

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"].

public CallableAgentReference()

Gets the name of the agent to call.

public required string Name { get; init; }

string

Gets the version of the agent to run. null runs its current version.

public int? Version { get; init; }

int?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(CallableAgentReference? other)

other CallableAgentReference?

bool

Makes a reference to the current version of the agent with the given name.

public static CallableAgentReference FromName(string name)

name string

The agent name.

CallableAgentReference

A reference with no version.

public override int GetHashCode()

int

public override string ToString()

string

operator ==(CallableAgentReference?, CallableAgentReference?)

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

left CallableAgentReference?

right CallableAgentReference?

bool

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)

name string

The agent name.

CallableAgentReference

A reference with no version.

Same as CallableAgentReference.FromName.

operator !=(CallableAgentReference?, CallableAgentReference?)

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

left CallableAgentReference?

right CallableAgentReference?

bool