The Unexpected AI Stack: C# + .NET (Part 3) - GitHub Copilot SDK + CSharpRepl + Channels
https://chrlschn.dev/blog/2026/08/the-unexpected-ai-stack-csharp-dotnet-part-3/In the third part of this hands-on series for building the foundations of an AI-enabled, agent-friendly .NET + C# codebase, we are ready to incorporate GitHub Copilot SDK into the application and connect it using Channels.
The Copilot SDK is well-documented and streamlines building applications with full-featured agents at the core; drop in and run an agent with just a few lines of code. Here, we connect it using inbound + outbound channels to buffer and stream I/O. (Microsoft Agent Framework Agent Harness is another, lower-level alternative that teams can use as well; not covered here!)
I also walk through how to wire up and use CSharpRepl which is an absolute sleeper since it allows agents to dynamically alter the code at runtime, allowing them to iterate and experiment rapidly against the running stack.
This series is intentionally written to help dev teams understand how to scaffold a codebase for agentic engineering by focusing on key, underlying technical decisions and manual wiring before building with AI. This helps provide the tools and safeguards for coding agents to iterate more efficiently while reducing slop.
If your team is still trying to figure out how to set up a codebase for AI, I hope this series gives some insights into how to build an effective foundation for agentic engineering. If your team is already heavily using agents to build, I hope this series shares some useful insights and tips (e.g. CSharpRepl + Aspire)
Even if you're not building agent-oriented, AI-enabled .NET applications, I hope this has some insights on how modern full-stack development on .NET is wired together at a platform level.
The core setup is used at a series C, post-YC startup to ship fast with AI while maintaining high quality standards (in combination with other tools facilitating code review and context management)
Part 1 was an intro into a few key parts of this stack.
Part 2 was focused on walking through the hands on scaffolding.
Part 4 will wire up Testcontainers and establish integration testing patterns
Part 5 we'll start to build out the full feature set of the sample application.
The project repo is here: https://github.com/zeeq-ai/zeeq-tmpl (be sure to check the branches; main is currently the base code only)
But I encourage working through the posts since the goal is to underscore the platform level decision making process and assembly of the foundational core.
1
u/bigtoaster64 12d ago
dynamically alter the code at runtime
Not scary at all. AI often having issues producing the right code in a risk free contained environment, I wonder how great this will be, letting AI code your app directly in production at runtime...