Skip to content

feat: add Grok 4.20 Heavy architecture agents to HeavySwarm#1499

Merged
kyegomez merged 2 commits intokyegomez:masterfrom
Steve-Dusty:feat/grok-heavy-agents
Mar 30, 2026
Merged

feat: add Grok 4.20 Heavy architecture agents to HeavySwarm#1499
kyegomez merged 2 commits intokyegomez:masterfrom
Steve-Dusty:feat/grok-heavy-agents

Conversation

@Steve-Dusty
Copy link
Copy Markdown
Contributor

@Steve-Dusty Steve-Dusty commented Mar 24, 2026

Summary

  • Add optional Grok 4.20 Heavy multi-agent architecture to HeavySwarm with use_grok_agents=True parameter
  • Implements 4 specialized agents inspired by Grok 4.20 Heavy:
    • Captain Swarm — leader/orchestrator that decomposes tasks AND synthesizes with conflict mediation
    • Harper — research & facts specialist for evidence-based grounding and source verification
    • Benjamin — logic, math & code specialist for rigorous reasoning and computational verification
    • Lucas — creative & divergent thinker for contrarian analysis, blind-spot detection, and bias identification
  • Fully backward compatible — default mode (5 agents: Research/Analysis/Alternatives/Verification/Synthesis) is unchanged
  • Integrated with SwarmRouter via heavy_swarm_use_grok_agents parameter

Files 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 for heavy_swarm_use_grok_agents
  • docs/swarms/structs/heavy_swarm.md — updated docs with architecture comparison, API reference, and examples
  • tests/structs/test_heavy_swarm_grok.py — 28 tests (21 unit + 7 end-to-end with real API calls)
  • 5 new example files in examples/multi_agent/heavy_swarm_examples/

Test plan

  • 21 unit tests pass (agent creation, schema, prompts, SwarmRouter integration)
  • 3 question generation tests pass with real API calls
  • 4 full pipeline tests pass with real API calls (grok string output, grok dict output, grok dashboard, default mode regression)
  • All 28 tests pass: pytest tests/structs/test_heavy_swarm_grok.py -v
  • Verify existing HeavySwarm tests still pass
  • Manual test with dashboard enabled

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://swarms--1499.org.readthedocs.build/en/1499/

@github-actions github-actions bot added documentation Improvements or additions to documentation tests structs labels Mar 24, 2026
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.
@Steve-Dusty Steve-Dusty force-pushed the feat/grok-heavy-agents branch from 41c49cc to 67acb98 Compare March 24, 2026 07:07
…_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>
@kyegomez kyegomez merged commit 4c29806 into kyegomez:master Mar 30, 2026
6 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation prompts structs tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants