hermes-agent/website/docs/guides
Teknium eab208db70
feat(hooks): spill oversized hook-injected context to disk (#20468)
Port from openai/codex#21069 ("Spill large hook outputs from context").

Both shell hooks and Python plugins can return {"context": "..."} from
pre_llm_call, which gets appended to the current turn's user message on
every subsequent API call. A plugin that emits a large blob inflates
every turn and blows out the prompt cache prefix.

- tools/hook_output_spill.py: shared helper that writes oversized
  context to $HERMES_HOME/hook_outputs/<session_id>/<uuid>.txt and
  returns a head/tail preview plus the saved path. Never raises.
- agent/turn_context.py: apply the cap at the pre_llm_call aggregation
  site (moved here from run_agent.py since the original PR), covering
  both Python plugins and shell hooks.
- agent/shell_hooks.py: reserve output_spill as a sub-key under hooks:
  so the config block doesn't emit unknown-hook-event warnings.
- Docs: document the cap + config in build-a-hermes-plugin.md.

Config (behaviour-preserving when absent):
  hooks.output_spill: enabled/max_chars/preview_head/preview_tail/directory

Tests: 14 unit tests; shell_hooks (56) and plugins (100) suites green.
E2E validated with isolated HERMES_HOME (spill, passthrough, traversal
sanitisation, reserved-key skip).
2026-07-05 13:51:26 -07:00
..
_category_.json docs: add Guides & Tutorials section, restructure sidebar 2026-03-08 19:37:34 -07:00
automate-with-cron.md docs(gateway): document exact silence tokens (#46105) 2026-06-14 04:37:18 -07:00
automation-blueprints.md docs: finish Automation Blueprints terminology rebrand (#44470) 2026-06-11 17:22:22 -04:00
aws-bedrock.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
azure-foundry.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
build-a-hermes-plugin.md feat(hooks): spill oversized hook-injected context to disk (#20468) 2026-07-05 13:51:26 -07:00
cron-script-only.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
cron-troubleshooting.md docs(gateway): document exact silence tokens (#46105) 2026-06-14 04:37:18 -07:00
daily-briefing-bot.md docs: 30-day overhaul — correctness audit, PR coverage, Nous Portal weave, sidebar reorg (#33782) 2026-05-28 02:41:36 -07:00
delegation-patterns.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
github-pr-review-agent.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
google-gemini.md feat(providers): remove google-gemini-cli + google-antigravity OAuth providers (#50492) 2026-06-21 19:53:27 -07:00
google-vertex.md feat(vertex): add Google Vertex AI provider for Gemini (OAuth2) 2026-07-01 05:25:33 -07:00
local-llm-on-mac.md fix(context): align guidance with 64k minimum 2026-05-24 23:23:12 -07:00
local-ollama-setup.md fix(context): align guidance with 64k minimum 2026-05-24 23:23:12 -07:00
microsoft-graph-app-registration.md docs(msgraph): add Azure app registration walkthrough + env var reference 2026-05-08 09:27:26 -07:00
migrate-from-openclaw.md docs: replace invalid 'hermes config get <key>' with 'hermes config show' 2026-05-29 12:06:22 -07:00
minimax-oauth.md docs: sync documentation with current implementation 2026-06-20 23:23:47 -07:00
oauth-over-ssh.md feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
operate-teams-meeting-pipeline.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
pipe-script-output.md docs: reconcile docs with code across last 3 releases (#54254) 2026-06-28 12:47:50 -07:00
python-library.md docs: 30-day overhaul — correctness audit, PR coverage, Nous Portal weave, sidebar reorg (#33782) 2026-05-28 02:41:36 -07:00
run-hermes-with-nous-portal.md feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
run-nemotron-3-ultra-free.md feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00
team-telegram-assistant.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
tips.md docs: warn that mid-session model switches break prompt caching (#58747) 2026-07-05 04:34:05 -07:00
use-mcp-with-hermes.md docs: add Open Scaffold MCP workflow 2026-06-20 20:42:49 -07:00
use-soul-with-hermes.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
use-voice-mode-with-hermes.md docs: stop recommending pip install; curl installer is the only supported path (#51743) 2026-06-24 00:14:32 -07:00
webhook-github-pr-review.md fix(website): cross-locale doc links + drop empty ko locale (#31895) 2026-05-24 23:16:20 -07:00
work-with-skills.md docs: replace invalid 'hermes config get <key>' with 'hermes config show' 2026-05-29 12:06:22 -07:00
xai-grok-oauth.md feat(auth): make xAI Grok OAuth device-code-only, drop loopback login 2026-07-02 13:17:41 -07:00