You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mintlify/reference/camel.societies.workforce.workflow_memory_manager.mdx
+201-8Lines changed: 201 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@ workflow management concerns from the core worker task processing logic.
37
37
-**worker** (ChatAgent): The worker agent that will use workflows.
38
38
-**description** (str): Description of the worker's role.
39
39
-**context_utility** (Optional[ContextUtility]): Shared context utility for workflow operations. If None, creates a new instance.
40
+
-**role_identifier** (Optional[str]): Role identifier for organizing workflows by role. If provided, workflows will be stored in role-based folders. If None, uses default workforce context.
41
+
-**config** (Optional[WorkflowConfig]): Configuration for workflow management. If None, uses default configuration.
@@ -69,23 +199,54 @@ Get context utility with lazy initialization.
69
199
defload_workflows(
70
200
self,
71
201
pattern: Optional[str] =None,
72
-
max_files_to_load: int=3,
202
+
max_files_to_load: Optional[int]=None,
73
203
session_id: Optional[str] =None,
74
204
use_smart_selection: bool=True
75
205
):
76
206
```
77
207
78
208
Load workflow memories using intelligent agent-based selection.
79
209
80
-
This method uses the worker agent to intelligently select the most
81
-
relevant workflows based on workflow information (title, description,
82
-
tags) rather than simple filename pattern matching.
210
+
This method first tries to load workflows from the role-based folder
211
+
structure. If no workflows are found and session_id is provided, falls
212
+
back to session-based loading (deprecated).
83
213
84
214
**Parameters:**
85
215
86
216
-**pattern** (Optional[str]): Legacy parameter for backward compatibility. When use_smart_selection=False, uses this pattern for file matching. Ignored when smart selection is enabled.
87
-
-**max_files_to_load** (int): Maximum number of workflow files to load. (default: :obj:`3`)
88
-
-**session_id** (Optional[str]): Specific workforce session ID to load from. If None, searches across all sessions. (default: :obj:`None`)
217
+
-**max_files_to_load** (Optional[int]): Maximum number of workflow files to load. If None, uses config.default_max_files_to_load. (default: :obj:`None`)
218
+
-**session_id** (Optional[str]): Deprecated. Specific workforce session ID to load from using legacy session-based organization. (default: :obj:`None`)
219
+
-**use_smart_selection** (bool): Whether to use agent-based intelligent workflow selection. When True, uses workflow information and LLM to select most relevant workflows. When False, falls back to pattern matching. (default: :obj:`True`)
220
+
221
+
**Returns:**
222
+
223
+
bool: True if workflow memories were successfully loaded, False
224
+
otherwise. Check logs for detailed error messages.
Load workflow memories from role-based directory structure.
241
+
242
+
This method loads workflows from the new role-based folder structure:
243
+
workforce_workflows/\{role_name\}/*.md
244
+
245
+
**Parameters:**
246
+
247
+
-**role_name** (Optional[str]): Role name to load workflows from. If None, uses the worker's role_name or role_identifier.
248
+
-**pattern** (Optional[str]): Custom search pattern for workflow files. Ignored when use_smart_selection=True.
249
+
-**max_files_to_load** (Optional[int]): Maximum number of workflow files to load. If None, uses config.default_max_files_to_load. (default: :obj:`None`)
89
250
-**use_smart_selection** (bool): Whether to use agent-based intelligent workflow selection. When True, uses workflow information and LLM to select most relevant workflows. When False, falls back to pattern matching. (default: :obj:`True`)
0 commit comments