Agents and tool use under control Control an agent’s actions and keep its state outside the conversation. Reviewed: 2026-10-03 Source-based teaching example · Fictional data Narration: Microsoft Mark · locally synthesized 00:00:00.000 — What you will learn Control an agent’s actions and keep its state outside the conversation. Visual description: Control an agent’s actions and keep its state outside the conversation. 00:00:07.167 — The idea Check proposed actions before execution. Count every call, including parallel proposals. Store approvals and pending actions in reliable application state, not only in a shortened chat summary. Visual description: Check proposed actions before execution. Count every call, including parallel proposals. Store approvals and pending actions in reliable application state, not only in a shortened chat summary. 00:00:23.583 — One useful term Agent state. The application’s record of the task, decisions and pending effects. Visual description: The application’s record of the task, decisions and pending effects. 00:00:32.708 — A worked example A training webpage asks the agent to publish. The application has no publish tool and stops at its read-only research limit. Repeated lookups use the same recorded operation identity. Visual description: A training webpage asks the agent to publish. The application has no publish tool and stops at its read-only research limit. Repeated lookups use the same recorded operation identity. 00:00:47.792 — Your turn to think Can a shortened chat summary safely replace the permission record? Pause and decide before continuing. Visual description: Can a shortened chat summary safely replace the permission record? Pause the video if you need more time. 00:01:05.125 — Why this answer works No. Summaries can lose details. The application must preserve controlling state and prevent new actions after cancellation. Visual description: No. Summaries can lose details. The application must preserve controlling state and prevent new actions after cancellation. 00:01:16.792 — Check 1 Enforce the total call limit. Visual description: Enforce the total call limit. 00:01:21.625 — Check 2 Keep approvals outside chat summaries. Visual description: Keep approvals outside chat summaries. 00:01:27.042 — Check 3 Test cancellation and repeated actions. Visual description: Test cancellation and repeated actions. 00:01:32.583 — Now try a different case Open the lesson and try its different practice case. Use every check in the full task. Watching alone does not mark the lesson complete. Visual description: Open the lesson Try the new case Check and revise The full task and its requirements are in the linked lesson.