This blog post was created with the help of AI tools. Yes, I used a bit of magic from language models to organize my thoughts and automate the boring parts, but the geeky fun and the
in C# are 100% mine.
GitHub Copilot just crossed a very interesting line.
It’s no longer “just” helping you write code — it can now run as an agent, with goals, tools, and autonomy, using Microsoft Agent Framework (MAF).
Watch the full video here:
In the video, I walk through three simple C# samples showing how Copilot can be used as an agent, not just a coding assistant.
From autocomplete to autonomy
The mental model shift is simple:
Copilot as a tool → prompt → suggestion
Copilot as an agent → goal → plan → act
With Microsoft Agent Framework, GitHub Copilot becomes part of your agent runtime, not just your editor UI.
Sample 1 – Creating a Copilot-backed agent
At its core, you define an agent and tell it what it is allowed to do.
using GitHub.Copilot.SDK;using Microsoft.Agents.AI;await using CopilotClient copilotClient = new();await copilotClient.StartAsync();AIAgent agent = copilotClient.AsAIAgent( instructions: "You are a helpful agent.");
No hacks.
No wrappers.
This agent is powered directly by GitHub Copilot.
Sample 2 – Giving the agent a goal
Instead of prompting, you assign tasks.
await agent.RunAsync("""Review this C# project and explain what it does.Focus on architecture and main responsibilities.""");
This is where Copilot stops responding and starts working.
Sample 3 – Applying it to real dev workflows
In the video, I show how the same agent can be used for things like:
- Understanding unfamiliar repositories
- Explaining legacy code
- Supporting real developer workflows
await agent.RunAsync("""Analyze this repository and suggest improvements.Create a summary suitable for a pull request description.Run the analisys using CODEX and OPUS.""");
This feels much closer to a junior developer teammate than a chat window.
Why this matters for .NET developers
If you’re building in C# today:
- You already know GitHub Copilot
- You already write .NET services
- You already work with repositories and PRs
Microsoft Agent Framework + Copilot is the shortest path from AI ideas to real systems.
Resources
GitHub Copilot Agent docs (C#):
https://learn.microsoft.com/en-us/agent-framework/user-guide/agents/agent-types/github-copilot-agent?pivots=programming-language-csharp
Happy coding!
Greetings
El Bruno
More posts in my blog ElBruno.com.
More info in https://beacons.ai/elbruno
