Hooks for Copilot Studio Agents (Preview)
Run fixed, rule-based steps at set moments in an agent's work, such as when a session starts or before a tool is used. Preview, for agents on the Microsoft Copilot harness.
Details
- Hooks fire on agent events including session start, tool calls, and errors. The hook decides when logic runs, and a workflow defines what it does
- A hook can load context at session start, inspect, change, or block a tool call before it runs, and transform a tool's result
- Hooks can also respond to failures and capture logs and telemetry
- Microsoft compares them to topic triggers on the standard harness
- In preview for agents on the Microsoft Copilot harness, formerly called the GitHub Copilot harness
Best for
Guardrails and logging that must happen every time, not whenever the model decides.
When to use it
An agent needs to load context up front, block certain actions, or record what it did for audit.
Who benefits
Makers building agents that touch sensitive systems or need a paper trail.
Join the newsletter to get ahead with AI.
I share strategies, new modules, free guides, and tools to get you better at using AI in your work.
Leading a team? See team programs →