microsoft / microsoft/agent-framework

.NET: FunctionApprovalRequest get applied to all functions although expected to only one

Open
#3,054 14 comments 0 reactions 0 assignees View on GitHub
.NET
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

I'm using `1.0.0-preview.251219.1` library version and exploring examples. When running [Step14](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/GettingStarted/Agents/Agent_Step14_Middleware) I've noticed that approval is asked when agent tries calling both functions (so it's asked two times), although only one of them (GetWeather) is wrapped with `ApprovalRequiredAIFunction`

Contributor guide

Open the contributing guide

Research direction

Start with the dotnet/samples/GettingStarted/Agents/Agent_Step14_Middleware example and trace how ApprovalRequiredAIFunction wraps GetWeather and how both functions are invoked. Reproduce the approval prompts with library version 1.0.0-preview.251219.1; done means approval is requested only for GetWeather, not the other function.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.