Record a memory operation (retrieve/update).
(self, node_id: str, retrieved_memory: str, operation_type: str, stage: str,
duration: float = None, details: Dict[str, Any] = None)
| 289 | ) |
| 290 | |
| 291 | def record_memory_operation(self, node_id: str, retrieved_memory: str, operation_type: str, stage: str, |
| 292 | duration: float = None, details: Dict[str, Any] = None) -> None: |
| 293 | """Record a memory operation (retrieve/update).""" |
| 294 | memory_details = { |
| 295 | "retrieved_memory": retrieved_memory, |
| 296 | "operation_type": operation_type, # RETRIEVE or UPDATE |
| 297 | "stage": stage, |
| 298 | **(details or {}) |
| 299 | } |
| 300 | |
| 301 | self.info( |
| 302 | f"Memory {operation_type} operation for node {node_id} at {stage}", |
| 303 | node_id=node_id, |
| 304 | event_type=EventType.MEMORY_OPERATION, |
| 305 | details=memory_details, |
| 306 | duration=duration |
| 307 | ) |
| 308 | |
| 309 | def record_workflow_start(self, workflow_config: Dict[str, Any] = None) -> None: |
| 310 | """Record the workflow start event.""" |
no test coverage detected