fix(run_agent): guard memory provider init against empty/whitespace string

Original commit 8d756a421 by austrian_guy targeted __init__ in
pre-refactor run_agent.py. The body now lives in
agent/agent_init.init_agent — re-applied there.

Co-authored-by: austrian_guy <33156212+ether-btc@users.noreply.github.com>
This commit is contained in:
teknium1 2026-05-16 23:43:09 -07:00
parent 4ece521bcf
commit 36ad8336f9
No known key found for this signature in database

View file

@ -960,7 +960,7 @@ def init_agent(
try:
_mem_provider_name = mem_config.get("provider", "") if mem_config else ""
if _mem_provider_name:
if _mem_provider_name and _mem_provider_name.strip():
from agent.memory_manager import MemoryManager as _MemoryManager
from plugins.memory import load_memory_provider as _load_mem
agent._memory_manager = _MemoryManager()