OpenBMB/ChatDev · error · ValueError

SimpleMemory requires a simple memory store configuration

Error message

SimpleMemory requires a simple memory store configuration

What it means

SimpleMemory requires the store config to include a SimpleMemoryConfig section. A None result from store.as_config(SimpleMemoryConfig) means the MemoryStoreConfig is for another backend type.

Source

Thrown at runtime/node/agent/memory/simple_memory.py:26

from entity.configs import MemoryStoreConfig
from entity.configs.node.memory import SimpleMemoryConfig
from runtime.node.agent.memory.memory_base import (
    MemoryBase,
    MemoryContentSnapshot,
    MemoryItem,
    MemoryWritePayload,
)
import faiss
import numpy as np

logger = logging.getLogger(__name__)

class SimpleMemory(MemoryBase):
    def __init__(self, store: MemoryStoreConfig):
        config = store.as_config(SimpleMemoryConfig)
        if not config:
            raise ValueError("SimpleMemory requires a simple memory store configuration")
        super().__init__(store)
        self.config = config
        # Optimized prompt templates for clarity
        self.retrieve_prompt = "Query: {input}"
        self.update_prompt = "Input: {input}\nOutput: {output}"
        self.memory_path = self.config.memory_path  # auto
        
        # Content extraction configuration
        self.max_content_length = 500  # Maximum content length
        self.min_content_length = 20   # Minimum content length
        
    def _extract_key_content(self, content: str) -> str:
        """Extract key content while stripping redundant text."""
        # Remove redundant whitespace
        content = re.sub(r'\s+', ' ', content.strip())
        
        # Skip heavy processing for short snippets
        if len(content) <= 100:

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Set the memory store type to 'simple' in the config
  2. Use create_memory(store) so the class follows the config type
  3. Check for typos/case in the type field

Example fix

# before
store = MemoryStoreConfig(type='file', ...)
mem = SimpleMemory(store)

# after
store = MemoryStoreConfig(type='simple', ...)
mem = SimpleMemory(store)
Defensive patterns

Strategy: validation

Validate before calling

cfg = store.as_config(SimpleMemoryConfig)
if cfg is None:
    raise ConfigError('store type must be simple for SimpleMemory')
mem = SimpleMemory(store)

Prevention

When it happens

Trigger: Constructing SimpleMemory with a store whose type is not 'simple' (e.g. 'blackboard' or 'file'); usually a mismatch between the config type string and the class being built.

Common situations: YAML memory.type typos; reusing configs across templates; direct instantiation instead of create_memory dispatch.

Related errors


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