Watch the explanation. Practice the skill.

Agents and tool use under control

Control an agent’s actions and keep its state outside the conversation.

Visual lesson1:44

Captions appear here during playback.

Agents and tool use under control

Control an agent’s actions and keep its state outside the conversation.

Download transcriptOpen video file

Source-based teaching example · Fictional data · Reviewed 2026-10-03. Microsoft Mark · locally synthesized. On a small screen, use fullscreen for diagram details or read the transcript.

Read the descriptive transcript

0:00 · What you will learn

Control an agent’s actions and keep its state outside the conversation.

What appears on screen

Control an agent’s actions and keep its state outside the conversation.

0:07 · 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.

What appears on screen

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.

0:23 · One useful term

Agent state. The application’s record of the task, decisions and pending effects.

What appears on screen

The application’s record of the task, decisions and pending effects.

0:32 · 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.

What appears on screen

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.

0:47 · Your turn to think

Can a shortened chat summary safely replace the permission record? Pause and decide before continuing.

What appears on screen

Can a shortened chat summary safely replace the permission record? Pause the video if you need more time.

1:05 · Why this answer works

No. Summaries can lose details. The application must preserve controlling state and prevent new actions after cancellation.

What appears on screen

No. Summaries can lose details. The application must preserve controlling state and prevent new actions after cancellation.

1:16 · Check 1

Enforce the total call limit.

What appears on screen

Enforce the total call limit.

1:21 · Check 2

Keep approvals outside chat summaries.

What appears on screen

Keep approvals outside chat summaries.

1:27 · Check 3

Test cancellation and repeated actions.

What appears on screen

Test cancellation and repeated actions.

1:32 · 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.

What appears on screen

Open the lesson Try the new case Check and revise The full task and its requirements are in the linked lesson.

Watching explains the example. Complete the lesson practice to check what you can do. Explore all visual lessons →