Skip to content

feat: Adapt eigent Workforce to CAMEL's plan-then-run API#1530

Open
fengju0213 wants to merge 1 commit intomainfrom
camel_migrate_workforce
Open

feat: Adapt eigent Workforce to CAMEL's plan-then-run API#1530
fengju0213 wants to merge 1 commit intomainfrom
camel_migrate_workforce

Conversation

@fengju0213
Copy link
Copy Markdown
Collaborator

@fengju0213 fengju0213 commented Apr 1, 2026

Adapt eigent Workforce to CAMEL's plan-then-run API with a thin local planning adapter

Summary

Replace eigent's duplicated orchestration core with CAMEL's new plan_task_async() / run_plan_async() APIs, while keeping eigent-specific planning context injection as a thin local adapter. This removes most of the manual queueing/sync logic without pushing product-specific semantics upstream into CAMEL.

Changes

backend/app/utils/workforce.py

Removed or simplified Replaced by
Manual decomposition/execution orchestration Delegates to CAMEL plan_task_async() / run_plan_async()
Manual pending queue and snapshot startup logic Uses CAMEL plan/run lifecycle
Manual _sync_subtask_to_parent logic Uses CAMEL _sync_task_to_parent behavior
Large handle_decompose_append_task override Deleted in favor of upstream planning flow
eigent-specific planning context behavior Kept as a thin eigent-side adapter instead of becoming CAMEL public API

Backward compatible:

  • eigent_make_sub_tasks() still returns list[Task] and stores the latest WorkforcePlan internally
  • eigent_start() still accepts both WorkforcePlan and edited list[Task]
  • Existing frontend notification overrides remain unchanged

Why this split

What CAMEL now owns:

  • public plan-then-run orchestration
  • task tree consistency guarantees
  • neutral event/state metadata

What eigent continues to own:

  • planning-only context injection for its coordinator workflow
  • frontend notification payloads and mapping logic
  • product-specific retry, timeout, and cleanup behavior

This keeps CAMEL minimal and reusable, while still letting eigent delete most of its duplicated workflow code.

@fengju0213 fengju0213 changed the title Update workforce.py feat: Adapt eigent Workforce to CAMEL's plan-then-run API Apr 1, 2026
@fengju0213 fengju0213 added this to the Sprint 20 milestone Apr 1, 2026
@fengju0213
Copy link
Copy Markdown
Collaborator Author

pending: camel-ai/camel#3979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant