mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
feat: built-in boot-md hook — run BOOT.md on gateway startup (#3733)
The gateway now ships with a built-in boot-md hook that checks for ~/.hermes/BOOT.md on every startup. If the file exists, the agent executes its instructions in a background thread. No installation or configuration needed — just create the file. No BOOT.md = zero overhead (the hook silently returns). Implementation: - gateway/builtin_hooks/boot_md.py: handler with boot prompt, background thread, [SILENT] suppression, error handling - gateway/hooks.py: _register_builtin_hooks() called at the start of discover_and_load() to wire in built-in hooks - Docs updated: hooks page documents BOOT.md as a built-in feature
This commit is contained in:
parent
811adca277
commit
95f99ea4b9
4 changed files with 126 additions and 0 deletions
|
|
@ -88,6 +88,26 @@ Handlers registered for `command:*` fire for any `command:` event (`command:mode
|
|||
|
||||
### Examples
|
||||
|
||||
#### Boot Checklist (BOOT.md) — Built-in
|
||||
|
||||
The gateway ships with a built-in `boot-md` hook that looks for `~/.hermes/BOOT.md` on every startup. If the file exists, the agent runs its instructions in a background session. No installation needed — just create the file.
|
||||
|
||||
**Create `~/.hermes/BOOT.md`:**
|
||||
|
||||
```markdown
|
||||
# Startup Checklist
|
||||
|
||||
1. Check if any cron jobs failed overnight — run `hermes cron list`
|
||||
2. Send a message to Discord #general saying "Gateway restarted, all systems go"
|
||||
3. Check if /opt/app/deploy.log has any errors from the last 24 hours
|
||||
```
|
||||
|
||||
The agent runs these instructions in a background thread so it doesn't block gateway startup. If nothing needs attention, the agent replies with `[SILENT]` and no message is delivered.
|
||||
|
||||
:::tip
|
||||
No BOOT.md? The hook silently skips — zero overhead. Create the file whenever you need startup automation, delete it when you don't.
|
||||
:::
|
||||
|
||||
#### Telegram Alert on Long Tasks
|
||||
|
||||
Send yourself a message when the agent takes more than 10 steps:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue