e-naxosMAF COURSE / COURS
Français

MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1

Demo070 — SQLite Backlog

Write to SQLite after validation and in-function confirmation.

Objectives

Prepare the demo

Start at the root of the complete solution already built in Release. Course prerequisites: 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.

Projects to run
ProjectRole
demos/Demo070_SqliteBacklog/Demo070.App.csprojApp

Launch from the root

dotnet run --project demos/Demo070_SqliteBacklog/Demo070.App.csproj -c Release --no-build

Modes and procedure

Choose a working database path, enter list, then a clear Auth bug request. Read the draft before confirming. The writer agent calls create_backlog_item with the host proposalId; the function then asks Approve this exact proposal? [y/N].

var gate = new WriteGate(store, draft, canWrite: global::Maf.DemoConnection.DemoConfiguration.GetSetting("MAF_DEMO_READ_ONLY") != "1");
[Description("Creates the fixed reviewed backlog draft in SQLite after host permission and console confirmation. Returns Created, Invalid, Refused or Error; never accepts replacement draft fields.")]
ToolOutcome CreateReviewed([Description("Exact host-issued proposal ID for the reviewed draft.")] string proposalId)
{
    Console.WriteLine($"Fixed draft: {JsonSerializer.Serialize(draft)}");
    Console.Write("Approve this exact proposal? [y/N] > ");
    gate.Approve("create_backlog_item", proposalId, Console.ReadLine() == "y");
    return gate.Create(proposalId);

demos/Demo070_SqliteBacklog/Program.cs · L44–L51 · 9a895c94534c

Source code · Demo070 · Folder

Results and useful failures

Refuse with n, check observations and list; try again with a new draft and y. Require Created with ItemId and the actual readback row. With MAF_DEMO_READ_ONLY=1, y is insufficient. An ambiguous request must not reach the writer tool.

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

Confirmation is inside the tool body; this is not yet ApprovalRequiredAIFunction. The guard covers a copied draft and a one-use in-memory capability. SQLite files and rows survive; this permission does not.

Continue and verify

Prerequisites

Continue reading

Complete demo folder · README

lot007-foundations-1 · 2026-10-24 · 9a895c94534cd5fc6f3da883e37e5f7856e588c1