OpenBMB/ChatDev · error · ConfigError

memory store requires config block

Error message

memory store requires config block

What it means

MemoryStoreConfig.from_dict requires every memory store entry to carry a non-null 'config' block, because each store type needs its type-specific payload (connection settings, paths, etc.). If 'config' is absent or explicitly null, this ConfigError is raised with the path pointing at 'config'.

Source

Thrown at entity/configs/node/memory.py:368

@dataclass
class MemoryStoreConfig(BaseConfig):
    name: str
    type: str
    config: BaseConfig | None = None

    @classmethod
    def from_dict(cls, data: Mapping[str, Any], *, path: str) -> "MemoryStoreConfig":
        mapping = require_mapping(data, path)
        name = require_str(mapping, "name", path)
        store_type = require_str(mapping, "type", path)
        try:
            schema = get_memory_store_schema(store_type)
        except SchemaLookupError as exc:
            raise ConfigError(f"unsupported memory store type '{store_type}'", extend_path(path, "type")) from exc

        if "config" not in mapping or mapping["config"] is None:
            raise ConfigError("memory store requires config block", extend_path(path, "config"))

        config_obj = schema.config_cls.from_dict(mapping["config"], path=extend_path(path, "config"))
        return cls(name=name, type=store_type, config=config_obj, path=path)

    def require_payload(self) -> BaseConfig:
        if not self.config:
            raise ConfigError("memory store payload missing", extend_path(self.path, "config"))
        return self.config

    FIELD_SPECS = {
        "name": ConfigFieldSpec(
            name="name",
            display_name="Store Name",
            type_hint="str",
            required=True,
            description="Unique name of the memory store",
        ),
        "type": ConfigFieldSpec(

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Add a 'config' mapping under the store entry, e.g. config: {} if the store truly needs no options
  2. Copy a working example config for the store type from the docs/tests and fill in required fields
  3. Validate config files with a schema/tool before passing them to from_dict

Example fix

# before
store:
  name: my_store
  type: redis
# after
store:
  name: my_store
  type: redis
  config:
    url: redis://localhost:6379
Defensive patterns

Strategy: validation

Validate before calling

if not isinstance(store.get('config'), dict):
    raise ValueError('memory store config block required')

Try / catch

try:
    MemoryStoreConfig.from_dict(data, path='store')
except ConfigError as e:
    if 'requires config block' in str(e):
        data['store']['config'] = data['store'].get('config') or {}
        MemoryStoreConfig.from_dict(data, path='store')

Prevention

When it happens

Trigger: Parsing a memory store mapping that omits the 'config' key or sets it to null, e.g. {'name': 's', 'type': 'redis'} with no nested config object.

Common situations: Hand-written YAML where the config block is forgotten or left empty as a placeholder; migrations that strip empty blocks; misunderstanding that some stores need no configuration (they still require an empty mapping at minimum).

Related errors


AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27). Data as JSON: /api/errors/267caf75c966c28c. Report an issue: GitHub.