Record a memory operation.
(self, node_id: str, operation_type: str,
stage: str, retrieved_memory: Any = None,
details: Dict[str, Any] = None)
| 153 | self.logger.record_thinking_process(node_id, thinking_mode, thinking_result, stage, duration, details) |
| 154 | |
| 155 | def record_memory_operation(self, node_id: str, operation_type: str, |
| 156 | stage: str, retrieved_memory: Any = None, |
| 157 | details: Dict[str, Any] = None) -> None: |
| 158 | """Record a memory operation.""" |
| 159 | duration = self.logger.get_timer(f"memory_{node_id}_{operation_type}_{stage}") |
| 160 | memory_details = { |
| 161 | "result_size": len(str(retrieved_memory)) if retrieved_memory is not None else 0, |
| 162 | **(details or {}) |
| 163 | } |
| 164 | self.logger.record_memory_operation(node_id, retrieved_memory, operation_type, stage, duration, memory_details) |
| 165 | |
| 166 | def record_workflow_start(self, workflow_config: Dict[str, Any] = None) -> None: |
| 167 | """Record the workflow start event.""" |