AgentGraphEntryAttribute
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework¶
AgentGraphEntryAttribute Class¶
Marks the decorated agent as the entry point for a named graph workflow. Exactly one agent per graph must carry this attribute.
Inheritance System.Object 🡒 System.Attribute 🡒 AgentGraphEntryAttribute
Example¶
[NeedlrAiAgent(Instructions = "Analyze the request.")]
[AgentGraphEntry("Research", RoutingMode = GraphRoutingMode.AllMatching)]
[AgentGraphEdge("Research", typeof(WebAgent), Condition = "NeedsWebData")]
[AgentGraphEdge("Research", typeof(SummaryAgent))]
public class AnalyzerAgent { }
Remarks¶
Graph-wide routing mode is declared here. Per-node overrides for routing mode can be specified on the first AgentGraphEdgeAttribute from a given source node.
Constructors¶
AgentGraphEntryAttribute(string) Constructor¶
Initializes a new AgentGraphEntryAttribute.
Parameters¶
graphName System.String
The name of the graph this agent is the entry point for.
Properties¶
AgentGraphEntryAttribute.GraphName Property¶
Gets the graph name this agent is the entry point for.
Property Value¶
AgentGraphEntryAttribute.RoutingMode Property¶
Gets or sets the graph-wide default routing mode. Individual nodes can
override this via a RoutingMode property on their first
AgentGraphEdgeAttribute.