# Swarms v11 Changelog

All commits from March 13 – April 19, 2026.

---

## New Features

### AdvisorSwarm — implement advisor strategy pattern (`9a8b2d05`, Apr 14)

Implement the advisor strategy as a new swarm struct. Pairs a cheaper executor model with a powerful advisor model consulted at key decision points. The advisor provides strategic guidance; the executor does the work. Provider-agnostic via LiteLLM.

- New struct: `swarms/structs/advisor_swarm.py`
- Prompts: `swarms/prompts/advisor_swarm_prompts.py`
- Registered in SwarmRouter with factory method
- Exported from `swarms/structs/__init__.py`
- Tests: `tests/structs/test_advisor_swarm.py` (22 unit + 4 integration)
- Docs: `docs/swarms/structs/advisor_swarm.md`
- Example: `examples/multi_agent/advisor_swarm_examples/`

Closes #1526

### AdvisorSwarm: rewrite to match Anthropic's advisor strategy (`58dba32d`, Apr 14)

Rewrite to faithfully implement the architecture from Anthropic's diagram: executor runs every turn in a main loop, advisor is on-demand between turns, both read from shared conversation context.

- Executor-driven loop: executor runs for `max_loops` turns
- Advisor on-demand: consulted before each turn if budget allows
- Shared context: both agents read/write same Conversation object
- No verdict parsing or modes — advisor just reads context and advises
- `max_advisor_uses=0` supported (executor runs alone)
- Simplified prompts: no PLANNING/REVIEW modes, single behavior each

### AdvisorSwarm: reimplement properly (`6823a3ce`, Apr 14)

- Remove from SwarmRouter (creates agents internally — not a router-compatible struct)
- Advisor now sees full conversation history on every call
- Improved prompts with proper PLANNING/REVIEW mode instructions
- Verdict parsing uses regex instead of naive substring matching

### DriftDetectionAgent (`2c6a61ce`, Apr 10)

New agent that monitors a workflow for output drift — when results start diverging from the original task intent. Runs in a dedicated loop between steps, scores each output against the original goal, and triggers a correction pass when the score falls below a configurable threshold.

### DriftDetectionAgent: simplify, replace with agent + prompt (`4528a03c`, Apr 13)

### DriftDetectionAgent: swap to Sonnet, fix example (`d59647aa`, Apr 13)

### DriftDetectionAgent: infinite retry until threshold is passed (`3d47d536`, Apr 13)

### DriftDetection: extract drift loop into dedicated method (`7ce4f781`, Apr 14)

Extract drift loop into a dedicated method. Document drift detection params and behavior in SequentialWorkflow docs.

### PlannerGeneratorEvaluator multi-agent harness (`78d91a06`, Mar 25)

Three-agent orchestration harness (Planner, Generator, Evaluator) inspired by Anthropic's GAN-style harness design. Iterative generate-evaluate feedback loop with shared state file, step contracts, hard threshold enforcement, and score trajectory tracking (refine vs pivot).

### PlannerGeneratorEvaluator: HSCF example (`4be78555`, Mar 26)

Stub out a simple end-to-end example for the harness.

### PlannerWorkerSwarm — parallel multi-agent task execution (`fb5bd0d6`, Mar 17)

A parallel execution harness where a Planner decomposes a task into subtasks, dispatches them concurrently to a pool of specialized worker agents, and a Judge synthesizes the results. Workers run in a thread pool with configurable concurrency and per-worker timeouts.

### PlannerWorkerSwarm: docs, examples, and nav entries (`c0eb2d64`, Mar 17)

- Reference doc: `docs/swarms/structs/planner_worker_swarm.md`
- Examples doc: `docs/swarms/examples/planner_worker_swarm_example.md`
- Add to mkdocs.yml nav (Most Used Architectures + Hierarchical examples)
- Add to multi-agent overview table

### HeavySwarm: add Grok 4.20 Heavy 4-agent architecture (`67acb98f`, Mar 24)

Add optional Grok-style multi-agent architecture with 4 specialized agents 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
- **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, updated docs, 5 example files, and SwarmRouter integration.

### HeavySwarm: add 16-agent Grok 4.20 Heavy mode (`c9c6ea03`, Mar 31)

Add `use_grok_heavy` flag that creates 16 specialized agents (Grok captain + 15 domain specialists: Harper, Benjamin, Lucas, Olivia, James, Charlotte, Henry, Mia, William, Sebastian, Jack, Owen, Luna, Elizabeth, Noah) for deep multi-domain analysis. Mutually exclusive with `use_grok_agents`.

### HeavySwarm: docs for 16-agent Grok Heavy mode (`fddbd25d`, Mar 31)

Update architecture section, constructor parameters, method return types, examples, and notes table to cover the new `use_grok_heavy=True` mode.

### GraphWorkflow: add topology serialization and deserialization support (`849c47d8`, Mar 23)

### GraphWorkflow: add checkpoint for long-running workflows (`a7fcf189`, Mar 23)

Save workflow state to disk after each loop iteration. If a run is interrupted, resume from the last checkpoint rather than starting over. Uses sha256 for deterministic checkpoint keys; replays conversation on resume.

### GraphWorkflow: replace `hash()` with sha256, replay conversation on resume (`67f0e732`, Mar 23)

### GraphWorkflow serialization: docs for checkpointing and serialization (`5efc7dd5`, `b4dec23c`, Apr 5)

### `batch_run` concurrent with proper task isolation (`197a8f6f`, Apr 6)

`batch_run` now runs tasks concurrently using `concurrent.futures` with proper task isolation. Each task runs in its own isolated agent copy so conversation state doesn't bleed between tasks.

### `swarms init` CLI command (`a8332559`, `070284d9`, Apr 5)

New `swarms init` command scaffolds a new Swarms project in the current directory.

### `swarms autoswarm` generates ready-to-run Python file (`96c1a470`, Mar 20)

`swarms autoswarm` now writes a `.py` file with `Agent()` constructors, `SwarmRouter` setup, and a `__main__` block so users have a reusable script.

- Add `write_autoswarm_file()` and config-to-code helpers
- Add `--output/-o` and `--no-run` CLI flags
- Refactor `generate_swarm_config` to return config dict
- Fix `parse_yaml_from_swarm_markdown` extracting wrong YAML block
- Fix Literal type `in` operator bug in `create_agents_from_yaml`

### `swarms autoswarm`: add `--output-dir` flag (`0358a6df`, Mar 20)

Allows specifying a directory for the generated Python file instead of a full file path. The directory is created automatically if it doesn't exist. When `--output` is also provided, it takes precedence.

### Conversation string caching implementation (`76d87bdd`, Mar 19)

### Conversation caching: interactive example, formatting, and review fixes (`a97681c6`, `3885bded`, `7f4363c4`, Mar 20)

Add interactive cache test example, fix black formatting, apply code review suggestions.

### Conversation caching: deterministic ordering, consistent ValueError, test coverage (`2ebced2c`, Mar 23)

### `load_swarms_env()` + `print_director_task_distribution()` + v10.0.0 bump (`9734cee2`, Mar 14)

- Add `swarms/env.py` with `load_swarms_env()` helper using `find_dotenv` for upward `.env` resolution
- Replace bare `load_dotenv()` calls across `__init__.py`, `cli/main.py`, and `auto_generate_swarm_config.py`
- Add `print_director_task_distribution()` to Formatter class — renders a rich Tree panel of director-to-agent task assignments
- Wire `print_director_task_distribution` into `HierarchicalSwarm.run()` after order parsing
- Update HierarchicalSwarm example: use `gpt-5.4`, enable `parallel_execution` and `agent_as_judge`, set `director_temperature=1.0`, disable `planning_enabled`
- Fix SkillOrchestra example imports and rename `description` to `agent_description` on Agent instances
- **Bump version to 10.0.0**

---

## Improvements

### HeavySwarm: move prompts and schemas to dedicated module (`812293e3`, Mar 29)

Extract all prompt constants and tool schemas from `heavy_swarm.py` into `swarms/prompts/heavy_swarm_prompts.py`, reducing the struct file by ~490 lines while keeping re-exports intact for backwards compatibility.

### Deps cleanup: remove unused packages; pin litellm; add requests (`484eb5bc`, Apr 11)

- Remove unused packages from requirements
- Pin litellm version to match pyproject
- Add missing requests dependency to pyproject

### Migration: `gpt-4o-mini` → `gpt-5.4` across examples and tests (`bbe77495`, Mar 20)

### Dependency updates: ruff `<0.15.9`; ruff `<0.15.7`; types-pytz `<2027.0` (`54fb2a32`, `619edbb2`, `df33aa95`, Mar 16–30)

### Readme updates: Discord link, formatting, fixes (`c164cf40`, `2a20d058`, `ac61f16d`, `f0748af0`, `5027c3a2`, Apr 9)

### Clean up init of structs (`30a16548`, Mar 19)

### Code cleanup (`cc1667a1`, `4a63849d`, `df53f480`, `d5f02535`, Apr 5–14)

### v10 changelog added to docs (`46aa5843`, Mar 14)

### HeavySwarm: refactor HeavySwarm prompts to match Anthropic advisor strategy after rewrite (`58dba32d`, Apr 14)

### [TEST] Swarms CLI (`8a5f7851`, Apr 17)

---

## Bug Fixes

### AgentRearrange: stop silently swallowing exceptions (`f623f112`, Mar 18)

AgentRearrange had three nested `try/except` layers (`_run`, `run`, `__call__`) that all caught exceptions and returned `None` instead of raising. Callers had no way to distinguish a failed workflow from a successful one.

- `_catch_error()`: `return e` → `raise e`
- `_run()`: remove try/except, let exceptions propagate to `run()`
- `__call__()`: remove redundant try/except wrapper
- `batch_run()` / `concurrent_run()`: remove redundant try/except wrappers

Closes #1464, #1465

### AgentRearrange: correct sequential awareness for repeated agents in flow (`af38ee0b`, Mar 19)

`_get_sequential_awareness` always resolved to the first occurrence of an agent name, so repeated agents (e.g., `"Writer -> Reviewer -> Writer"`) all received identical positional info.

- Add `task_idx` param to `_get_sequential_awareness` and `_run_sequential_workflow` so each occurrence gets correct neighbors
- Use indexed keys in `response_dict` to preserve all outputs from repeated agents instead of silently overwriting
- Remove commented-out duplicate agent check (dead code)
- Add tests for repeated agent flows

Closes #1466

### GraphWorkflow: `max_loops` was always 1 (`7f90de56`, Mar 20)

A misplaced `return` statement inside the `while` loop in `GraphWorkflow.run()` caused the workflow to exit after the first iteration regardless of `max_loops`. Move `return` outside the loop, accumulate per-loop results, and feed end-point outputs as context into subsequent loops.

### Anthropic temperature compatibility: remove `dynamic_temperature_enabled` (`c46f788e`, Apr 10)

`dynamic_temperature_enabled` was being forwarded to Anthropic's API, which doesn't accept it, causing hard failures. The field is removed; temperature is now handled correctly for all providers.

### Conversation caching disabled by default (`0b683f54`, Mar 24)

- Disable conversation caching by default (`cache_enabled=False`)
- Move caching logic into `return_history_as_string()`, make `get_str()` a plain alias
- Simplify `get_cache_stats()` — drop redundant `total_tokens` field

### Agent lookup: O(n) → O(1) using dict (`04d24755`, Mar 18)

Closes #1471

### Machine ID: assert stability instead of uniqueness (`0568beec`, `1e6e4028`, Mar 18)

Closes #1469

### Remove file that used outdated module (`b67cdcf9`, Mar 18)

Closes #1470

### Fix 6 broken documentation links (`0c912e4f`, Mar 17)

- Fix 3 broken footer links in mkdocs.yml
- Remove 3 phantom entries from `structs/overview.md` (TaskQueueSwarm, MatrixSwarm, Deep Research Swarm — no code or docs exist for these)
- Fix broken Deep Research links in `swarm_architectures.md` and `paper_implementations.md`

Closes #1399

### Fix broken docs links for HierarchicalSwarm and ConcurrentWorkflow in README (`1531145a`, Mar 14)

- Fix typo: `hiearchical_swarm` → `hierarchical_swarm`
- Fix: `concurrent_workflow` → `concurrentworkflow`

Closes #1448

### Security: yaml deserialization, shell injection, SSRF, auth cache, bash blocklist, bare excepts, temp dir (`759d8a6a`, Apr 5)

- Replace `yaml.load` with `yaml.safe_load` — prevents arbitrary Python object instantiation from untrusted YAML
- Replace `os.system` with `subprocess.run` list form — eliminates shell injection in tool execution and CLI paths
- Expand bash blocklist with regex patterns — catches command variations and whitespace bypass attempts
- Block private and loopback URLs in requests — closes SSRF vector in agent URL-fetching tools
- Move auth cache file to `~/.swarms/` with `0600` permissions — previously world-readable in temp directory
- Log errors instead of silent pass on bare excepts — errors now surface in logs
- Cleanup temp dir on zip failure — prevents partial file accumulation in temp storage
- Add comprehensive security audit report to docs

### Prevent litellm security issue (`dc60825f`, Mar 24)

Pin litellm to a safe version range to avoid a known vulnerability in previously unpinned releases.

---

## Deprecations and Removals

### Remove SwarmTemplates struct and docs (`59a00f38`, Apr 14)

Unused struct with no callers. Documentation and codebase audit doc updated.

### Remove BoardOfDirectors swarm (`ae942df0`, Apr 14)

Superseded by `HierarchicalSwarm`. Source, tests, examples, docs, and mkdocs entry all deleted.

### Remove EuroSwarm parliament simulation (`ae942df0`, Apr 14)

Example-only simulation, not a production struct. All files deleted.

### Remove MAKER struct (`7d2bd1e7`, Apr 14)

Unused struct. Source and docs deleted.

### Remove Agent GRPO struct (`7d2bd1e7`, Apr 14)

Experimental feature with no adoption. Source and examples deleted.

### Remove OpenAIAssistant agent and wrapper (`7d2bd1e7`, Apr 14)

OpenAI Assistants API deprecated upstream; struct removed entirely.

### Remove `check-tokens` and `data-to-text` utilities (`7d2bd1e7`, Apr 14)

Dead code. Callers migrated to stdlib `csv` as a drop-in replacement for `data-to-text`.

### Remove `run_agents_concurrently_uvloop` and `run_agents_with_tasks_uvloop` (`5de4fbd4`, Apr 19)

Zero production callers — only referenced in `__init__.py` re-exports, examples, and docs. Superseded by `run_agents_concurrently` and `run_agents_with_different_tasks`, which are actively used across 5+ production structs. ~280 lines deleted from `multi_agent_exec.py`, 8 example files removed.

### Remove Trivy CI/CD vulnerability scanning workflow (`0b683f54`, Mar 24)

Removed from CI pipeline.
