Hooks¶
Hooks observe and control operations. They can log events, block operations, inject context, and request user approval.
Available Hooks¶
| Hook | Description | Repository |
|---|---|---|
| Logging | JSONL event logging | GitHub |
| Approval | User approval gates | GitHub |
| Redaction | Sensitive data redaction | GitHub |
| Streaming UI | Real-time output display | GitHub |
| Backup | File backup before writes | GitHub |
| Status Context | Status tracking injection | GitHub |
| Todo Reminder | Todo list context injection | GitHub |
| Scheduler Heuristic | Smart tool scheduling | GitHub |
| Scheduler Cost-Aware | Cost-optimized scheduling | GitHub |
No modules found.
Configuration¶
hooks:
- module: hooks-logging
config:
level: info
output: ~/.amplifier/logs/
- module: hooks-approval
config:
require_approval_for:
- tool-bash
- tool-filesystem:write
Hook Actions¶
| Action | Effect |
|---|---|
continue | Proceed normally |
deny | Block operation |
modify | Transform data |
inject_context | Add to conversation |
ask_user | Request approval |
Contract¶
See Hook Contract for implementation details.