Skip to content

feat: LegionControl - Multi-Agent DAG topology orchestration#1606

Open
1688mengdie wants to merge 2 commits into
GCWing:mainfrom
1688mengdie:pr/legion-orchestration
Open

feat: LegionControl - Multi-Agent DAG topology orchestration#1606
1688mengdie wants to merge 2 commits into
GCWing:mainfrom
1688mengdie:pr/legion-orchestration

Conversation

@1688mengdie

Copy link
Copy Markdown

Summary

Add LegionControl tool for dynamic DAG topology-based multi-agent orchestration.

Changes

  • LegionControl tool: Read JSON template -> topological sort -> layered session creation -> context injection -> serial/parallel dispatch
  • Preset storage: CRUD operations for legion templates stored as JSON files
  • Conditional edge support: Edges with empty condition field are skipped in cycle detection
  • Rollback on failure: Automatically cleans up created sessions if any node creation fails
  • Commander prompt rewrite: Replaces gstack skills workflow with legion commander + Gate Loop Protocol
  • SessionControlAgentType: Changed from hardcoded enum to dynamic struct for flexible agent type routing
  • Post-call hooks extension: Added HookResult enum and Stop hook infrastructure for round-level behavior guards

Verification

  • cargo check -p bitfun-desktop
  • LegionControl list/load tested in Team mode (feature branch)
  • Conditional edges skip cycle detection
  • Rollback deletes partial sessions on failure

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