bytedance/deer-flow · warning · NotImplementedError
reload_memory not supported by {type(self).__name__}
Error message
reload_memory not supported by {type(self).__name__} What it means
MemoryManager.reload_memory raises NotImplementedError as the base-class default for backends without a cached memory document. The method's contract is 'drop the cached document and reload from storage', which only makes sense for backends that cache (DeerMem overrides it); remote backends have no local cache to invalidate, so they inherit the raising default. The docstring notes callers are expected to fall back to get_memory() when the backend does not support reload.
Source
Thrown at backend/packages/harness/deerflow/agents/memory/manager.py:395
* ``None`` -- this backend has nothing to warm (the default). The
host logs a "skipping" message instead of the misleading "warmed
successfully", so a non-DeerMem backend doesn't claim a tiktoken
cache it never touched.
Backends with heavy one-time init override and return ``True``/``False``.
"""
return None
def reload_memory(
self,
*,
user_id: str | None = None,
agent_name: str | None = None,
) -> dict[str, Any]:
"""Drop the cached memory document and reload from storage. Default:
unsupported (callers fall back to :meth:`get_memory`). Backends with a
cache override."""
raise NotImplementedError(f"reload_memory not supported by {type(self).__name__}")
def create_fact(
self,
content: str,
category: str = "context",
confidence: float = 0.5,
*,
agent_name: str | None = None,
user_id: str | None = None,
) -> tuple[dict[str, Any], str | None]:
"""Manually add one fact. Returns ``(memory_data, fact_id)`` -- ``fact_id``
is None when a storage cap evicted the just-added fact. Default: unsupported."""
raise NotImplementedError(f"create_fact not supported by {type(self).__name__}")
def delete_fact(
self,
fact_id: str,
*,View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Call get_memory() instead — the documented fallback for backends without reload support; it returns the current view without a cache drop.
- If you need true reload semantics (out-of-band file edits), run the deermem backend (memory.manager_class: deermem).
- Backend authors: override reload_memory() on the MemoryManager subclass when your backend caches documents.
- API/tooling authors: catch NotImplementedError on reload and degrade to get_memory() rather than surfacing a 500.
Example fix
# before
memory = client.reload_memory() # or manager.reload_memory(user_id="u1")
# after
try:
memory = manager.reload_memory(user_id="u1")
except NotImplementedError:
memory = manager.get_memory(user_id="u1") # documented fallback Defensive patterns
Strategy: fallback
Validate before calling
from deerflow.agents.memory.manager import MemoryManager
if type(manager).reload_memory is MemoryManager.reload_memory:
memory = manager.get_memory(user_id=uid) # documented fallback path
else:
memory = manager.reload_memory(user_id=uid) Type guard
def supports_reload(manager: MemoryManager) -> bool:
"""True when the backend has a cache and overrides reload_memory."""
return type(manager).reload_memory is not MemoryManager.reload_memory Try / catch
try:
memory = manager.reload_memory(user_id=uid)
except NotImplementedError:
memory = manager.get_memory(user_id=uid) # callers fall back per the contract docstring Prevention
- Treat reload as an optimization (cache invalidation), never a correctness requirement — always have get_memory as the fallback.
- Only expose 'force reload' UI affordances when supports_reload() is true.
- For out-of-band edits to DeerMem fact files, prefer stopping writes and using reload on the backend that supports it.
When it happens
Trigger: Invoking MemoryManager.reload_memory(user_id=..., agent_name=...) — e.g. POST /api/memory/reload, DeerFlowClient.reload_memory(), or a direct call — while the configured backend does not override it (noop, mem0, honcho, openviking). Out-of-band edits to DeerMem's Markdown fact files require reload(), which is why this path exists at all.
Common situations: POST /api/memory/reload after switching memory.manager_class to honcho or mem0 in config.yaml; calling DeerFlowClient.reload_memory() in an embedded integration against a non-DeerMem backend; test suites exercising the reload route against the noop backend.
Related errors
- import_memory not supported by {type(self).__name__}
- create_fact not supported by {type(self).__name__}
- delete_fact not supported by {type(self).__name__}
- update_fact not supported by {type(self).__name__}
- search not supported by {type(self).__name__}
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/278afbae4d3aa715.
Report an issue: GitHub.