Add a first-party .NET client (proposal)#206
Draft
joshmouch wants to merge 1 commit into
Draft
Conversation
b72eeed to
ca6e1a3
Compare
ef382ab to
5cc1e43
Compare
3c206df to
422ff6b
Compare
This was referenced Jun 18, 2026
790ae4d to
3b49289
Compare
First-party .NET client for the Agent Host Protocol: a hand-written JSON-RPC client + multi-host runtime over a pluggable ITransport (WebSocket transport included), generated wire types, and DI integration. Includes OpenTelemetry-native self-instrumentation (a single ActivitySource + Meter named from the generated AhpTelemetryNames holder), the host-* dropped- event stream values from the shared telemetry contract, reconnect-supervisor metrics, an OtelExport example, and recorder-based telemetry tests.
3b49289 to
1fe087d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A complete .NET / NuGet client for AHP 0.3.0, at full cross-language parity with the Rust / Kotlin / Swift / TypeScript / Go clients — including the annotations channel (#195).
Opening as a draft: a 6th first-party client is a maintenance + ownership commitment only you can sign off on, so I'd love a scope decision before you spend review time. I'm happy to keep it updated as the protocol evolves.
What's here
Microsoft.AgentHostProtocol.Abstractions(generated wire types + transport/serializer interfaces),Microsoft.AgentHostProtocol(reducers +AhpClient+MultiHostClient),Microsoft.AgentHostProtocol.WebSockets.scripts/generate-csharp.ts(wired intogenerate.ts+ the CI generated-source-freshness check) — a protocol change is one regen, not N hand-edits.Design notes
[JsonPolymorphic](which drops unknown variants).JsonNamingPolicy+ records over per-property attributes for concision.Notes for review
Microsoft.AgentHostProtocol.*(yours). I'll wire the pack-and-publish workflow to match your TS/Kotlin lane, leaving the signing key on your side. (Ownership and publishing are the scope questions in A .NET client for AHP #214.)main. This PR's unique change isclients/dotnet/+ the codegen / CI / release wiring.The scope decision lives in #214: if you want a first-party .NET client, I'll own it, maintain it, and wire the publishing under
Microsoft.AgentHostProtocol.*.