Summary
Add a first-class reasoning_effort tool so Hermes agents can adjust their own reasoning effort on the fly during a session instead of relying on user-only slash commands like /reasoning.
Problem
Hermes already supports reasoning effort through config and chat commands:
agent.reasoning_effort in config
/reasoning ... in CLI and gateway chats
But agents cannot reliably use those as structured state transitions.
Today, if an agent realizes a task just became much harder or much simpler, it cannot cleanly say:
- lower reasoning for rote follow-through
- raise reasoning for debugging / cross-file synthesis / hard planning
- persist the new default only when the user explicitly wants that
Trying to fake /reasoning low in chat is brittle and not a real tool interaction.
Proposed change
Add a tool with this shape:
{
"name": "reasoning_effort",
"parameters": {
"level": "none|minimal|low|medium|high|xhigh",
"persist": false
}
}
Behavior
- updates the active
AIAgent.reasoning_config for subsequent model calls
- optionally persists through the platform layer when
persist=true
- returns structured JSON describing the new state
Important implementation detail
This should not be treated as a plain registry-only tool.
Like clarify and delegate_task, it needs access to live AIAgent state and optional platform callbacks. In practice that means:
- normal registry-backed schema in
tools/reasoning_effort_tool.py
- discovery import in
model_tools.py
- exposure via
toolsets.py
- agent-loop interception in
run_agent.py so it can mutate self.reasoning_config
- optional persistence callback injected from CLI / gateway instead of importing platform config logic directly into
run_agent.py
Why this is useful
This lets agents adapt reasoning cost and depth to the actual work:
low / minimal for simple lookups, formatting, rote edits, narrow reads
medium for default non-trivial work
high / xhigh for ambiguous debugging, hard planning, cross-file reasoning, tradeoff analysis
That makes Hermes more efficient and more agentic.
Docs / prompting follow-up
If added, Hermes should also include tool-aware prompt guidance telling agents when to use the tool effectively and when not to thrash it.
Testing
Suggested coverage:
- tool registration + discovery
- agent-loop interception
- updates to
AIAgent.reasoning_config
none disables reasoning
- invalid level returns JSON error
- persistence callback path
- CLI/gateway regressions
Extra note
The current docs imply adding a tool is a 3-file change, but stateful tools like this end up needing a 4th integration point in run_agent.py. It may be worth clarifying that in the developer docs too.
Summary
Add a first-class
reasoning_efforttool so Hermes agents can adjust their own reasoning effort on the fly during a session instead of relying on user-only slash commands like/reasoning.Problem
Hermes already supports reasoning effort through config and chat commands:
agent.reasoning_effortin config/reasoning ...in CLI and gateway chatsBut agents cannot reliably use those as structured state transitions.
Today, if an agent realizes a task just became much harder or much simpler, it cannot cleanly say:
Trying to fake
/reasoning lowin chat is brittle and not a real tool interaction.Proposed change
Add a tool with this shape:
{ "name": "reasoning_effort", "parameters": { "level": "none|minimal|low|medium|high|xhigh", "persist": false } }Behavior
AIAgent.reasoning_configfor subsequent model callspersist=trueImportant implementation detail
This should not be treated as a plain registry-only tool.
Like
clarifyanddelegate_task, it needs access to liveAIAgentstate and optional platform callbacks. In practice that means:tools/reasoning_effort_tool.pymodel_tools.pytoolsets.pyrun_agent.pyso it can mutateself.reasoning_configrun_agent.pyWhy this is useful
This lets agents adapt reasoning cost and depth to the actual work:
low/minimalfor simple lookups, formatting, rote edits, narrow readsmediumfor default non-trivial workhigh/xhighfor ambiguous debugging, hard planning, cross-file reasoning, tradeoff analysisThat makes Hermes more efficient and more agentic.
Docs / prompting follow-up
If added, Hermes should also include tool-aware prompt guidance telling agents when to use the tool effectively and when not to thrash it.
Testing
Suggested coverage:
AIAgent.reasoning_confignonedisables reasoningExtra note
The current docs imply adding a tool is a 3-file change, but stateful tools like this end up needing a 4th integration point in
run_agent.py. It may be worth clarifying that in the developer docs too.