feat: add Grok 4.20 Heavy architecture agents to HeavySwarm#1499
Merged
kyegomez merged 2 commits intokyegomez:masterfrom Mar 30, 2026
Merged
feat: add Grok 4.20 Heavy architecture agents to HeavySwarm#1499kyegomez merged 2 commits intokyegomez:masterfrom
kyegomez merged 2 commits intokyegomez:masterfrom
Conversation
Add optional Grok-style multi-agent architecture with 4 specialized agents (Captain Swarm, Harper, Benjamin, Lucas) that decompose tasks by thinking style rather than task phase. Enable via use_grok_agents=True. - Captain Swarm: orchestrator that decomposes tasks AND synthesizes with conflict mediation between agent outputs - Harper: research & facts specialist for evidence-based grounding - Benjamin: logic, math & code specialist for rigorous verification - Lucas: creative & divergent thinker for contrarian analysis and blind-spot detection Includes end-to-end tests with real API calls, updated docs, 5 example files, and SwarmRouter integration.
41c49cc to
67acb98
Compare
…_swarm_prompts.py Extract all prompt constants and tool schemas from heavy_swarm.py into a dedicated prompts file, reducing the struct file by ~490 lines while keeping re-exports intact for backwards compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
use_grok_agents=Trueparameterheavy_swarm_use_grok_agentsparameterFiles changed
swarms/structs/heavy_swarm.py— core implementation (4 new prompts, grok_schema, agent creation, execution routing, Captain synthesis)swarms/structs/swarm_router.py— pass-through forheavy_swarm_use_grok_agentsdocs/swarms/structs/heavy_swarm.md— updated docs with architecture comparison, API reference, and examplestests/structs/test_heavy_swarm_grok.py— 28 tests (21 unit + 7 end-to-end with real API calls)examples/multi_agent/heavy_swarm_examples/Test plan
pytest tests/structs/test_heavy_swarm_grok.py -v🤖 Generated with Claude Code
📚 Documentation preview 📚: https://swarms--1499.org.readthedocs.build/en/1499/