← Back to glossary
+Suggest a term
Concept·Patterns & Practices·Added 7 days ago

Agent Hooks

Also known as: agentic hooks, Claude hooks, coding agent hooks, hook triggers

Automated triggers that fire an agent action when a specific event occurs in a development environment, such as saving a file or creating a pull request. The agent runs in the background without a manual prompt, handling tasks like test generation or documentation updates.

Agent hooks invert the usual AI interaction pattern. Instead of a developer prompting an agent and waiting for output, hooks let you define agent behavior as a reaction to events. Save a file, and a documentation agent updates the relevant docs. Open a pull request, and a code review agent runs. Create a new component, and a test generation agent writes unit tests. The developer never typed a prompt; the work just happened.

Both Kiro and Anthropic's Claude Code implemented hooks as a first-class feature in 2025-2026. In Kiro, hooks are configured per-project and tied to file system events. In Claude Code, hooks let you define shell commands that run before or after the agent takes specific action types, giving you fine-grained control over what the agent can do autonomously. Google's Antigravity CLI similarly carries over hook support from Gemini CLI.

For teams running agents at scale, hooks are how continuous background automation becomes practical. Rather than manually kicking off agent tasks, you wire the agent into your existing development workflow at the event level. The main design consideration is trust: hooks fire without explicit approval, so the scope of what the hook can do and the conditions that trigger it need to be defined carefully. This connects hooks directly to the human-in-the-loop design problem.

This definition is AI-generated and refreshed weekly. It may contain inaccuracies. Use your own judgment, especially for production decisions.
Related terms
Agentic workflowBackground agentClaude Code HooksAgentic IDEKiro