Skip to content

WorkflowGraph

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Represents a workflow’s compiled graph: nodes, edges, and external request ports.

public sealed record WorkflowGraph : IEquatable<WorkflowGraph>

objectWorkflowGraph

IEquatable<WorkflowGraph>

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

The graph is extracted from the compiled workflow, not the definition. The reason was measured: built-in patterns add executors the user did not write (OutputMessages, Batcher/*, ConcurrentEnd, HandoffStart, GroupChatHost, MagenticOrchestrator). A graph drawn from the definition would not show these nodes, and the ExecutorInvoked events arriving during a run would not match any node.

The type carries no Microsoft Agent Framework type: the HTTP layer does not depend on the AgentPrism.Workflows package.

public WorkflowGraph()

Gets the edges between nodes.

public IReadOnlyList<WorkflowGraphEdge> Edges { get; init; }

IReadOnlyList<WorkflowGraphEdge>

Gets the Mermaid text produced by Microsoft Agent Framework.

public required string Mermaid { get; init; }

string

The UI draws the graph itself (bundle budget); this text is for export. Users can copy it to the clipboard and paste it into a document - project convention requires diagrams to be written in Mermaid.

Gets the name of the workflow the graph belongs to.

public required string Name { get; init; }

string

Gets the nodes in the graph.

public IReadOnlyList<WorkflowGraphNode> Nodes { get; init; }

IReadOnlyList<WorkflowGraphNode>

Gets the identifier of the node that receives the input message first.

public required string StartExecutorId { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(WorkflowGraph? other)

other WorkflowGraph?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(WorkflowGraph?, WorkflowGraph?)

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

left WorkflowGraph?

right WorkflowGraph?

bool

operator !=(WorkflowGraph?, WorkflowGraph?)

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

left WorkflowGraph?

right WorkflowGraph?

bool