mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-22 16:25:58 +00:00
fix(agent): create built-in memory store when memory toolset is enabled despite skip_memory (#65429)
skip_memory=True was meant to skip the external memory *provider* for flush/ background agents, but it also suppressed creation of the built-in file-backed MemoryStore. When a caller still enables the "memory" toolset, the memory tool dispatched with store=None and every call failed with "Memory is not available", silently losing the main automatic memory-capture path. Now the built-in store is created whenever memory is enabled in config OR the memory toolset is explicitly enabled, while the external-provider block stays gated on skip_memory (preserving flush-agent intent).
This commit is contained in:
parent
9bb253d4fa
commit
596dda907f
1 changed files with 8 additions and 1 deletions
|
|
@ -1561,7 +1561,14 @@ def init_agent(
|
|||
agent._memory_nudge_interval = 10
|
||||
agent._turns_since_memory = 0
|
||||
agent._iters_since_skill = 0
|
||||
if not skip_memory:
|
||||
# A flush/background agent may pass skip_memory=True to avoid spinning up an
|
||||
# external memory *provider*, but if the caller also explicitly enables the
|
||||
# "memory" toolset it still needs the built-in file-backed store — otherwise
|
||||
# the memory tool dispatches with store=None and every call fails (#65429).
|
||||
# So the built-in store is created unless memory is globally disabled, while
|
||||
# the external-provider block below stays gated on skip_memory.
|
||||
_memory_toolset_requested = "memory" in (agent.enabled_toolsets or [])
|
||||
if not skip_memory or _memory_toolset_requested:
|
||||
try:
|
||||
mem_config = _agent_cfg.get("memory", {})
|
||||
agent._memory_enabled = mem_config.get("memory_enabled", False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue