camel icon indicating copy to clipboard operation
camel copied to clipboard

feat: sequence task workforce

Open nitpicker55555 opened this issue 9 months ago • 7 comments

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_sequence and process_task_sequence_async methods to Workforce
  • Introduced shared_context and shared_channel to persist information across tasks
  • Each task's result is stored in shared_context with the pattern task_{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.toml and uv 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

nitpicker55555 avatar Mar 30 '25 18:03 nitpicker55555