Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,14 +1112,21 @@ def __init__(
self._memory_manager = None

# Inject memory provider tool schemas into the tool surface
if self._memory_manager and self.tools is not None:
# Respect both enabled and disabled toolsets configurations

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not carry this direct membership check into the current helper unchanged: current main supports composite toolsets through memory_provider_tools_enabled() (agent/memory_manager.py:91-94), and tests/agent/test_memory_provider.py:1363-1368 verifies that hermes-acp exposes provider memory tools. Preserve that resolver and add the disabled-toolset check separately.

_memory_allowed = True
if self.enabled_toolsets is not None and "memory" not in self.enabled_toolsets:
_memory_allowed = False
if self.disabled_toolsets is not None and "memory" in self.disabled_toolsets:
_memory_allowed = False

if self._memory_manager and self.tools is not None and _memory_allowed:
for _schema in self._memory_manager.get_all_tool_schemas():
_wrapped = {"type": "function", "function": _schema}
self.tools.append(_wrapped)
_tname = _schema.get("name", "")
if _tname:
self.valid_tool_names.add(_tname)

# Skills config: nudge interval for skill creation reminders
self._skill_nudge_interval = 10
try:
Expand Down