Table of Contents

Constructor AgentNode

Namespace
LMKit.Agents.Orchestration.Nodes
Assembly
LM-Kit.NET.dll

AgentNode(string, Agent)

Initializes a new AgentNode.

public AgentNode(string name, Agent agent)

Parameters

name string

Stable trace name for this node.

agent Agent

The agent invoked when this node runs.

Examples

Wrapping a single agent as a graph leaf:

using LMKit.Model;
using LMKit.Agents;
using LMKit.Agents.Orchestration.Nodes;

using var model = LM.LoadFromModelID("qwen3.5:9b"); var writer = Agent.CreateBuilder(model) .WithPersona("Writer") .WithInstruction("Write one short tagline.") .Build();

IOrchestrationNode node = new AgentNode("write", writer);

// Run it through GraphOrchestrator (the typical entry point): var orchestrator = new GraphOrchestrator(node); var result = await orchestrator.ExecuteAsync("Tagline for a coffee brand"); Console.WriteLine(result.Content);

Share