hooks
agenticflow-enterprise hooks
Manage agent hooks (event-driven automations for commands like /new, /reset, and gateway startup).
Related:
List All Hooks
agenticflow-enterprise hooks listList all discovered hooks from workspace, managed, and bundled directories.
Options:
--eligible: Show only eligible hooks (requirements met)--json: Output as JSON-v, --verbose: Show detailed information including missing requirements
Example output:
Hooks (4/4 ready)
Ready: π boot-md β - Run BOOT.md on gateway startup π command-logger β - Log all command events to a centralized audit file πΎ session-memory β - Save session context to memory when /new command is issued π soul-evil β - Swap injected SOUL content during a purge window or by random chanceExample (verbose):
agenticflow-enterprise hooks list --verboseShows missing requirements for ineligible hooks.
Example (JSON):
agenticflow-enterprise hooks list --jsonReturns structured JSON for programmatic use.
Get Hook Information
agenticflow-enterprise hooks info <name>Show detailed information about a specific hook.
Arguments:
<name>: Hook name (e.g.,session-memory)
Options:
--json: Output as JSON
Example:
agenticflow-enterprise hooks info session-memoryOutput:
πΎ session-memory β Ready
Save session context to memory when /new command is issued
Details: Source: agenticflow-enterprise-bundled Path: /path/to/agenticflow-enterprise/hooks/bundled/session-memory/HOOK.md Handler: /path/to/agenticflow-enterprise/hooks/bundled/session-memory/handler.ts Homepage: https://docs.agenticflow-enterprise.ai/hooks#session-memory Events: command:new
Requirements: Config: β workspace.dirCheck Hooks Eligibility
agenticflow-enterprise hooks checkShow summary of hook eligibility status (how many are ready vs. not ready).
Options:
--json: Output as JSON
Example output:
Hooks Status
Total hooks: 4Ready: 4Not ready: 0Enable a Hook
agenticflow-enterprise hooks enable <name>Enable a specific hook by adding it to your config (~/.agenticflow-enterprise/config.json).
Note: Hooks managed by plugins show plugin:<id> in agenticflow-enterprise hooks list and
canβt be enabled/disabled here. Enable/disable the plugin instead.
Arguments:
<name>: Hook name (e.g.,session-memory)
Example:
agenticflow-enterprise hooks enable session-memoryOutput:
β Enabled hook: πΎ session-memoryWhat it does:
- Checks if hook exists and is eligible
- Updates
hooks.internal.entries.<name>.enabled = truein your config - Saves config to disk
After enabling:
- Restart the gateway so hooks reload (menu bar app restart on macOS, or restart your gateway process in dev).
Disable a Hook
agenticflow-enterprise hooks disable <name>Disable a specific hook by updating your config.
Arguments:
<name>: Hook name (e.g.,command-logger)
Example:
agenticflow-enterprise hooks disable command-loggerOutput:
βΈ Disabled hook: π command-loggerAfter disabling:
- Restart the gateway so hooks reload
Install Hooks
agenticflow-enterprise hooks install <path-or-spec>Install a hook pack from a local folder/archive or npm.
What it does:
- Copies the hook pack into
~/.agenticflow-enterprise/hooks/<id> - Enables the installed hooks in
hooks.internal.entries.* - Records the install under
hooks.internal.installs
Options:
-l, --link: Link a local directory instead of copying (adds it tohooks.internal.load.extraDirs)
Supported archives: .zip, .tgz, .tar.gz, .tar
Examples:
# Local directoryagenticflow-enterprise hooks install ./my-hook-pack
# Local archiveagenticflow-enterprise hooks install ./my-hook-pack.zip
# NPM packageagenticflow-enterprise hooks install @agenticflow-enterprise/my-hook-pack
# Link a local directory without copyingagenticflow-enterprise hooks install -l ./my-hook-packUpdate Hooks
agenticflow-enterprise hooks update <id>agenticflow-enterprise hooks update --allUpdate installed hook packs (npm installs only).
Options:
--all: Update all tracked hook packs--dry-run: Show what would change without writing
Bundled Hooks
session-memory
Saves session context to memory when you issue /new.
Enable:
agenticflow-enterprise hooks enable session-memoryOutput: ~/.agenticflow-enterprise/workspace/memory/YYYY-MM-DD-slug.md
See: session-memory documentation
command-logger
Logs all command events to a centralized audit file.
Enable:
agenticflow-enterprise hooks enable command-loggerOutput: ~/.agenticflow-enterprise/logs/commands.log
View logs:
# Recent commandstail -n 20 ~/.agenticflow-enterprise/logs/commands.log
# Pretty-printcat ~/.agenticflow-enterprise/logs/commands.log | jq .
# Filter by actiongrep '"action":"new"' ~/.agenticflow-enterprise/logs/commands.log | jq .See: command-logger documentation
soul-evil
Swaps injected SOUL.md content with SOUL_EVIL.md during a purge window or by random chance.
Enable:
agenticflow-enterprise hooks enable soul-evilSee: SOUL Evil Hook
boot-md
Runs BOOT.md when the gateway starts (after channels start).
Events: gateway:startup
Enable:
agenticflow-enterprise hooks enable boot-md