Skip to content

WorkflowNodeReference

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Points to a single node entering a workflow’s graph: an agent from the catalog, or a function registered in code.

public sealed record WorkflowNodeReference : IEquatable<WorkflowNodeReference>

objectWorkflowNodeReference

IEquatable<WorkflowNodeReference>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Used only by WorkflowKind.Sequential definitions that mix agent and function nodes. A definition that uses only agents keeps using WorkflowDefinition.AgentNames; the two fields are mutually exclusive (the validator in AgentPrism.Core enforces this).

WorkflowNodeReference.Kind reuses WorkflowNodeKind, the same enum the compiled graph reports. Only WorkflowNodeKind.Agent and WorkflowNodeKind.Function are valid here — the other members (Orchestration, RequestPort, Output) describe nodes the compiler adds on its own; a definition never names one directly.

public WorkflowNodeReference()

Gets which registry Name is looked up in.

public required WorkflowNodeKind Kind { get; init; }

WorkflowNodeKind

Gets the referenced name: an agent name from the catalog when WorkflowNodeReference.Kind is WorkflowNodeKind.Agent, or a function name from the code registry when it is WorkflowNodeKind.Function.

public required string Name { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(WorkflowNodeReference? other)

other WorkflowNodeReference?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(WorkflowNodeReference?, WorkflowNodeReference?)

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

left WorkflowNodeReference?

right WorkflowNodeReference?

bool

operator !=(WorkflowNodeReference?, WorkflowNodeReference?)

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

left WorkflowNodeReference?

right WorkflowNodeReference?

bool