MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Demo080 — Approved Backlog
Suspend a call with native MAF approval.
Objectives
- Compare explicit in-process approval and refusal before a SQLite write.
Prepare the demo
Start at the root of the complete solution already built in Release. Course prerequisites: Demo070. This program uses live chat from the selected profile; no embeddings are required except for Demo020 --embed. Check connectivity and required capabilities before attributing failure to the scenario.
| Project | Role |
|---|---|
| demos/Demo080_ApprovedBacklog/Demo080.App.csproj | App |
Launch from the root
dotnet run --project demos/Demo080_ApprovedBacklog/Demo080.App.csproj -c Release --no-buildModes and procedure
Use the same request and list readback as Demo070. Read Pending call, arguments and Fixed draft. Refuse a first proposal with n, then submit another and approve with y after review.
var function = AIFunctionFactory.Create(gate.Create, "create_backlog_item");
var writer = chat.AsAIAgent(name: "BacklogWriter", instructions:
"Call create_backlog_item exactly once with the host proposal ID. Do not invent success. Report the tool outcome in English.",
tools: [new ApprovalRequiredAIFunction(function)]);
var session = await writer.CreateSessionAsync(stop.Token);
var review = new ApprovalReview(session, gate);
Results and useful failures
ApprovalRequiredAIFunction intercepts the call before writing. The host resumes in the same session with a response built by ApprovalReview. Check Created and ItemId or no invocation; MAF refusal can prevent entry into WriteGate entirely. A request still pending after four rounds has no established success.
These observations are expected from inspecting the indicated code revision. No new model call was made to write this page; exact generated wording is not a reference output.
Scope and limits
Tests cover foreign sessions, missing responses, changed arguments and replay. An “only write if approved” instruction cannot replace them. Approval belongs to this process; no durable decision is stored.
