Loading image...Kiro
  • CLI
  • Powers
  • Autonomous agent
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro
Loading image...Kiro
Product
  • About Kiro
  • CLI
  • Powers
  • Autonomous agent
  • Pricing
  • Downloads
For
  • Enterprise
  • Startups
Resources
  • Documentation
  • Blog
  • Changelog
  • FAQs
  • Report a bug
  • Suggest an idea
  • Billing support
Social
Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
  1. Docs
  2. IDE
  3. Hooks

Hooks

On this page
  • What are agent hooks?
  • How agent hooks work
  • Setting up agent hooks
  • Using the explorer view
  • Using the command palette
  • Next steps

Agent hooks are powerful automation tools that streamline your development workflow by automatically executing predefined agent actions when specific events occur in your IDE. With hooks, you eliminate the need to manually request routine tasks and ensure consistency across your codebase.

What are agent hooks?

Agent hooks are automated triggers that execute predefined agent prompts or shell commands when specific events occur in your IDE. Rather than manually asking for routine tasks to be performed, hooks set up automated responses to events.

There are three categories of hooks:

  • File hooks - Trigger on file save, create, or delete (with glob patterns)
  • Contextual hooks - Trigger on prompt submit or agent completion
  • Manual hooks - Trigger on-demand via UI or slash commands

Agent hooks transform your development workflow through intelligent automation. By setting up hooks for common tasks, you can:

  • Maintain consistent code quality
  • Prevent security vulnerabilities
  • Reduce manual overhead
  • Standardize team processes
  • Create faster development cycles

How agent hooks work

The agent hook system follows a simple two-step process:

  1. Event detection: The system monitors for specific events in your IDE
  2. Automated action: When an event occurs, an action — either a predefined agent prompt or a shell command — is executed

This automation flow eliminates repetitive tasks and ensures consistency across your codebase.

Setting up agent hooks

Creating and managing hooks is straightforward:

Using the explorer view

  1. Navigate to the Agent Hooks section in the Kiro panel
  2. Click the + button to create a new hook
  3. Define the hook workflow using natural language in the input field
  4. Press Enter or click Submit to proceed
  5. Configure the hook settings and save

Using the command palette

You can also use the Command Palette to navigate to the Hook UI:

  1. Open the command palette with Cmd + Shift + P (Mac) or Ctrl + Shift + P (Windows/Linux)
  2. Type Kiro: Open Kiro Hook UI
  3. Follow the on-screen instructions to create your hook

Next steps

  • Hook types - Learn about file, contextual, and manual triggers
  • Hook actions - Learn about agent prompt and shell command actions
  • Management - Learn how to organize, edit, and maintain your hooks
  • Best practices - Follow patterns for effective hook design
  • Examples - See examples and templates you can use
Page updated: December 23, 2025
Create powers
Hook triggers