VeloxDev.Core.Extension
7.0.0
dotnet add package VeloxDev.Core.Extension --version 7.0.0
NuGet\Install-Package VeloxDev.Core.Extension -Version 7.0.0
<PackageReference Include="VeloxDev.Core.Extension" Version="7.0.0" />
<PackageVersion Include="VeloxDev.Core.Extension" Version="7.0.0" />
<PackageReference Include="VeloxDev.Core.Extension" />
paket add VeloxDev.Core.Extension --version 7.0.0
#r "nuget: VeloxDev.Core.Extension, 7.0.0"
#:package VeloxDev.Core.Extension@7.0.0
#addin nuget:?package=VeloxDev.Core.Extension&version=7.0.0
#tool nuget:?package=VeloxDev.Core.Extension&version=7.0.0
VeloxDev.Core.Extension
MAF (Microsoft.Extensions.AI) Workflow Agent + MCP support — the optional companion to VeloxDev.Core for building AI-controllable visual workflow editors. Works with WPF / Avalonia / WinUI / MAUI / WinForms / Blazor.
What's inside
| Module | Description |
|---|---|
| Workflow Agent | WorkflowAgentScope + WorkflowAgentToolkit: 60+ function-calling tools that let an Agent add/remove nodes & links, patch properties, execute nodes, compile routing, and lay out the canvas |
| Compiler support | CompileWorkflow / GetCompileStatus / RunCompiledWorkflow (chain-level execution) / GetExecutionLog |
| MCP | McpScope (stdio local + remote Streamable HTTP), McpAgentToolkit (Agent-managed servers), global bindable status VM (McpStatusViewModel) |
| Bilingual skills/references | Resources/Workflow/{en,zh}/Skills|References|Safety, embedded and merged into the Agent system prompt |
Quick start: Workflow Agent
var scope = tree.AsAgentScope() // tree: IWorkflowTreeViewModel
.WithPromptLanguage(AgentLanguages.English)
.WithOutputLanguage(AgentLanguages.Chinese)
.WithAutoDiscovery(assemblyName: "MyLib") // auto-discover components/enums/interfaces
.WithAllowNodeExecution(true) // explicitly allow node business code
.WithSynchronizationContext(SynchronizationContext.Current); // marshal tools to the UI thread
var prompt = scope.ProvideProgressiveContextPrompt(); // progressive system prompt
var baseTools = scope.ProvideTools(); // base tool set
// Pass the tool set per call via ChatOptions — loaded MCP servers' tools join automatically:
var agent = chatClient.AsAIAgent(instructions: prompt);
var runOptions = new ChatClientAgentRunOptions
{
ChatOptions = new ChatOptions { Tools = [.. baseTools, .. mcp.LoadedTools] },
};
var response = await agent.RunAsync(message, session, runOptions);
Two execution entries (do not confuse them)
| Entry | Tool | Semantics |
|---|---|---|
| Node-level | ExecuteNode |
A single node's ReceiveCommand (EXEC/RECV) |
| Chain-level | RunCompiledWorkflow |
Drive the whole compiled chain via CompilerEngine + RuntimeContext |
MCP servers
stdio local (npm / npx / pip / dotnet / exe)
var mcp = new McpScope().WithSynchronizationContext(SynchronizationContext.Current);
var configs = new[]
{
new McpServerConfiguration
{
Name = "Filesystem (npx)",
RunMode = McpServerRunMode.Npx,
Package = "@modelcontextprotocol/server-filesystem",
Arguments = ["C:/data"], // allowed directories
Options = new { env = new { FILESYSTEM_ROOT = "C:/data" } }, // per-server env vars
},
};
var tools = await mcp.LoadAsync(configs);
Remote HTTP + auth
new McpServerConfiguration
{
Name = "Microsoft Learn",
RunMode = McpServerRunMode.Http,
Endpoint = "https://learn.microsoft.com/api/mcp",
Options = new { connectionTimeout = 30 }, // seconds
};
// With auth:
Options = new
{
headers = new { Authorization = "Bearer <token>" }, // header-based auth
// or OAuth 2.0 (PKCE):
// oauth = new { clientId = "...", clientSecret = "...", redirectUri = "...", scopes = new[] { "read" } },
};
// For OAuth the host must register the authorization redirect:
mcp.WithOAuthAuthorizationRedirect(async (authUri, redirectUri, ct) =>
{
await OpenBrowserAsync(authUri);
return await WaitForCallbackAsync(redirectUri, ct); // return the callback URL string with the code
});
McpServerConfiguration.Optionsis the serialization of an anonymous object. Known keys:headers(HTTP headers),oauth(OAuth2),connectionTimeout(seconds or TimeSpan string),transportMode(AutoDetect/StreamableHttp/Sse),ownsSession,env(stdio environment variables),workingDirectory. Unknown keys are rejected (throws, never silently ignored). Security model: server configuration is fixed at load time and immutable — the Agent can only load / unload / inspect servers, never reconfigure them.
Agent-managed servers (McpAgentToolkit)
Registered via WorkflowAgentScope.WithTools(...), the Agent can call ListMcpServers (status), DescribeMcpServer (export tool-capability prompts), LoadMcpServers (install & connect), UnloadMcpServer (remove mid-session). Server tools join the tool set on every call via McpScope.LoadedTools.
Global status VM (McpStatusViewModel)
Bind McpScope.Status: per-server Name / StateText (NotStarted / Installing / Connecting / Connected / Error) / ToolCount / Error, plus aggregates ConnectedCount / ErrorCount / WorkingCount. Updates marshal to the UI thread via WithSynchronizationContext.
Links
- Repository: https://github.com/Axvser/VeloxDev
- Dependencies: VeloxDev.Core · Microsoft.Extensions.AI · ModelContextProtocol · Microsoft.Agents.AI
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- CliWrap (>= 3.10.2)
- Microsoft.Agents.AI (>= 1.13.0)
- Microsoft.Extensions.AI (>= 10.8.0)
- ModelContextProtocol (>= 2.2.0)
- Newtonsoft.Json (>= 13.0.4)
- VeloxDev.Core (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.