Skip to content

Commit 61320e6

Browse files
authored
Merge branch 'kyegomez:master' into master
2 parents 623e41b + df53f48 commit 61320e6

585 files changed

Lines changed: 54005 additions & 22199 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
WORKSPACE_DIR="agent_workspace"
33
SWARMS_VERBOSE_GLOBAL="False"
44
SWARMS_API_KEY=""
5+
SWARMS_TELEMETRY_ON="false"
6+
7+
8+
59

610
# Model Provider API Keys
711
## OpenAI

.github/workflows/code-quality-and-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
# Step 11: Upload test results as artifacts (optional)
6565
- name: Upload test results
6666
if: always()
67-
uses: actions/upload-artifact@v6
67+
uses: actions/upload-artifact@v7
6868
with:
6969
name: test-results-${{ matrix.python-version }}
7070
path: |

.github/workflows/test-main-features.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
poetry run python tests/test_main_features.py
7070
7171
- name: Upload test results
72-
uses: actions/upload-artifact@v6
72+
uses: actions/upload-artifact@v7
7373
if: always()
7474
with:
7575
name: test-results

.github/workflows/trivy.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/welcome.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
steps:
1414
- uses: actions/first-interaction@v3.1.0
1515
with:
16-
repo-token: ${{ secrets.GITHUB_TOKEN }}
17-
issue-message:
18-
"Hello there, thank you for opening an Issue ! 🙏🏻 The team
19-
was notified and they will get back to you asap."
20-
pr-message:
21-
"Hello there, thank you for opening an PR ! 🙏🏻 The team was
22-
notified and they will get back to you asap."
16+
repo_token: ${{ secrets.GITHUB_TOKEN }}
17+
issue_message: "Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap."
18+
pr_message: "Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap."

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dataframe/
1111
.ruff_cache
1212
target/
1313
Cargo.lock
14+
.claude/
1415
.pytest_cache
1516
databases
1617
static/generated
@@ -286,6 +287,15 @@ flycheck_*.el
286287
# network security
287288
/network-security.data
288289

290+
# Agent Skills - User-created skill directories
291+
# Keep example_skills/ committed for reference
292+
# Ignore common user skill directory patterns
293+
/skills/
294+
/my_skills/
295+
/custom_skills/
296+
/*_skills/
297+
!example_skills/
298+
289299

290300

291301

README.md

Lines changed: 86 additions & 57 deletions
Large diffs are not rendered by default.

SECURITY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ Once the vulnerability has been thoroughly assessed, we will take the necessary
3535

3636
We aim to respond to all vulnerability reports in a timely manner and work towards resolving them as quickly as possible. We thank you for your contribution to the security of our software.
3737

38-
Please note that any vulnerability reports that are not related to the specified versions or do not provide sufficient information may be declined.
39-
38+
Please note that any vulnerability reports that are not related to the specified versions or do not provide sufficient information may be declined.

docs/changelogs/v10.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Changelog
2+
3+
**February 2, 2026 → March 13, 2026** Swarms v10
4+
5+
---
6+
7+
## Introduction
8+
9+
Over the past month and a half, the Swarms team has been heads down building toward the premier release of Swarms v10. What started as a series of targeted improvements quickly grew into one of the most comprehensive updates the framework has seen. Across dozens of commits and multiple pull requests, we rebuilt core systems, introduced powerful new orchestration primitives, and made the entire framework faster, smarter, and easier to work with.
10+
11+
The sub-agent system received a full overhaul. Agents can now autonomously spawn sub-agents, assign them tasks, monitor their progress in real time, and cancel them on demand — all backed by a persistent async task registry that handles retries and failure recovery without any manual wiring on your end.
12+
13+
The `HierarchicalSwarm` took a major step forward with two standout additions. Worker agents can now execute in parallel, cutting down task completion time significantly on complex workflows. A built-in judge agent can also evaluate every worker's output after each cycle, scoring performance across five dimensions and surfacing actionable feedback — so your swarm gets smarter with every run.
14+
15+
We also introduced `SkillOrchestra`, a brand new routing primitive that lets you define agent skills explicitly and route tasks to the most qualified agent automatically based on what each agent knows how to do. Instead of hardcoding which agent handles what, `SkillOrchestra` makes skill-based delegation a first-class feature of the framework.
16+
17+
On top of these headline features, the CLI was modernized from the ground up, a range of long-standing bugs were resolved, and internal defaults and cleanup work has made the entire codebase more stable and predictable. This changelog covers everything shipped during this period, organized by category.
18+
19+
---
20+
21+
## New Features
22+
23+
- **Sub-Agent Status & Cancel Tools** — Added `check_sub_agent_status` and `cancel_sub_agent_tasks` as new autonomous planning tools with full schema definitions and registry-backed handler implementations, wired into Agent's tool dispatch map. *(2026-03-12)*
24+
- **Async Sub-Agent Registry Refactor** — Replaced raw asyncio dispatching in `assign_task_tool` with `SubagentRegistry`-based spawning for consistent task tracking, retries, and cancellation; added `_find_registry` and `_resolve_sub_agents_by_name` helpers. *(2026-03-12)*
25+
- **Sub-Agent Print Visibility** — Enabled `print_on=True` for sub-agents created via `create_sub_agent_tool` to surface their output during execution. *(2026-03-12)*
26+
- **SkillOrchestra** — Added skill-aware agent routing via skill transfer, including a full usage example. *(2026-03-10)*
27+
- **Async Sub-Agent Execution** — Added background task registry with async sub-agent support. *(2026-03-08)*
28+
- **Parallel Agent Execution** — Concurrent agent execution via `ThreadPoolExecutor` with `as_completed()`; outputs written to conversation in original submission order to avoid race conditions. *(2026-03-05)*
29+
- **Agent-as-Judge** — Structured per-agent scoring after each cycle using a new `JudgeReport` Pydantic schema with `AgentScore` entries covering task adherence, accuracy, depth, clarity, and swarm contribution weighted into a 0–10 composite; takes priority over `director_feedback_on` when both are enabled. *(2026-03-05)*
30+
- **`arun()` Async Entry Point** — Added async entry point wrapping `run()` in `asyncio.to_thread()` for non-blocking use in FastAPI and other async frameworks. *(2026-03-05)*
31+
- **`HIERARCHICAL_SWARM_JUDGE_PROMPT`** — Extensive judge system prompt with five weighted scoring dimensions, rubrics for every score band, mandatory citation standards, and adversarial honesty guardrails. *(2026-03-05)*
32+
- **CLI UI Overhaul** — Replaced ASCII art banner with a compact Claude Code-style header featuring active provider detection, rotating startup tips, and a simplified red-and-white color scheme. *(2026-03-03)*
33+
- **Plain-Text Help Output** — Replaced rich-formatted help with plain-text argparse-style reference listing all commands, options, and examples. *(2026-03-03)*
34+
- **Sub-Agent Task Creation** — Enabled agents to create and assign tasks to sub-agents via a new autonomous tool. *(2026-02-02)*
35+
- **Base64 Image Processing** — New guide and support for agents processing images through base64 encoding. *(2026-02-02)*
36+
37+
---
38+
39+
## Improvements
40+
41+
- **PDF Utility Removal** — Removed `pdf_to_text` as a core utility from `utils/__init__.py` and `data_to_text.py`; inlined a local implementation directly in the mem0 example script. *(2026-03-12)*
42+
- **Agent Class Cleanup** — Removed duplicated async sub-agent methods from the Agent class body, now superseded by registry integration. *(2026-03-12)*
43+
- **`top_p` Default Fix** — Removed hardcoded `top_p=None` from `auto_chat_agent` and set `Agent.top_p` default to `None` to avoid unintended sampling parameter injection. *(2026-03-12)*
44+
- **Model & Version Update** — Bumped swarms to `9.0.3` and updated default model references from `gpt-4.1`/`claude-sonnet-4-5` to `gpt-5.4`/`gpt-5.1` across example files and CLI. *(2026-03-12)*
45+
- **Async Sub-Agents Code Cleanup** — Code cleanup and logic refactoring for async sub-agent execution. *(2026-03-09)*
46+
- **Hierarchical Swarm Docs Overhaul** — Overhauled `hierarchical_swarm.md` with updated Mermaid diagram, new constructor parameter table, dedicated sections for all new features, `arun()` docs with FastAPI integration example, and updated best practices. *(2026-03-05)*
47+
- **CLI Cleanup** — Removed deprecated `features` command, `show_features` function, redundant `help` subcommand, and dead CLI table utilities (`create_command_table`, `create_detailed_command_table`). *(2026-03-03)*
48+
- **Agent Defaults** — Agent now defaults to `gpt-4.1`, uses styled formatter console input prompts in interactive mode, and always returns the final summary from the autonomous loop. *(2026-03-03)*
49+
- **CLI Documentation** — Updated CLI documentation to reflect recent CLI overhaul. *(2026-03-03)*
50+
- **CLI Parameters** — Improved CLI with fewer parameters and fixed the `swarms chat` feature. *(2026-02-02)*
51+
- **Sub-Agent Tutorial Docs** — Improved sub-agent tutorial documentation. *(2026-02-02)*
52+
- **Examples Section** — Improved examples section with updated references. *(2026-02-05)*
53+
- **Bash Tool for `agent.auto`** — Added bash tool support for agents running in auto mode. *(2026-02-02)*
54+
- **Auto-Save Examples** — Added examples for auto-saving structures. *(2026-02-02)*
55+
- **Bash Command Security Guardrails** — Added security validation in `autonomous_loop_utils` to block dangerous shell patterns including recursive deletion, pipe-to-shell, disk writes, fork bombs, and privilege escalation; enforces a 512-character command length limit. *(2026-03-03)*
56+
- **Dynamic Timestamps in Agent Prompts** — Introduced a `get_time` helper to dynamically inject the current date and time into prompts at runtime. *(2026-03-03)*
57+
- **Auto Chat Loop Refactor** — Refactored `auto_chat_agent` into a persistent while-loop with graceful exit-command handling and an exposed `model_name` parameter. *(2026-03-03)*
58+
- **Agent Selected Tools Method** — Added method for running agents with selected tools by name. *(2026-02-05)*
59+
---
60+
61+
## Bug Fixes
62+
63+
- Fixed README and auto-chat issue on CLI. *(2026-03-11)*
64+
- **Welcome Workflow** — Fixed unexpected inputs in welcome workflow. *(2026-02-28)*
65+
- **LLMCouncil** — Fixed incompatibility between `LLMCouncil`, `SwarmRouter`, and the API server. *(2026-02-24)*
66+
- **Agent Identity** — Fixed system prompt injection for agent identity when no system prompt is provided. *(2026-02-17)*
67+
- **DebateWithJudge** — Fixed API field for `DebateWithJudge` to work correctly with the API server. *(2026-02-15)*
68+
- **RoundRobin** — Fixed `RoundRobin` swarm; removed useless parameter. *(2026-02-15)*
69+
- **LiteLLM Empty System Prompt Fix** — Fixed Anthropic API rejections by stripping whitespace-only system prompt blocks and normalizing orchestrator-style `System:/Human:` prompts before message construction. *(2026-03-12)*
70+
- Fixed typo: `seperatedly``separately`. *(2026-02-10)*
71+
72+
---
73+
74+
## Dependency Updates
75+
76+
- Bumped `aquasecurity/trivy-action` from `0.34.1` to `0.35.0`. *(2026-03-09)*
77+
- Updated `ruff` requirement to `>=0.5.1,<0.15.6`. *(2026-03-09)*
78+
- Updated `types-pytz` requirement to `>=2023.3,<2027.0`. *(2026-03-09)*
79+
- Updated `ruff` requirement to `>=0.5.1,<0.15.5`. *(2026-03-03)*
80+
- Bumped `actions/upload-artifact` from `6` to `7`. *(2026-03-03)*
81+
- Updated `ruff` requirement to `>=0.5.1,<0.15.3`. *(2026-02-23)*
82+
- Bumped `aquasecurity/trivy-action` from `0.34.0` to `0.34.1`. *(2026-02-23)*
83+
- Updated `pymdown-extensions` requirement to `~=10.21`. *(2026-02-16)*
84+
- Updated `ruff` requirement to `>=0.5.1,<0.15.2`. *(2026-02-16)*
85+
- Bumped `aquasecurity/trivy-action` from `0.33.1` to `0.34.0`. *(2026-02-16)*
86+
- Updated `ruff` requirement to `>=0.5.1,<0.15.1`. *(2026-02-12)*
87+
88+
---
89+
90+
## Conclusion
91+
92+
This release represents one of the most significant leaps forward in the Swarms framework to date. Over the past six weeks, nearly every major system — sub-agent orchestration, the hierarchical swarm, the CLI, and core agent infrastructure — has been meaningfully improved. Multi-agent workflows are faster with parallel execution, smarter with the judge agent, and more autonomous than ever with a fully async sub-agent registry that handles task tracking, retries, and cancellation out of the box. The CLI is cleaner, the defaults are more sensible, and a wide range of bugs that affected real-world usage have been resolved. Whether you are building simple pipelines or complex multi-layered swarms, the framework is more capable, more reliable, and easier to work with than it has ever been. We are grateful for every contributor, bug reporter, and community member who helped shape this release — and this is only the beginning of what is planned for v10.

docs/deployment_solutions/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This section covers various deployment strategies for Swarms agents and multi-ag
77
| Deployment Type | Use Case | Complexity | Scalability | Cost | Best For | Documentation Link | Status |
88
|------------------------|---------------------|------------|-------------|-----------|----------------------------------|-----------------------------------------------------------------------------|------------|
99
| **FastAPI + Uvicorn** | REST API endpoints | Low | Medium | Low | Quick prototypes, internal tools | [FastAPI Agent API Guide](fastapi_agent_api.md) | Available |
10-
| **Cron Jobs** | Scheduled tasks | Low | Low | Very Low | Batch processing, periodic tasks | [Cron Job Examples](../../examples/deployment_solutions/cron_job_examples/) | Available |
10+
| **Cron Jobs** | Scheduled tasks | Low | Low | Very Low | Batch processing, periodic tasks | [Cron Job Examples](../../examples/guides/deployment/cron_job_examples/) | Available |
1111

1212

1313
## Quick Start Guide
@@ -20,7 +20,7 @@ This section covers various deployment strategies for Swarms agents and multi-ag
2020

2121
- **Documentation**: [FastAPI Agent API](fastapi_agent_api.md)
2222

23-
- **Example Code**: [FastAPI Example](../../examples/deployment_solutions/fastapi_agent_api_example.py)
23+
- **Example Code**: [FastAPI Example](../../examples/guides/deployment/fastapi/fastapi_agent_api_example.py)
2424

2525

2626
### 2. Cron Jobs (Recommended for scheduled tasks)
@@ -29,7 +29,7 @@ This section covers various deployment strategies for Swarms agents and multi-ag
2929

3030
- **Setup time**: 2-5 minutes
3131

32-
- **Examples**: [Cron Job Examples](../../examples/deployment_solutions/cron_job_examples/)
32+
- **Examples**: [Cron Job Examples](../../examples/guides/deployment/cron_job_examples/)
3333

3434

3535

0 commit comments

Comments
 (0)