(toolsets) narrow core tool surface to essential narrow waist - #45847
Draft
svemyh wants to merge 1 commit into
Draft
(toolsets) narrow core tool surface to essential narrow waist#45847svemyh wants to merge 1 commit into
svemyh wants to merge 1 commit into
Conversation
teknium1
reviewed
Jul 14, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the focused narrow-waist proposal. The current patch has one compatibility regression that needs resolution before it can be safely salvaged.
Problems
- Removing the
ha_*entries breaks the existingHASS_TOKENauto-enable path.hermes_cli/tools_config.py:1723-1740derives enabled toolsets from static membership in the platform composite; after this deletion it cannot inferhomeassistant. The laterHASS_TOKENhandling athermes_cli/tools_config.py:1767-1775only removeshomeassistantfrom the default-off set and does not add it. - The claim that all removed tools reach every model call is broader than the runtime behavior.
model_tools.py:444-451filters throughcheck_fn; HA, Kanban, and computer-use have runtime gates (tools/homeassistant_tool.py:344-346,tools/kanban_tools.py:65-93,tools/computer_use/tool.py:899-912).
Suggested changes
- Preserve and test the
HASS_TOKENresolver contract when moving HA out of the core composite. - Add behavioral tests for each removed tool's activation path;
tests/test_toolsets.py:214-230currently tests only structural shared-core membership.
Automated hermes-sweeper review.
| # Cross-platform messaging (gated on gateway running via check_fn) | ||
| "send_message", | ||
| # Home Assistant smart home control (gated on HASS_TOKEN via check_fn) | ||
| "ha_list_entities", "ha_get_state", "ha_list_services", "ha_call_service", |
Contributor
There was a problem hiding this comment.
Removing these entries breaks the current HASS_TOKEN auto-enable path: _get_platform_tools() infers homeassistant only when its static tools are a subset of the platform composite (hermes_cli/tools_config.py:1723-1740). The later HASS_TOKEN branch only removes homeassistant from default_off; it does not add the toolset. Please preserve that resolver behavior and cover it with a test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR narrows the default tool surface of Hermes Agent (
_HERMES_CORE_TOOLSintoolsets.py) to align with the design philosophy explicitly stated inAGENTS.md:The Problem
Currently, 41 tools are included in the default
_HERMES_CORE_TOOLSlist which is loaded on almost every single conversation turn (CLI, TUI, messaging platforms like Telegram, Discord, Slack, etc.). This includes highly specific or specialized capabilities like:Since these tools are sent to the LLM on every single conversation turn, they significantly bloat the model's schema context, break prompt-caching efficiencies, increase latency, and add unnecessary token expenses for routine operations.
The Solution: An Elegant Cut-Down
This PR prunes the non-essential/specialized tools from
_HERMES_CORE_TOOLSto retain only the foundational core (26 tools):read_file,write_file,patch,search_filesterminal,process,execute_code,delegate_taskmemory,todo,session_searchweb_search,web_extract,browser_*clarify,send_message,cronjobMoving Capabilities to the Edges (Plugins & Gated Toolsets)
The pruned tools are not lost or deleted! They are already fully defined and easily enabled as specialized/service-gated toolsets:
homeassistanttoolset (exposed only whenHASS_TOKENis configured or explicitly requested).kanbantoolset (only active when the profile is spawned as a worker or explicitly enabled).computer_usetoolset.ttstoolset or as a future CLI command.Verification
All tests in
tests/test_toolsets.pypass perfectly, ensuring that the platform consistency invariant (TestToolsetConsistency.test_hermes_platforms_share_core_tools) is maintained and the shared core remains robust (>20 tools).