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
  4. Hook triggers

Hook types

On this page
  • On prompt submit
  • On agent stop
  • On file create
  • On file save
  • On file delete
  • Manual trigger

Agent Hooks support various trigger types, each designed for specific automation scenarios. Understanding these types helps you choose the right approach for your workflow needs.

On prompt submit

Triggers when the user submits a prompt.

When using the shell command action, the user prompt can be accessed via the USER_PROMPT environment variable.

Use Cases:

  • Provide additional context to the agent relevant to the prompt
  • Block certain prompts based on their content
  • Log all user prompts to a central location

On agent stop

Triggers when the agent has completed its turn, and finished responding to the user.

Use Cases:

  • Compile code and report any failures to the agent
  • Format any agent-generated code
  • Review changes made by agent and provide additional instructions

On file create

Triggers when new files matching specific patterns are created in your workspace.

Use Cases:

  • Generate boilerplate code for new components
  • Add license headers to new files
  • Set up test files when creating implementation files

On file save

Trigger when files matching specific patterns are saved.

Use Cases:

  • Run linting and formatting
  • Update related files
  • Generate documentation
  • Run tests for changed files

On file delete

Triggers when files matching specific patterns are deleted.

Use Cases:

  • Clean up related files
  • Update import references in other files
  • Maintain project integrity

Manual trigger

Manually execute a hook.

Use Cases:

  • On-demand code reviews
  • Documentation generation
  • Security scanning
  • Performance optimization
Page updated: January 12, 2026
Hooks
Hook actions