-
Notifications
You must be signed in to change notification settings - Fork 27
[FEAT-SWARM][Added fully functional hierarchical swarm architecture identical to the python version] #47
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
IlumCI
wants to merge
27
commits into
The-Swarm-Corporation:main
Choose a base branch
from
IlumCI:hierarchicalswarms-rs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The hierarchical swarm system has been cleaned up by removing markdown functionality from the core implementation while maintaining API compatibility. The
.md(true)
method is preserved for existing code compatibility, but the actual markdown rendering has been removed to focus on core hierarchical multi-agent coordination.How the Hierarchical Swarm Works
The hierarchical swarm is a sophisticated multi-agent system that follows a director-worker pattern for complex task execution. The system coordinates multiple specialized agents through a director that creates plans and distributes tasks.
Core Architecture
Key Features
Code Samples
1. Basic Hierarchical Swarm Usage with Markdown Compatibility
2. Director-Worker Pattern
3. Agent Configuration
Changes Made
1. Cleaned Up Markdown Functionality (
swarms-rs/src/structs/hierarchical_swarm.rs
)markdown_enabled
field fromHierarchicalSwarm
structformatter
field fromHierarchicalSwarm
structmd()
method for API compatibility - allows existing code to compile without breaking changes2. Cleaned Up Core Implementation
3. Updated Example (
swarms-rs/examples/hierarchical_swarm_example.rs
)Integration with Swarms Framework
Hierarchical Swarm Usage with API Compatibility
Director-Worker Coordination
Issue
Addresses the need to clean up the hierarchical swarm implementation by removing unnecessary markdown functionality. The system now focuses purely on core hierarchical multi-agent coordination without output formatting concerns.
Dependencies
No changes to dependencies. The system uses existing core dependencies for multi-agent coordination.
Tag maintainer
@kyegomez
Twitter handle
x.com/IlumTheProtogen
Testing
cargo run --example hierarchical_swarm_example
cargo test --test test_hierarchical_swarm
Code Quality Improvements
Files Modified
swarms-rs/src/structs/hierarchical_swarm.rs
- Removed markdown functionality, cleaned core implementationswarms-rs/examples/hierarchical_swarm_example.rs
- Updated to show proper hierarchical swarm usageswarms-rs/src/prompts/hierarchical_system_prompt.rs
- Core system prompt for hierarchical coordinationBenefits for Swarms Framework
.md(true)
continues to workVideo Demo(With AI summary on same page):
https://screenapp.io/app/#/shared/SxDawpRUMo