Skip to content

feat: sequence task workforce #2055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

nitpicker55555
Copy link
Collaborator

@nitpicker55555 nitpicker55555 commented Mar 30, 2025

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

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section or Fixes #1832 (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed
  • I have added examples if this is a new feature

"technology used, innovation, and potential impact."
),
),
Task(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add some comments on these?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like step by step run all task ....

@zjrwtx
Copy link
Collaborator

zjrwtx commented Mar 31, 2025

thanks @nitpicker55555 ,left some comment

@Wendong-Fan Wendong-Fan changed the title Feat/sequence task workforce feat: sequence task workforce May 22, 2025
Copy link
Member

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nitpicker55555 for the contribution, and apologies for the delayed review comment.

The current implementation appears to process a sequence of top-level tasks within the workforce, rather than allowing for a pre-defined, fixed sequence of subtasks for a single overarching goal. As it stands, each task in the sequence is still subject to the workforce's internal decomposition process.

The user's requirement, as I understand it, is to support a scenario where subtasks are explicitly defined and executed in a specific order without further decomposition by the workforce. This would give more direct control over the execution flow.

Maybe allowing the Task to specify which worker node should handle it could offer more granular control. Happy to discuss this further

@Wendong-Fan Wendong-Fan added Agents Related to camel agents system Waiting for Update PR has been reviewed, need to be updated based on review comment labels May 24, 2025
@Wendong-Fan Wendong-Fan added this to the Sprint 30 milestone May 24, 2025
@Wendong-Fan Wendong-Fan linked an issue May 24, 2025 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agents Related to camel agents system Waiting for Update PR has been reviewed, need to be updated based on review comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[Question] Workforce and Task management for production reasoning agent
3 participants