MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Demo290 — Formatted Planning
ForJsonSchema is sent on both attempts; the compiled schema is reused and text is trimmed without fence extraction. Provider support must be checked; simulation creates no row.
Objectives
- Add a structured format contract to validated planning.
Prepare the program
Live chat through common configuration, granite4:3b by default; no embeddings required. An optional API is selected explicitly with no automatic fallback. Start at the root of the complete distribution. Preserve shared projects and configuration files. Some historical prompts and labels in Demo260–290 remain French in public code; commands and identifiers match this revision.
dotnet build BaseTechnique.slnx -m:1 -c Release| Project | Role |
|---|---|
| demos/Demo290_FormattedPlanning/Demo290.App.csproj | App |
| shared/Maf.DemoConnection/Maf.DemoConnection.csproj | Shared implementation |
Commands from the root
dotnet run --project demos/Demo290_FormattedPlanning/Demo290.App.csproj -c Release --no-buildProcedures and variants
Repeat Demo280’s requests with a schema-capable provider. Compare invocation options and local validation.
var compiledSchema = JsonSchema.FromText(PlanJsonSchema);
using var schemaDoc = JsonDocument.Parse(PlanJsonSchema);
JsonElement schemaElement = schemaDoc.RootElement.Clone();
// ResponseFormat explicite au moment de l'appel.
var runOptions = new AgentRunOptions
{
ResponseFormat = ChatResponseFormat.ForJsonSchema(
schemaElement,
schemaName: "Plan",
schemaDescription: "Short execution plan with 1 to 4 steps")
What must be observable
ForJsonSchema is sent on both attempts; the compiled schema is reused and text is trimmed without fence extraction. Provider support must be checked; simulation creates no row.
These results are expected from the linked code. Checks actually rerun for this lot are distinguished in exercises and reception; no unmeasured live output is presented as observed.
Limits and retained state
Demo230–250 build a fresh graph per input and write no business effect. Demo260 retains its two sessions only in-process. Demo270–290 interpret a plan through simulated printing without a workflow engine. Live calls depend on the profile; scripted tests qualify no model.
