Hooks run shell commands automatically before or after agent events. Place YAML hook files in ~/.openaf-mini-a/hooks/.

Supported events: before_goal · after_goal · before_tool · after_tool · before_shell · after_shell

# Load extra hook directories
mini-a extrahooks=/path/to/team-hooks,/path/to/project-hooks

Available environment variables inside hook commands:

Variable Set during
$MINI_A_GOAL before_goal, after_goal
$MINI_A_RESPONSE after_goal
$MINI_A_TOOL_NAME before_tool, after_tool
$MINI_A_TOKENS_IN after_tool
$MINI_A_TOKENS_OUT after_tool
$MINI_A_SHELL_COMMAND before_shell, after_shell