agui-dotnet-cross-language-tests
Skill16k starsChanged 9 months agoMITView on GitHub
Author cross-language interop tests that verify the AG-UI .NET SDK is wire-compatible with the TypeScript SDK — a Vitest TS client driving a C# CrossLanguage.TestServer over HTTP, both directions, including protobuf byte-parity against @ag-ui/proto. USE FOR: adding or modifying cross-language interop coverage, CrossLanguage.TestServer routes, the CrossLanguage.Vitest suite, protobuf wire parity tests, TS-client-to-C#-server or C#-client-to-TS-server scenarios. DO NOT USE FOR: .NET-only unit tests (use agui-dotnet-unit-tests), ASP.NET Core hosting integration tests (use agui-dotnet-integration-tests).
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-feature-workflowSkill
- agui-dotnet-integration-testsSkill
- agui-dotnet-sample-stepSkill
- agui-dotnet-sdk-docsSkill
- agui-dotnet-transportSkill
- agui-dotnet-unit-testsSkill
- agui-dotnet-wire-typesSkill
- agui-playwright-validateSkill
- ag-ui-a2ui-integrationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
Add a fake agent ((RunAgentInput) => BaseEvent[]) in server/fakeAgents.ts.
- Very specific: line 83
Add a *.cs test in AGUI.CrossLanguage.IntegrationTests/, decorated [Collection(nameof(TsServerCollection))], driving it with AGUIChatClient …
- Very specific: line 115
When adding a new protobuf event, add a fixture with the correct byteParity flag — scalar-only ⇒ strict, any object/array payload ⇒ …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Cross-Language Interop Tests
How to add tests proving the .NET AG-UI SDK interoperates with the TypeScript
SDK on the wire. The harness lives under sdks/dotnet/tests/. Read
sdks/dotnet/docs/cross-language-testing.md (design plus the "Harness reference"
section) for full background.
Interop philosophy
- The TypeScript SDK is the reference (oracle). A round-trip through the TS
codec —
proto.decode(proto.encode(event))— is the canonical normalised form both SDKs must agree on. Assert .NET output against that, not against the raw fixture object. - Round-trip semantic equivalence is the real guarantee, in both directions (TS→.NET and .NET→TS). Byte-for-byte parity is a stronger claim asserted only where deterministic.
- Tests exercise our code via project references (
AGUI.Abstractions,AGUI.Server,AGUI.Protobuf), never the published NuGet packages.
Harness architecture
Two directions, two server processes (see the "Harness reference" section of
sdks/dotnet/docs/cross-language-testing.md):
| Direction | Driver | Target server | Runner |
| TS → .NET (Phase 1) | TS HttpAgent (@ag-ui/client) | C# CrossLanguage.TestServer on :8091 | Vitest |
| .NET → TS (Phase 2) | C# AGUIChatClient | TS fake-agent server (server/main.ts) on :8092 | xUnit |
Phase 1 mechanism: Vitest globalSetup
(CrossLanguage.Vitest/helpers/global-setup.ts) starts LLMock
(@copilotkit/aimock, deterministic LLM responses), then
helpers/dotnet-server.ts runs dotnet build and spawns the produced
CrossLanguage.TestServer.exe (not dotnet run — single PID for clean Windows
teardown) with OPENAI_BASE_URL pointed at LLMock. It waits for the HTTP
listener, then test files fetch the routes. Both server and LLMock stay alive
across the whole run; vitest.config.ts sets fileParallelism: false so
concurrent SDK builds don't contend for artifact locks.
Phase 2 mechanism: TsServerFixture (IAsyncLifetime, shared via
[Collection(nameof(TsServerCollection))]) shells out pnpm run server
(tsx server/main.ts) which emits canned AG-UI events via @ag-ui/encoder;
AGUIChatClient consumes them.
Adding a TS → .NET scenario (Phase 1)
- Add a server-side route under
CrossLanguage.TestServer/following the endpoint pattern (MapPost→input.ToChatRequestContext(...)→GetStreamingResponseAsync→.AsAGUIEventStreamAsync(ctx)→TypedResults.ServerSentEvents(AgenticChatRoute.WrapAsSseItems(...))). SeeParallelToolCallsRoute.cs. For a route that must negotiate the transport (SSE or protobuf from theAcceptheader), end withAGUIResults.Events(events, httpContext, cancellationToken)instead and make sureProgram.csregistersProtobufEventStreamFormatteras anIAGUIEventStreamFormatter— seeAgenticChatRoute.cs. - Register it in
Program.cs(e.g.app.MapParallelToolCalls("/parallel_tool_calls")). - Register any new payload types in
CrossLanguageJsonSerializerContext.cs([JsonSerializable(typeof(YourReport))]). This context is snake_case to match the TS wire shape. - Add an aimock fixture in
fixtures/*.jsonkeyed byuserMessage/toolCallIdso LLM responses are deterministic (seefixtures/parallel-tool-calls.json). - Add a
tests/<scenario>.test.tsthat drives the route withHttpAgentand asserts on the collected event stream (seeparallel-tool-calls.test.ts).
Adding a .NET → TS scenario (Phase 2)
- Add a fake agent (
(RunAgentInput) => BaseEvent[]) inserver/fakeAgents.ts. - Mount its route in
server/main.ts. - Add a
*.cstest inAGUI.CrossLanguage.IntegrationTests/, decorated[Collection(nameof(TsServerCollection))], driving it withAGUIChatClient(seeAgenticChatTests.cs).
Protobuf wire-parity pattern
ProtobufParityRoute.cs exposes three codec routes backed by AGUIProtobuf:
| Route | In | Out | Backed by |
POST /protobuf/encode | event JSON | raw proto bytes | AGUIProtobuf.Encode |
POST /protobuf/decode | raw proto bytes | event JSON | AGUIProtobuf.Decode |
POST /protobuf/decode-framed | 4-byte BE length-prefixed frames | event JSON array | AGUIProtobuf.ReadFramedAsync |
tests/protobuf-parity.test.ts proves parity against @ag-ui/proto
(sdks/typescript/packages/proto/src/proto.ts) and @ag-ui/encoder framing
(sdks/typescript/packages/encoder/src/encoder.ts). For each fixture
(fixtures/protobuf-events.ts):
tsBytes = proto.encode(event);reference = proto.decode(tsBytes).- TS encode → .NET decode:
expect(netDecode(tsBytes)).toEqual(reference). - .NET encode → TS decode:
expect(proto.decode(netEncode(event))).toEqual(reference). - Byte parity depends on the fixture's
byteParityflag:"strict"— scalar-only events (only string/number fields, serialised in field-number order): assert the TS and .NET bytes are byte-for-byte equal."roundtrip"— payloads mapping togoogle.protobuf.Struct(map<string, Value>): map-entry ordering is not canonical across encoders, so do NOT assert byte equality. Assert both byte streams decode (via the TS codec) to the same event instead.
A framing test concatenates encoder.encodeProtobuf(event) frames (4-byte BE
prefix) and posts them to /protobuf/decode-framed to exercise ReadFramedAsync.
When adding a new protobuf event, add a fixture with the correct byteParity
flag — scalar-only ⇒ strict, any object/array payload ⇒ roundtrip.
Transport parity (parameterize scenarios over SSE + protobuf)
The codec-parity pattern above isolates the codecs — it never goes through the
TS HttpAgent or Accept-header negotiation. To prove the full transport path
(TS client negotiates a protocol → .NET server encodes it → TS client decodes it),
parameterize a scenario suite over both transports — the cross-language analogue of
the .NET integration tests' TransportFormat {Json, Protobuf} [Theory].
helpers/transport.ts is the shared mechanism: TRANSPORTS = ["sse", "protobuf"],
TRANSPORT_MEDIA_TYPE, and createTransportAgent(config, transport) which returns
an HttpAgent that requests the transport (it opts into protobuf via the public
fetch hook — the default agent hardcodes Accept: text/event-stream after
spreading headers, so a headers option can't override it) and captures the
response Content-Type. Drive the suite with describe.each(TRANSPORTS) and assert
lastResponseContentType() === TRANSPORT_MEDIA_TYPE[transport] plus the usual
decoded-event assertions — see tests/agentic-chat.test.ts.
describe.each(TRANSPORTS)("… [%s]", (transport) => {
it("…", async () => {
const { agent, lastResponseContentType } = createTransportAgent(
{ url: `${baseUrl()}/agentic_chat`, threadId: `t-${transport}` }, transport);
agent.messages = [{ id: "u", role: "user", content: "Hi, I am duaa" }];
const events: BaseEvent[] = [];
await agent.runAgent({}, { onEvent: ({ event }) => events.push(event) });
expect(lastResponseContentType()).toBe(TRANSPORT_MEDIA_TYPE[transport]);
// …assert decoded events (identical regardless of transport)…
});
});The route under test must negotiate (AGUIResults.Events, with
ProtobufEventStreamFormatter registered as an IAGUIEventStreamFormatter in
Program.cs). tests/agentic-chat.test.ts and
tests/state-events.test.ts are parameterized this way today.
Only parameterize protobuf-safe scenarios. ToolCallResult, Reasoning*, and
Activity* events have no message/oneof entry in the shared events.proto (the
one schema referenced by both @ag-ui/proto and .NET AGUI.Protobuf), so neither
SDK can protobuf-encode them — the codec throwing NotSupportedException mirrors
the schema, it is not a .NET gap. A suite that emits any of those must stay SSE-only.
Adding protobuf support for them is an upstream schema change (extend the canonical
TS events.proto, regenerate both SDKs, add mappers) — see agui-cross-sdk-parity.
AGUI_MEDIA_TYPE (@ag-ui/proto) and ProtobufEventStreamFormatter.ProtobufMediaType are the identical
exact string, and AGUIEventStreamResult sets Content-Type to it with no charset
— the client's exact === content-type match depends on that.
Running the suites
# TS → .NET + protobuf parity (builds + spawns the C# server automatically)
cd sdks/dotnet/tests/CrossLanguage.Vitest
pnpm test
pnpm exec vitest run tests/protobuf-parity.test.ts # just the parity suite
# .NET → TS (shells out `pnpm run server`)
cd sdks/dotnet/tests/AGUI.CrossLanguage.IntegrationTests
dotnet testpnpm install from the repo root once first. Requires .NET 10 SDK, Node at the
version in the repository's root .node-version, pnpm 10+.
❌ Critical anti-patterns
- Don't assert byte-equality for object/Struct payloads.
google.protobuf.Structmap ordering is non-canonical; byte parity is only valid for scalar-only ("strict") fixtures. For object payloads, assert round-trip equivalence. - Don't make the .NET fixture the oracle. The TS codec is the reference —
compare against
proto.decode(proto.encode(event)), not the raw event object. - Don't add a route without registering it in BOTH
Program.csANDCrossLanguageJsonSerializerContext.cs(when it introduces new payload types) — the server won't map the route or will fail AOT-safe serialization. - Don't depend on real LLM calls. Phase 1 LLM responses come from aimock
fixtures keyed by
userMessage/toolCallId; add a fixture for every new prompt. Use fixed/deterministic tool outputs (seeParallelToolCallsRoute's frozen clock). - Don't use
dotnet runto start the server in helpers, and don't assume parallel test files. The harness spawns the built.exefor a single killable PID and runs files sequentially (fileParallelism: false) to avoid build-lock contention and Windows port orphans.
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.

