Teams that build their own agents on an SDK get the same interception points in code. Use them to validate tool inputs, block tool calls and stop runs when a guardrail trips, before the result reaches a user or downstream system.
Read in this order
- OfficialIntercept and control agent behavior with hooks (Claude Agent SDK)Start here: intercepting tool calls in code with the Claude Agent SDK.
- OfficialGuardrails (OpenAI Agents SDK)Input, output and tool guardrails in the OpenAI Agents SDK.
- OfficialConfigure permissions (Claude Agent SDK)How SDK permission modes and rules combine with your hooks.