camel
camel copied to clipboard
feat: sequence task workforce
Description
Support for processing a sequence of tasks in the Workforce, where each task can share context (e.g., results, memory) with others.
- Added
process_task_sequenceandprocess_task_sequence_asyncmethods toWorkforce - Introduced
shared_contextandshared_channelto persist information across tasks - Each task's result is stored in
shared_contextwith the patterntask_{task.id} - Compatible with current single-task flow; does not affect
process_task
This addresses collaborative task execution as proposed in Issue #1832.
Checklist
- [x] I have read the CONTRIBUTION guide (required)
- [x] I have linked this PR to an issue using the Development section or
Fixes #1832(required) - [x] I have checked if any dependencies need to be added or updated in
pyproject.tomlanduv lock - [x] I have updated the tests accordingly (required for a bug fix or a new feature)
- [ ] I have updated the documentation if needed
- [x] I have added examples if this is a new feature