SemanticKernel.Graph 25.10.301

dotnet add package SemanticKernel.Graph --version 25.10.301
                    
NuGet\Install-Package SemanticKernel.Graph -Version 25.10.301
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SemanticKernel.Graph" Version="25.10.301" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SemanticKernel.Graph" Version="25.10.301" />
                    
Directory.Packages.props
<PackageReference Include="SemanticKernel.Graph" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SemanticKernel.Graph --version 25.10.301
                    
#r "nuget: SemanticKernel.Graph, 25.10.301"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SemanticKernel.Graph@25.10.301
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SemanticKernel.Graph&version=25.10.301
                    
Install as a Cake Addin
#tool nuget:?package=SemanticKernel.Graph&version=25.10.301
                    
Install as a Cake Tool

Semantic Kernel Graph

Graph-based workflow orchestration engine for Microsoft Semantic Kernel. Compose SK agents and functions as nodes connected by edges, with deterministic execution, dynamic routing, checkpointing, and event streaming.

  • SK integration: uses native Kernel, KernelFunction, and KernelArguments
  • Ready-made nodes: FunctionGraphNode, ConditionalGraphNode, loops, error handling, and more
  • Execution: GraphExecutor.ExecuteAsync with options for metrics, concurrency, and recovery
  • Observability: metrics, execution history, and optional streaming

Installation

dotnet add package SemanticKernel.Graph

Requirements: .NET 9.0 and Microsoft.SemanticKernel (already referenced by the package).

Get started in 60 seconds

Minimal example with a single function node (no external model required):

using Microsoft.SemanticKernel;
using SemanticKernel.Graph.Core;
using SemanticKernel.Graph.Nodes;

// Kernel (can be empty for local functions via CreateFromMethod)
var kernel = Kernel.CreateBuilder().Build();

// Node that wraps a local SK function
var fn = KernelFunctionFactory.CreateFromMethod((string? input) => $"Hello, {input}", functionName: "greeting");
var start = new FunctionGraphNode(fn, description: "Greeting").StoreResultAs("result");

// Graph: 1 node and start node
var graph = new GraphExecutor("MyGraph").AddNode(start).SetStartNode(start.NodeId);

// Execute
var args = new KernelArguments { ["input"] = "world" };
var result = await graph.ExecuteAsync(kernel, args);
Console.WriteLine(result.GetValue<string>()); // "Hello, world"

Integrating with Semantic Kernel models

You can also use SK plugin/model functions in graph nodes:

using Microsoft.SemanticKernel;
using SemanticKernel.Graph.Core;
using SemanticKernel.Graph.Nodes;

// Configure your provider (e.g., OpenAI/Azure OpenAI) according to your environment
var kernel = Kernel.CreateBuilder()
    // .AddOpenAIChatCompletion("gpt-4o", apiKey)            // OpenAI example
    // .AddAzureOpenAIChatCompletion("deployment", endpoint, key) // Azure OpenAI example
    .Build();

// Create an SK prompt function and wrap it in a FunctionGraphNode
var summarize = KernelFunctionFactory.CreateFromPrompt("Summarize the text: {{$input}}", functionName: "summarize");
var summarizeNode = new FunctionGraphNode(summarize).StoreResultAs("summary");

var executor = new GraphExecutor("Summary").AddNode(summarizeNode).SetStartNode(summarizeNode.NodeId);

var args = new KernelArguments { ["input"] = "Long text to summarize..." };
var summary = await executor.ExecuteAsync(kernel, args);
Console.WriteLine(summary.GetValue<string>());

Quick concepts

  • GraphExecutor: builds the graph (adds nodes and connects), sets the start node, and executes
  • IGraphNode: contract for an executable node; use FunctionGraphNode for SK functions
  • Connect: creates unconditional edges between nodes; use ConditionalGraphNode for branches
  • KernelArguments / GraphState: shared execution state and parameters across nodes

Next steps

  • Explore additional nodes in SemanticKernel.Graph.Nodes
  • Enable metrics/concurrency via GraphExecutor configuration methods
  • See full examples in the https://skgraph.dev/examples project
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
25.10.301 267 10/30/2025
25.8.191 1,301 8/19/2025