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.
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:
Triggers when the agent has completed its turn, and finished responding to the user.
Use Cases:
Triggers when the agent is about to invoke a tool.
In the Tool name field, provide the names of the specific tools for which this hook should execute. You can specify multiple entries. The following built-in categories are supported:
You can also use prefix filters to target tools by source:
Prefixes starting with @ are matched by regex, so you can use patterns like @mcp.*sql.* to match specific MCP tools by name.
You can ask Kiro for the names of the available tools.
Use Cases:
Triggers after the agent has invoked a tool.
For details on the Tool name field, refer to the Pre Tool Use section above.
Use Cases:
Triggers when new files matching specific patterns are created in your workspace.
Use Cases:
Trigger when files matching specific patterns are saved.
Use Cases:
Triggers when files matching specific patterns are deleted.
Use Cases:
Triggers before a spec task begins execution, when its status changes to in_progress.
Use Cases:
Triggers after a spec task completes execution, when its status changes to completed.
Use Cases:
Manually execute a hook.
Use Cases:
Hook types