agui-dotnet-cross-language-tests

A guide for testing whether the AG-UI .NET SDK can exchange data with the TypeScript SDK. The tests run a TypeScript client and a C# test server in both directions.

In plain words
What is it for?
Use it to add interoperability tests for HTTP events, protobuf encoding, round trips, and compatibility between .NET and TypeScript implementations.
Why use it?
Different programming languages can encode the same event differently, so normal unit tests may miss communication failures between the SDKs.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ag-ui-protocol/ag-ui/agui-dotnet-cross-language-tests
Any agent
npx skills add ag-ui-protocol/ag-ui --skill agui-dotnet-cross-language-tests
Clone the repo
git clone --depth 1 https://github.com/ag-ui-protocol/ag-ui

Made for: Claude Code, Codex.

Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00146 $0.02780
Opus 5 $0.00073 $0.01390
Sonnet 5 $0.00029 $0.00556
Haiku 4.5 $0.00015 $0.00278

Measured yesterday against content hash 1ee27c2e726b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agui-dotnet-cross-language-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/agui-dotnet-cross-language-tests/SKILL.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 200 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 200 lines · 146 tokens per session scan A 1ee27c2e726b

Subscribe to this mod's changes

agui-dotnet-cross-language-tests is a skill published in the GitHub repository ag-ui-protocol/ag-ui (15,628 stars, last pushed yesterday), licensed MIT. It adds 146 tokens to every session and 2,780 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.