{"record":{"id":"49cdcf60f6d6e1de","repo":"OpenBMB/ChatDev","slug":"blackboardmemory-requires-a-blackboard-memory-stor","errorCode":null,"errorMessage":"BlackboardMemory requires a blackboard memory store configuration","messagePattern":"BlackboardMemory requires a blackboard memory store configuration","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"runtime/node/agent/memory/blackboard_memory.py","lineNumber":25,"sourceCode":"from typing import List\n\nfrom entity.configs import MemoryStoreConfig\nfrom entity.configs.node.memory import BlackboardMemoryConfig\nfrom runtime.node.agent.memory.memory_base import (\n    MemoryBase,\n    MemoryContentSnapshot,\n    MemoryItem,\n    MemoryWritePayload,\n)\n\n\nclass BlackboardMemory(MemoryBase):\n    \"\"\"Simple append-only memory: save raw outputs, retrieve by recency.\"\"\"\n\n    def __init__(self, store: MemoryStoreConfig):\n        config = store.as_config(BlackboardMemoryConfig)\n        if not config:\n            raise ValueError(\"BlackboardMemory requires a blackboard memory store configuration\")\n        super().__init__(store)\n        self.config = config\n        self.memory_path = config.memory_path\n        self.max_items = config.max_items\n\n    # -------- Persistence --------\n    def load(self) -> None:\n        if not self.memory_path or not os.path.exists(self.memory_path):\n            self.contents = []\n            return\n\n        try:\n            with open(self.memory_path, \"r\", encoding=\"utf-8\") as file:\n                data = json.load(file)\n            contents: List[MemoryItem] = []\n            for raw in data:\n                try:\n                    contents.append(MemoryItem.from_dict(raw))","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/runtime/node/agent/memory/blackboard_memory.py#L7-L43","documentation":"BlackboardMemory requires its MemoryStoreConfig to carry a BlackboardMemoryConfig section. store.as_config(BlackboardMemoryConfig) returning None means the store config is for a different memory type (or missing the blackboard section), so the constructor aborts.","triggerScenarios":"Constructing BlackboardMemory with a MemoryStoreConfig whose type/name is not 'blackboard' (e.g. a 'simple' or 'file' store config), typically via create_memory or a factory dispatching on the store's type field.","commonSituations":"YAML/JSON agent config where memory.type says 'simple' but code instantiates BlackboardMemory; typos in the memory store type string; copy-pasting a memory block from another agent template.","solutions":["Set the memory store's type to 'blackboard' in the agent configuration","Verify create_memory(store) is being used rather than instantiating BlackboardMemory directly with a foreign config","Check for typos in the store type field"],"exampleFix":"# before\nstore = MemoryStoreConfig(type='simple', ...)\nmem = BlackboardMemory(store)\n\n# after\nstore = MemoryStoreConfig(type='blackboard', ...)\nmem = BlackboardMemory(store)  # or use create_memory(store)","handlingStrategy":"validation","validationCode":"cfg = store.as_config(BlackboardMemoryConfig)\nif cfg is None:\n    raise ConfigError('store type must be blackboard for BlackboardMemory')\nmem = BlackboardMemory(store)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use create_memory for type-driven dispatch","Keep memory.type and class in sync in configs"],"tags":["memory","configuration","type-mismatch"],"backgroundTag":"config-type-mismatch","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}