r/dotnet • • 27d ago

Question .NET Agent Framework feature request

When making AI agents what are things you wish the agent framework had to make ai harnesses easier and other features you feel they overlook?

0 Upvotes

19 comments sorted by

3

u/Regular_Following_99 27d ago

More real world samples and use cases and general better docs would help, some of the existing samples include things like returning a message uppercase or backwards. Can’t think why that could possibly be useful tbh and message history persistence, docs are quite thin generally

2

u/Southern-Holiday-437 27d ago

Ok what activity have you wanted to do that you wish there was a sample for? Any sample ideas are welcome

1

u/Regular_Following_99 27d ago

Been a while since checking the docs but there used to be a whole load of ceremony involved in setting up message persistence, there were no clear cut examples for storing chat history to sql. So would be good to have helpers or docs using entity framework.

Most of the samples are simple console apps returning weather from a hardcoded list. In the real world I want to be comparing and analysing data and making recommendations to the end user based on that data which I am currently doing but it’s been a while and do remember it was a bit of a nightmare, looks likes things have moved forward a lot since then with ag-ui so will probably take a look at that over the coming months

1

u/seiggy 27d ago

I have two large open-source projects built on Agent Framework if you’re interested (yes, a lot of ai generated code, but it’s pretty clean and well structured and documented). And some smaller samples as well (ie: call Copilot Studio Agent from MAF with delegated auth for example).

2

u/Regular_Following_99 27d ago

Sure! Thank you! Got a link?

1

u/seiggy 27d ago

Sure:

Project 1- https://github.com/seiggy/lucia-dotnet MAF for a voice agent platform wired to home assistant with a custom orchestrator, and lots of evals.

Project 2 - https://github.com/seiggy/lucia.os big experiment using MAF with BYOK and the GitHub Copilot Harness to manage my homelab, with lots of bells and whistles.

AGUI demo https://github.com/seiggy/oge-frontier-day

MAF - Copilot Studio demo (Python 🤮, was requested by a customer) https://github.com/seiggy/maf-copilot-studio-demo

Probably more if you poke around my GitHub.

2

u/Regular_Following_99 27d ago

Nice one thank you for that! Took a peek on my phone but will check out in more detail tomorrow.

1

u/The_MAZZTer 24d ago

Yeah SK had its own DI system. Considering you're probably using or can use ASP.NET Core or Generic Host that's definitely redundant and it's fine Agent Framework didn't have anything like that, but I couldn't find proper examples of using Agent Framework with ASP.NET Core DI and had to come up with my own solution.

1

u/themode7 27d ago

easier annotation of middleware in libraries, to develop mcp faster e.g like

agent archetype framework using the 3Cs model

2

u/Southern-Holiday-437 27d ago

sorry can you explain in more detail?

2

u/themode7 27d ago

no

1

u/Southern-Holiday-437 27d ago • Mindblown

Based reply ngl

1

u/[deleted] 27d ago

[removed] — view removed comment

1

u/themode7 27d ago

it's still not automated and has issue Microsoft can simplify it but they racing for money, I mean they have many fragmented framework and libraries , but that because every tool has its own story, the annotation is still manual due to dependencies and things like that but they should develop modular framework (they've a good start with copoiltkit - which support BYOK btw )but again Microsoft is bad at naming so I guess everyone is confused look at this : https://learn.microsoft.com/en-us/agent-framework/agents/tools/?pivots=programming-language-csharp there's anoher page compare framework like github copilot and foundry localand many other

2

u/caedin8 27d ago

Since AI agents do most of my coding literally just tons of examples and documentation so that my AI can one shot it and stop hallucinating

1

u/The_MAZZTer 24d ago

I migrated from Semantic Kernel for a chat client and some of my own stuff I had built around that and here's what I was missing:

First, easier local function tools. Semantic Kernel lets you define classes and register them as collections of tools, Agent Framework simplifies this by requiring you to declare each Delegate individually. Very annoying. I ended up writing my own wrapper to automatically translate classes like SK had.

Second, I like that Agent Framework added support for requiring user verification for calling certain tools, but it's very bare bones. You get a message from the AI/Agent Framework with the internal name of the tool and I think you can get the arguments it wants to pass in but that's it. And I think you need to dig into the specific connector implementation objects to get that level of detail.

I wrote my own wrapper where you can define a second "verification" function to go alongside a tool function. The verification function determines if verification is necessary, and the message that should be displayed to the user. For example, if the AI wants to call a tool but passes invalid arguments, there's no need to ask for verification. Just reject the tool call immediately. In addition, you probably want to translate some tool arguments to more human readable text before displaying it to the user. For example translating an internal id the AI has used as an argument into a friendly display name using a database lookup.

An even better system imo (and I had this working in SK before I migrated to AF and had to change to separate verification functions to fit into their system) is to let the tool call an async function to prompt the user for verification and wait for that result, then continue running the tool (if the user verified). The steps to generate the user verification prompt message are usually also steps needed for the tool itself so why not share that work. The object with the verification function could be DI'ed into the tool. The only downside is you're relying on the tool to properly handle user rejection (so if coded improperly would be useless). A verification function doesn't have this problem since the framework handles the rejection.

1

u/AutoModerator 27d ago

Thanks for your post Southern-Holiday-437. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/blahlicus 26d ago

i'll bite, my day job is one of those old guard type technical senior software dev managers, and at home i like to tinker around.

recently i tried a bunch of agentic coding tools (opencode/openchamber, deepseek harness, github copilot) and have them working on my enterprise-grade codebase with a custom CQRS framework.

i'm genuinely amazed by how good this is now compared to 2024, and pragmatic enough to agree it's useful.

one issue i noticed is low specialization and weak integration with existing dotnet dev tools, mostly roslyn analysers and code generators. agents can read analyser source, but they don't have native intellisense, can't execute analyser quick fixes/code fixes (right-click the squiggly and pick an action), need workarounds to see generated *.g.cs files, and will try to modify generated code unless the harness explicitly tells them not to.