Table of Contents

Class Graph

Namespace
AutoGen.Core
Assembly
AutoGen.Core.dll
public class Graph
Inheritance
Graph
Inherited Members

Constructors

Graph(IEnumerable<Transition>?)

public Graph(IEnumerable<Transition>? transitions = null)

Parameters

transitions IEnumerable<Transition>

Properties

Transitions

Get the transitions of the workflow.

public IEnumerable<Transition> Transitions { get; }

Property Value

IEnumerable<Transition>

Methods

AddTransition(Transition)

public void AddTransition(Transition transition)

Parameters

transition Transition

TransitToNextAvailableAgentsAsync(IAgent, IEnumerable<IMessage>, CancellationToken)

Get the next available agents that the messages can be transit to.

public Task<IEnumerable<IAgent>> TransitToNextAvailableAgentsAsync(IAgent fromAgent, IEnumerable<IMessage> messages, CancellationToken ct = default)

Parameters

fromAgent IAgent

the from agent

messages IEnumerable<IMessage>

messages

ct CancellationToken

Returns

Task<IEnumerable<IAgent>>

A list of agents that the messages can be transit to