microsoft / microsoft/agent-framework
.NET: Consider improving the discoverability of required functions
@westey-m is already working on this.
Since Sep 17, 2025.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
Currently the code looks like this
```csharp
// Create the chat client and agent.
// Note that we are wrapping the function tool with ApprovalRequiredAIFunction to require user approval before invoking it.
AIAgent agent = new AzureOpenAIClient(
new Uri(endpoint),
new AzureCliCredential())
.GetChatClient(deploymentName)
.CreateAIAgent(instructions: "You are a helpful assistant", tools: [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(GetWeather))]);
```
Consider add an extension method e.g. `AsRequiredFunction()` so developers can more easily discover this
`AIFunctionFactory.Create(GetWeather).AsRequiredFunction()`
Or add a new method to `AIFunctionFactory`
`AIFunctionFactory.CreateRequiredFunction(GetWeather)`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.