Files
hermes-agent/tools
Alexander Whitestone 5eef3fed1a
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 1m10s
feat: warm session provisioning — pre-proficient agent sessions (#327)
Marathon sessions (100+ msgs) have lower per-tool error rates than
mid-length sessions. This implements warm session provisioning to
pre-seed new sessions with successful tool-call patterns.

agent/warm_session.py:
  - WarmSessionTemplate dataclass with ToolCallExample entries
  - extract_successful_patterns() mines SessionDB for marathon sessions
  - build_warm_conversation() converts templates into conversation_history
  - save/load/list templates persisted to ~/.hermes/warm_sessions/

tools/warm_session_tool.py:
  - warm_session tool with build/list/load/delete actions
  - Registered in the skills toolset

Usage:
  Agent calls warm_session(action='build', name='general') to mine patterns
  from existing marathon sessions. Then new sessions can start with the
  warm conversation_history injected via run_conversation().

Integration:
  No changes to run_agent.py needed — the existing conversation_history
  parameter already handles this. The warm tool builds the history,
  caller injects it.

21 tests added, all passing.

Closes #327
2026-04-13 18:48:37 -04:00
..