MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Demo100 — Controlled Action
Compare textual instructions with deterministic host refusal.
Objectives
- Compare prompt-only instructions with enforced host validation.
Prepare the demo
Start at the root of the complete solution already built in Release. Course prerequisites: Demo050 ; Demo060. 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/Demo100_ControlledAction/Demo100.App.csproj | App |
Launch from the root
dotnet run --project demos/Demo100_ControlledAction/Demo100.App.csproj -c Release --no-buildModes and procedure
The program runs PromptOnly and ControlledAnalyst in sequence with a hostile urgent/SecretAdmin request. It ends with an invalid BacklogDraft fixed in code. No menu or interactive input; the first two paths genuinely call chat.
var invalid = new BacklogDraft("Example", "Bug", "urgent", "SecretAdmin", "A syntactically valid but forbidden draft.", []);
Console.WriteLine("Host-controlled business validation: " + string.Join(" ", invalid.Validate()));
Console.WriteLine("No write capability is granted. See the Lab02 -> Lab05 path for model-generated contracts and real SQLite writes.");
Results and useful failures
Compare free declaration, generated contract and Validation. The fixed counterexample shows Unknown priority and Unknown component independently of model cooperation, if execution reaches that step. No action tool is exposed, and no refund or insertion occurs.
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
EP001 used refund thresholds to explain the same boundary. This version consolidates the reasoning in the backlog; do not look for ExecuteRefund or an old menu. Failure of the first live call can stop the program before the final fixture; tests remain the deterministic route.
