agui-dotnet-wire-types
Skill16k starsChanged 9 months agoMITView on GitHub
Add or modify a wire/protocol type in the AG-UI .NET SDK AGUI.Abstractions package — a new event, message, or content-part type, the AOT source-gen serializer context, or a polymorphic JSON converter, keeping it AOT-safe, JSON-wire-compatible with the TypeScript reference, and PublicAPI-clean. USE FOR: adding an AG-UI event type, adding a message role or input-content type, editing AGUIJsonSerializerContext, editing BaseEventJsonConverter / AGUIMessageJsonConverter / AGUIInputContentJsonConverter, fixing PublicAPI.Unshipped analyzer build failures on protocol types, wire-format round-trip serialization. DO NOT USE FOR: writing integration/SSE tests (use agui-dotnet-integration-tests), server hosting/endpoint code, or non-Abstractions packages.
Trending
More talk lately.about the whole repository
Who's talking about ag-ui-protocol/ag-ui
- strands-agents/harness-sdk“[FEATURE] AG-UI”GitHub · May 29, 2025 · 44 reactions
- A Hacker News story“Show HN: AG-UI Protocol – Bring Agents into Frontend Applications”Hacker News · May 13, 2025 · 36 points
- NousResearch/hermes-agent“Feature: Web UI Gateway — Local Browser-Based Interface with Streaming, Artifacts & Rich Rendering”GitHub · Mar 6, 2026 · 10 reactions
- langchain-ai/deepagents“AG-UI integration/demo”GitHub · Nov 5, 2025 · 8 reactions
- Effect-TS/effect“Feature request: AG-UI protocol support for effect/ai”GitHub · Jun 15, 2026 · 7 reactions
The biggest 5 of 56 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 56
Talked about on GitHub, Bluesky and Hacker News (56 times).
On GitHub · 50
- May 29, 2025[FEATURE] AG-UI — strands-agents/harness-sdk44 reactions · 4 comments
- Mar 6, 2026Feature: Web UI Gateway — Local Browser-Based Interface with Streaming, Artifacts & Rich Rendering — NousResearch/hermes-agent10 reactions · 15 comments
- Nov 5, 2025AG-UI integration/demo — langchain-ai/deepagents8 reactions · 5 comments
- Jun 15, 2026Feature request: AG-UI protocol support for effect/ai — Effect-TS/effect7 reactions
- Aug 22, 2025Feature Request: Add AG-UI Protocol Support — HolmesGPT/holmesgpt7 reactions · 5 comments
45 more on GitHub
- Aug 12, 2026Make Copilot SDK consumable for end-users by adding first-class AG-UI protocol support — github/copilot-sdk5 reactions
- Apr 10, 2026FR : Integrations with the A2UI and AG‑UI Protocols — Chainlit/chainlit4 reactions · 2 comments
- Jun 27, 2025support agui protocol — langgenius/dify4 reactions · 3 comments
- Sep 14, 2026IPI-1211 · PLANNER-RELIABILITY — Upgrade the Mastra Bridge to 1.1.4 Before Re-Testing Intelligence — amoai-tech/ipixaisays it tested it3 reactions · 11 comments
- Aug 17, 2026[Question / Feature Request] Any plans or built-in support for AG-UI protocol integration? — google/adk-go3 reactions · 2 comments
- Sep 27, 2026IPI-1363 · Prevent malformed workspace context from crashing the Planner — amoai-tech/ipixai2 reactions · 6 comments
- Sep 20, 2026IPI-1259 · Show a visible Production Copilot error when an AI run drops — amoai-tech/ipixai2 reactions · 14 comments
- Jul 22, 2026fix(deps): bump @ag-ui/mastra to stable, prevent HITL interrupt strand (IPI-760) — amo-tech-ai/lumina-studio2 reactions · 14 comments
- Nov 16, 2025docs: pluralize add_langgraph_fastapi_endpoint due to ag-ui-protocol/ag-ui/pull/701 — CopilotKit/CopilotKit2 reactions · 4 comments
- Oct 17, 2025🚀 Feature Request: Agno shared state as adk-middleware — CopilotKit/CopilotKit2 reactions · 2 comments
- Jun 30, 2025feat: AG-UI adapter (toolsets) — pydantic/pydantic-ai2 reactions · 6 comments
- Nov 1, 2026chore(deps): bump @ag-ui/core from 1.0.2 to 1.0.3 — dungsil/keundal1 reaction · 1 comment
- Aug 31, 2026Bump jsondiffpatch, @ag-ui/mastra and @mastra/client-js — ovabor/worksync-frontend1 reaction · 2 comments
- Aug 20, 2026Tracking: our upstream comments on A2A #1992 and AG-UI #2148 — hukaichun/funduq1 reaction · 1 comment
- Apr 10, 2026🐛 Bug: [sdk-python] Intermediate messages from subgraphs appear in final MessagesSnapshotEvent — CopilotKit/CopilotKit1 reaction · 2 comments
- Mar 15, 2026Ensure glasses client is written correctly and perform gap analysis of design document and implement missing features — companionintelligence/CI-Mentra1 reaction
- Feb 22, 2026[FEAT] add Agno (AgnoOS) as a supported agent provider — tambo-ai/tambo1 reaction · 1 comment
- Oct 7, 2025为BotSharp添加AGUI兼容插件 — GreenShadeZhang/BotSharp1 reaction
- Jul 25, 2025https://github.com/ag-ui-protocol/ag-ui — mikkihugo/claude-code-zen1 reaction
- Jun 23, 2025[FEAT] Support AGUI — VoltAgent/voltagent1 reaction · 5 comments
- May 25, 2025AG-UI — mudler/LocalAGI1 reaction
- Nov 2, 2026chore(deps): bump the ag-ui-updates group across 1 directory with 2 updates — 46ki75/elmethis0 reactions
- Nov 2, 2026Bump @ag-ui/client from 0.0.59 to 1.0.3 — govuk-once/govuk-chat-v20 reactions
- Nov 1, 2026Bump zod and @ag-ui/core in /chatbot-app/frontend — aws-samples/sample-reconciliation-agent0 reactions
- Nov 1, 2026Bump @ag-ui/client from 0.0.59 to 1.0.1 in /web — cfokit/cfokit0 reactions · 1 comment
- Oct 24, 2026Bump @ag-ui/client from 1.0.2 to 1.0.3 in /extensions/conversationalbi/runtime — sanderdw/iceberg-data-platform0 reactions
- Oct 23, 2026DEV: Bump @ag-ui/client from 0.0.59 to 1.0.3 in /architect-html — origam/origam0 reactions
- Oct 22, 2026[TASK] Progressive A2UI over AG-UI via a render_a2ui system tool — yaalalabs/agent-kernel0 reactions
- Oct 20, 2026chore: bump @ag-ui/client from 0.0.59 to 1.0.3 — 46ki75/internal0 reactions · 1 comment
- Oct 19, 2026build(deps): bump @ag-ui/client from 1.0.2 to 1.0.3 in /harness/web — roboalchemist/kicad-agent0 reactions
- Oct 15, 2026deps: bump @ag-ui/client from 0.0.59 to 1.0.2 — d2k-klin/reelhive0 reactions · 1 comment
- Oct 15, 2026deps: bump ag-ui-protocol from 0.1.22 to 1.0.0 — d2k-klin/reelhive0 reactions · 1 comment
- Oct 12, 2026Bump @ag-ui/client from 0.0.59 to 1.0.2 in /apps/portal — ovsec/agent-platform0 reactions
- Oct 11, 2026chore(deps): bump @ag-ui/client from 0.0.59 to 1.0.2 in /apps/admin — karthictu/casepilot0 reactions
- Oct 9, 2026build(deps): Bump @ag-ui/client from 0.0.59 to 1.0.2 in /src/web — devkimchi/battle-school-lunch0 reactions
- Oct 8, 2026ag-ui — hmafridy1-sketch/Hemel0 reactions
- Oct 5, 2026chore(deps): Bump @ag-ui/core from 0.0.57 to 1.0.1 in /server — dineshreddymeka/Agent-Marko0 reactions · 1 comment
- Oct 4, 2026build(deps): Bump ag-ui-protocol from 0.1.19 to 1.0.0 in /services/form-agent — angelmtenor/ai-circus-framework0 reactions
- Oct 4, 2026build(deps): Bump ag-ui-protocol from 0.1.19 to 1.0.0 in /services/rag-agent — angelmtenor/ai-circus-framework0 reactions
- Oct 4, 2026build(deps): Bump ag-ui-protocol from 0.1.19 to 1.0.0 in /services/assistant — angelmtenor/ai-circus-framework0 reactions
- Oct 4, 2026chore(deps): bump @ag-ui/core from 1.0.0 to 1.0.1 — c10366956/cyrene-cda0 reactions
- Oct 2, 2026Bump ag-ui-protocol from 0.1.19 to 1.0.0 — sidhasadhak/aughor0 reactions
- Sep 29, 2026chore(deps): bump @ag-ui/client from 0.0.59 to 1.0.2 in /chatbot-app/frontend — aws-samples/sample-strands-agent-with-agentcore0 reactions
- Sep 29, 2026chore(deps): bump @ag-ui/core from 0.0.59 to 1.0.2 in /chatbot-app/frontend — aws-samples/sample-strands-agent-with-agentcore0 reactions
- Sep 28, 2026build(deps): bump ag-ui-protocol from 0.1.22 to 1.0.0 — srtab/daiv0 reactions
On Bluesky · 5
- Aug 6, 2025with the emergence of early MCP-UI and AG-UI standards, the 2013 perspective of "cards are the future of the web" is set to ring true for a… — @ronan.design3 likes and reposts · 1 reply
- Oct 2, 2026📦 ag-ui-protocol / ag-ui ⭐ 16,187 (+68) 🗒 TypeScript AG-UI: the Agent-User Interaction Protocol. Bring Agents into Frontend Applications. — @github-trending-js.bsky.social1 likes and repost
- Jul 29, 2026📦 ag-ui-protocol / ag-ui ⭐ 15,003 (+48) 🗒 TypeScript AG-UI: the Agent-User Interaction Protocol. Bring Agents into Frontend Applications. — @github-trending-js.bsky.social1 likes and repost
- Jul 22, 2026github.com/ag-ui-protoc... [Related post:https://javapro.io/2026/07/16/solving-spring-ais-ui-challenge-with-ag-uis-java-sdk/] << ...open,… — @stefanofago.bsky.social1 likes and repost
- May 14, 2025github.com/ag-ui-protoc... — @detroitpro.bsky.social1 likes and repost
On Hacker News · 1
- May 13, 2025Show HN: AG-UI Protocol – Bring Agents into Frontend Applications36 points · 5 comments
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agui-cross-sdk-paritySkill
- agui-dojoSkill
- agui-dotnet-agents-syncSkill
- agui-dotnet-code-reviewSkill
- agui-dotnet-cross-language-testsSkill
- agui-dotnet-feature-workflowSkill
- agui-dotnet-integration-testsSkill
- agui-dotnet-sample-stepSkill
- agui-dotnet-sdk-docsSkill
- agui-dotnet-transportSkill
- agui-dotnet-unit-testsSkill
- agui-playwright-validateSkill
- ag-ui-a2ui-integrationSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Add or change a serialized protocol type in sdks/dotnet/src/AGUI.Abstractions/.
- Very specific: line 12
Run all commands from sdks/dotnet/.
- Distinctive: line 16
Every change to a polymorphic type touches four coordinated spots.
- Distinctive: line 109
No tuples in public APIs — define a named type.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AG-UI .NET Wire/Protocol Types
Add or change a serialized protocol type in sdks/dotnet/src/AGUI.Abstractions/. These types are the JSON wire format. The TypeScript SDK is the reference — every type must round-trip against its JSON. Add // Keep in sync with sdks/typescript/packages/core/src/{events,types}.ts to each new type.
The 5 source packages are AGUI.Abstractions, AGUI.Formatting, AGUI.Protobuf, AGUI.Client, AGUI.Server. Wire types live in AGUI.Abstractions only. (sdks/dotnet/AGENTS.md is the canonical reference for the serialization rules and conventions.)
Run all commands from sdks/dotnet/.
Hard rules (forgetting any breaks the build or wire compat)
Every change to a polymorphic type touches four coordinated spots. Miss one and either the build fails or the type silently won't deserialize:
- The concrete class (
Events/,Messages/). - The discriminator constant (
AGUIEventTypes/AGUIRoles/AGUIInputContentTypes). - The source-gen context registration (
Serialization/AGUIJsonSerializerContext.cs). - The hand-written converter
ReadandWritecases (BaseEventJsonConverter/AGUIMessageJsonConverter/AGUIInputContentJsonConverter).
Plus: PublicAPI.Unshipped.txt (analyzer fails the build) and a round-trip test.
Recipe: new EVENT type
- Class in
Events/{Name}Event.cs,sealed, derivingBaseEvent. OverrideType => AGUIEventTypes.{Name}. - Constant in
Events/AGUIEventTypes.cs:public const string {Name} = "SCREAMING_SNAKE_CASE";. - Register
[JsonSerializable(typeof({Name}Event))]inAGUIJsonSerializerContext. - Converter in
BaseEventJsonConverter: add aReadswitch arm (AGUIEventTypes.{Name} => jsonElement.Deserialize(options.GetTypeInfo(typeof({Name}Event))) as {Name}Event) and aWritecase {Name}Event x: JsonSerializer.Serialize(writer, x, options.GetTypeInfo(typeof({Name}Event))); break;. - PublicAPI — add every new public member to
src/AGUI.Abstractions/PublicAPI.Unshipped.txt(format below). - Test in
tests/AGUI.Abstractions.UnitTests/{Name}EventTest.cs(JsonDocument assertions).
[JsonPropertyName("type")]
public override string Type => AGUIEventTypes.RunStarted;
[JsonPropertyName("threadId")] // required: init to string.Empty
public string ThreadId { get; set; } = string.Empty;
[JsonPropertyName("parentRunId")] // optional: no JsonIgnore needed
public string? ParentRunId { get; set; }
[JsonPropertyName("value")] // dynamic payload: JsonElement, never object
public JsonElement? Value { get; set; }Variation: MESSAGE type
Same shape, but: folder Messages/, derive AGUIMessage, discriminator is role keyed on AGUIRoles constants (lowercase, e.g. "assistant"), and the converter is AGUIMessageJsonConverter (Read + Write switch arms). Sync against types.ts. Most roles serialize directly; AGUIUserMessage is hand-serialized because its content is string | array — follow the existing WriteUserMessage/DeserializeUserMessage pattern if a role needs union content.
Variation: INPUT-CONTENT part
Folder Messages/, derive AGUIInputContent, discriminator is type keyed on AGUIInputContentTypes constants (lowercase, e.g. "image"), converter is AGUIInputContentJsonConverter. Also add the same arm to AGUIMessageJsonConverter.DeserializeUserMessage's inner contentType switch, since user-message arrays inline-dispatch content parts.
Serialization / AOT rules
[JsonSerializable(typeof(T))]for every new type — non-negotiable for AOT (no runtime reflection serializer).[JsonPropertyName("camelCase")]on every serialized property (explicit even though the context setsCamelCase).- No
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]on optional properties. The context setsDefaultIgnoreCondition = WhenWritingNullonce, for every type it knows, andAGUIJsonUtilities.DefaultTypeInfoResolvercarries the same rule into caller-ownedJsonSerializerOptions. Repeating it per property is what let threenulls onto the wire before anyone noticed the pattern was optional.NullOmissionTestfails if the context-wide setting stops doing the work, so a re-added attribute is not a harmless duplicate — it hides the regression. - A non-nullable
JsonElementthat the contract lets a producer leave out does need[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)](seeAGUITool.Parameters): it is nevernull, so the null rule cannot reach it, and an unsetJsonElementthrows on write. - Required strings init to
string.Empty; collections init to[]. - Serialize via the generated context:
AGUIJsonSerializerContext.Default.{Type}(oroptions.GetTypeInfo(typeof(T))inside converters). - Dynamic/arbitrary payloads are
JsonElement/JsonElement?. - Never
JsonSerializer.Serialize<object>(...), never pass raw strings through unparsed, never reflection-based serialization.
Polymorphic converter pattern
Hand-written JsonConverter<TBase>, keyed on a discriminator property. BaseEventJsonConverter is the exemplar: Read deserializes to JsonElement, reads the discriminator, switches to the concrete GetTypeInfo(...), and throws JsonException on unknown/null; Write switches on the runtime type. Both directions must list every concrete type. A new abstract family needs the converter referenced via [JsonConverter(typeof(...))] on the base class.
PublicAPI.Unshipped.txt
The analyzer fails the build if a public member is missing here. Add one line per member, e.g. for an event:
AGUI.Abstractions.RunStartedEvent
AGUI.Abstractions.RunStartedEvent.RunStartedEvent() -> void
AGUI.Abstractions.RunStartedEvent.ThreadId.get -> string!
AGUI.Abstractions.RunStartedEvent.ThreadId.set -> void
override AGUI.Abstractions.RunStartedEvent.Type.get -> string!
AGUI.Abstractions.AGUIJsonSerializerContext.RunStartedEvent.get -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<AGUI.Abstractions.RunStartedEvent>! = non-null reference, ? = nullable. Don't forget the source-gen context's generated JsonTypeInfo<T> getter line.
Round-trip test (mandatory)
Assert JSON property names by parsing with JsonDocument — asserting the deserialized object alone misses camelCase/discriminator bugs. Don't compare full JSON strings; no reflection.
var json = JsonSerializer.Serialize(evt, AGUIJsonSerializerContext.Default.CustomEvent);
using var doc = JsonDocument.Parse(json);
Assert.Equal("CUSTOM", doc.RootElement.GetProperty("type").GetString());
Assert.Equal("user_preference_updated", doc.RootElement.GetProperty("name").GetString());Also test dispatch through the base: JsonSerializer.Deserialize(json, AGUIJsonSerializerContext.Default.BaseEvent) then Assert.IsType<CustomEvent>(evt). For wire-format drift, add a fixture under tests/AGUI.Abstractions.UnitTests/Compatibility/ produced by the TypeScript SDK and load it via FixtureLoader ({Category}CompatibilityTest naming).
Code style / naming
sealed class(norecord); one type per file named for the type.- No tuples in public APIs — define a named type.
- Event classes
{Name}Event; event discriminatorsSCREAMING_SNAKE_CASE(member PascalCase); role/type/outcome discriminators are lowercase string constants in static classes — never enums. - Braces always;
ArgumentNullException.ThrowIfNull(...)for public validation; no///docs oninternal/private.
Validate
dotnet build
dotnet test tests/AGUI.Abstractions.UnitTests/Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

