Voxa.Services.MicrosoftAgents
0.7.2-alpha
dotnet add package Voxa.Services.MicrosoftAgents --version 0.7.2-alpha
NuGet\Install-Package Voxa.Services.MicrosoftAgents -Version 0.7.2-alpha
<PackageReference Include="Voxa.Services.MicrosoftAgents" Version="0.7.2-alpha" />
<PackageVersion Include="Voxa.Services.MicrosoftAgents" Version="0.7.2-alpha" />
<PackageReference Include="Voxa.Services.MicrosoftAgents" />
paket add Voxa.Services.MicrosoftAgents --version 0.7.2-alpha
#r "nuget: Voxa.Services.MicrosoftAgents, 0.7.2-alpha"
#:package Voxa.Services.MicrosoftAgents@0.7.2-alpha
#addin nuget:?package=Voxa.Services.MicrosoftAgents&version=0.7.2-alpha&prerelease
#tool nuget:?package=Voxa.Services.MicrosoftAgents&version=0.7.2-alpha&prerelease
Voxa.Services.MicrosoftAgents
Adapter that wraps any Microsoft Agent Framework AIAgent as a Voxa FrameProcessor.
Install
dotnet add package Voxa.Services.MicrosoftAgents --prerelease
Quickstart
using Microsoft.Agents.AI;
using Voxa.Services.MicrosoftAgents;
var agent = new ChatClientAgent(chatClient, new ChatClientAgentOptions
{
Name = "my-agent",
});
var pipeline = Pipeline.Build()
.Source(new WebSocketAudioSource(ws))
.Then(OpenAISpeech.StreamingTranscription(speechOpts))
.Then(MicrosoftAgentVoice.CreateProcessor(agent)) // ← here
.Then(new SentenceAggregator())
.Then(OpenAISpeech.Synthesis(speechOpts))
.Sink(new WebSocketAudioSink(ws));
MicrosoftAgentVoice.CreateProcessor returns a fully-configured Voxa.Core.AgentLoopProcessor — Voxa owns the deadlock-safe data-loop / turn-worker split, frontend-tool TCS correlation, agent re-invocation loop, turn-boundary frames, and token aggregation.
Configure with delegates
Hosts that need persisted history, frontend tools, post-turn audit, or sanitized backend-tool progress configure those via MicrosoftAgentVoiceOptions:
MicrosoftAgentVoice.CreateProcessor(agent, options =>
{
// Build the message list for this turn (load history, prepend a user-context preamble, …).
options.BuildMessages = (turn, ct) => LoadHistoryAsync(turn.UserText, ct);
// Per-turn run options (frontend-tool declarations, model override, telemetry).
options.BuildRunOptions = turn => myRunOptions;
// Classify a tool name as frontend (round-trips to client) vs backend (MAF auto-executes).
options.IsFrontendTool = name => myFrontendCatalog.Contains(name);
// Surface a sanitized progress message while a backend tool runs ("Checking your spending...").
// Return null to suppress for a given tool. NEVER include raw tool names — this is user-facing.
options.BuildBackendToolStatus = name => name switch
{
"pf_get_spending_summary" => "Checking your spending...",
_ => null,
};
// Lifecycle hooks fired by the surrounding AgentLoopProcessor.
options.OnTurnStarted = (turn, ct) => MetricsAsync(turn, ct);
options.OnTurnCompleted = (turn, summary, ct) => AuditAsync(turn, summary, ct);
options.OnTurnFailed = (turn, ex, ct) => LogFailureAsync(turn, ex, ct);
});
TurnSummary.Usage carries the per-turn input/output token totals aggregated from UsageContent updates the model emits — wire it into your audit row from OnTurnCompleted.
Frontend vs backend tools
- Frontend tools — round-trip through the pipeline. The driver yields a
ToolCallRequestFrame, the host sends it to the client (the WebSocket transport ships atoolCallenvelope), the client returns aToolCallResultFrame, and the driver re-invokes the agent with the result appended. - Backend tools — MAF auto-executes inline. Voxa does not yield a frame for the raw
FunctionCallContent(raw tool names likepf_*must not leak to consumer UI). Hosts opt into a sanitized client-facing progress envelope by returning a non-null string fromBuildBackendToolStatus; the driver then yields aStatusFramewhich the WebSocket transport ships as{ "type": "status", "message": "..." }.
Backend tool progress pattern
The natural conversational flow ("acknowledge → run a tool → speak the result") is supported out of the box:
- The model streams an acknowledgement as
TextContent. Voxa yields it asLlmTextChunkFrameimmediately, soSentenceAggregatorflushes the sentence and TTS starts speaking before the backend tool runs. - The model emits a backend
FunctionCallContent. MAF auto-executes the tool synchronously insideRunStreamingAsync. - While the tool runs, Voxa optionally emits
StatusFrame("Checking your spending...")for the client UI. - The model resumes streaming the final answer text. Frontend display tools (
display_pie_chart, etc.) round-trip through the pipeline as normal.
Targets Microsoft.Agents.AI 1.5.0.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Agents.AI (>= 1.5.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Voxa.Core (>= 0.7.2-alpha)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Voxa.Services.MicrosoftAgents:
| Package | Downloads |
|---|---|
|
Voxa.AspNetCore
Fluent ASP.NET Core integration for Voxa. Provides MapVoxaVoice + a VoicePipelineBuilder so MAF-using apps can drop in a voice pipeline with a single fluent expression: app.MapVoxaVoice("/voice", v => v.UseSpeechToText(...).UseMicrosoftAgent(agent).UseTextToSpeech(...)). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.2-alpha | 100 | 7/10/2026 |
| 0.7.1-alpha | 76 | 7/10/2026 |
| 0.7.0-alpha | 78 | 7/10/2026 |
| 0.6.0-alpha | 88 | 6/22/2026 |
| 0.5.0-alpha | 146 | 6/13/2026 |
| 0.4.0-alpha | 1,252 | 5/10/2026 |
| 0.3.0-alpha | 72 | 5/9/2026 |
| 0.2.0-alpha | 72 | 5/8/2026 |
| 0.1.0-alpha.2 | 65 | 5/8/2026 |
| 0.1.0-alpha | 75 | 5/8/2026 |