mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 03:39:54 +00:00
7d628eaa3d
Add mode parameter to session_search tool supporting two modes:
- fast (default): returns FTS5 snippets + context immediately (~0.02s),
no LLM call — ideal for quick recall lookups
- summary: preserves original behavior with LLM-generated session
summaries (~10-30s) — use when fast mode is insufficient
Changes:
- tools/session_search_tool.py: implement fast mode path that returns
FTS hits with snippets/context without calling auxiliary model;
add mode parameter to schema (enum: fast|summary); apply parent
session source/metadata resolution in fast mode (same pattern
as upstream fix 6b4ccb9b1 in summary mode)
- run_agent.py: pass mode argument from function_args in two call sites
(direct tool call + subagent path)
- tests/tools/test_session_search.py: add test coverage for fast mode
output format, summary mode preservation, backwards compatibility,
and run_agent.py mode forwarding verification
The tool schema description is updated to recommend fast-first usage.