OpenBMB/ChatDev · error · RegistryError
Memory store '{name}' already registered
Error message
Memory store '{name}' already registered What it means
The memory store registry refuses duplicate names. register_memory_store raises RegistryError if the name already exists in memory_store_registry, keeping one factory per store type.
Source
Thrown at runtime/node/agent/memory/registry.py:38
summary: str | None = None
def _ensure_builtins_loaded() -> None:
global _BUILTINS_LOADED
if not _BUILTINS_LOADED:
import_module("runtime.node.agent.memory.builtin_stores")
_BUILTINS_LOADED = True
def register_memory_store(
name: str,
*,
config_cls: Type[Any],
factory: Callable[["MemoryStoreConfig"], "MemoryBase"],
summary: str | None = None,
) -> None:
if name in memory_store_registry.names():
raise RegistryError(f"Memory store '{name}' already registered")
entry = MemoryStoreRegistration(name=name, config_cls=config_cls, factory=factory, summary=summary)
memory_store_registry.register(name, target=entry)
register_memory_store_schema(name, config_cls=config_cls, summary=summary)
def get_memory_store_registration(name: str) -> MemoryStoreRegistration:
_ensure_builtins_loaded()
entry: RegistryEntry = memory_store_registry.get(name)
registration = entry.load()
if not isinstance(registration, MemoryStoreRegistration):
raise RegistryError(f"Entry '{name}' is not a MemoryStoreRegistration")
return registration
def iter_memory_store_registrations() -> Dict[str, MemoryStoreRegistration]:
_ensure_builtins_loaded()
return {name: entry.load() for name, entry in memory_store_registry.items()}
View on GitHub (pinned to 4fb2db0ea9)
Solutions
- Namespace custom store names (e.g. 'myorg.vector_store')
- Guard with `if name not in iter_memory_store_registrations(): ...`
- Fix duplicate imports of the registering module
Example fix
# before
register_memory_store('file', config_cls=C, factory=f)
# after
if 'file' not in iter_memory_store_registrations():
register_memory_store('file', config_cls=C, factory=f) Defensive patterns
Strategy: validation
Validate before calling
from runtime.node.agent.memory.registry import iter_memory_store_registrations
if 'mystore' not in iter_memory_store_registrations():
register_memory_store('mystore', config_cls=C, factory=f) Prevention
- Namespace custom store names
- Make registration idempotent
When it happens
Trigger: Calling register_memory_store('file', ...) when 'file' is already a builtin, or a plugin registering a name another plugin took; also double module import.
Common situations: Custom plugins with generic names ('file', 'simple', 'blackboard') colliding with builtins; notebook re-runs; module imported under two paths.
Related errors
- Edge condition type '{name}' already registered
- Edge processor type '{name}' already registered
- Entry '{name}' is not a BaseConfig subclass
- Entry '{name}' is not an EdgeConditionRegistration
- Entry '{name}' is not an EdgeProcessorRegistration
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/ff93dc700a9ca89c.
Report an issue: GitHub.