Type: url
Original: https://ai.google.dev/gemini-api/docs/agent-hooks
Status: generated
Summary
Gemini API reference documentation describing Hooks, a mechanism for running custom scripts or external HTTP requests immediately before or after an agent executes code or modifies files inside its remote sandbox, covering the pre_tool_execution and post_tool_execution lifecycle events, the hooks.json matcher/handler schema, and use cases such as safety guardrails, multi-turn recovery, and audit logging.