AiSdk.UiStreamProtocol
1.0.4
dotnet add package AiSdk.UiStreamProtocol --version 1.0.4
NuGet\Install-Package AiSdk.UiStreamProtocol -Version 1.0.4
<PackageReference Include="AiSdk.UiStreamProtocol" Version="1.0.4" />
<PackageVersion Include="AiSdk.UiStreamProtocol" Version="1.0.4" />
<PackageReference Include="AiSdk.UiStreamProtocol" />
paket add AiSdk.UiStreamProtocol --version 1.0.4
#r "nuget: AiSdk.UiStreamProtocol, 1.0.4"
#:package AiSdk.UiStreamProtocol@1.0.4
#addin nuget:?package=AiSdk.UiStreamProtocol&version=1.0.4
#tool nuget:?package=AiSdk.UiStreamProtocol&version=1.0.4
AiSdk.UiStreamProtocol
Core types and SSE primitives for the Vercel AI SDK UI Stream Protocol.
This package is the foundation — it defines all stream part types and handles SSE framing. Most projects won't use it directly and should instead install the integration package for their use case:
- ASP.NET Core server →
AiSdk.UiStreamProtocol.AspNetCore - HTTP client / consumer →
AiSdk.UiStreamProtocol.HttpClient
Writing SSE frames
using AiSdk.UiStreamProtocol;
using AiSdk.UiStreamProtocol.Models;
var writer = new UiSseWriter();
await writer.WriteAsync(stream, new TextStart("text-1"));
await writer.WriteAsync(stream, new TextDelta("text-1", "Hello world"));
await writer.WriteAsync(stream, new TextEnd("text-1"));
await writer.WriteAsync(stream, new Finish());
await writer.WriteAsync(stream, new Done());
Each call writes one SSE frame: data: {...}\n\n. Done writes the literal data: [DONE]\n\n.
Stream part types
| Category | Types |
|---|---|
| Text | TextStart, TextDelta, TextEnd |
| Reasoning | ReasoningStart, ReasoningDelta, ReasoningEnd |
| Tool calls | ToolInputStart, ToolInputDelta, ToolInputAvailable, ToolOutputAvailable |
| Steps | StartStep, FinishStep |
| Sources | SourceUrl, SourceDocument |
| File | File |
| Custom data | Data<T> |
| Control | Finish, Abort, Done |
| Error | Error |
| 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
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AiSdk.UiStreamProtocol:
| Package | Downloads |
|---|---|
|
AiSdk.UiStreamProtocol.AspNetCore
ASP.NET Core helpers for serving Vercel AI SDK UI streams — IResult, HttpResponse extension, and streaming headers. |
|
|
AiSdk.UiStreamProtocol.HttpClient
HttpClient helpers for consuming Vercel AI SDK UI streams as IAsyncEnumerable. |
GitHub repositories
This package is not used by any popular GitHub repositories.