ITADN

[refactor][multi-agent-exec] Remove unused async/uvloop execution functions

#1542Openkyegomez 创建于 2026-04-18
enhancementhelp wantedgood first issue
K
kyegomezcommented
## Summary Analysis of `swarms/structs/multi_agent_exec.py` found 2 uvloop-specific functions that are dead code — no callers in production library code, only referenced in `__init__.py` re-exports, examples, and docs. ## Functions to Delete | Function | Location | Reason | |---|---|---| | `run_agents_concurrently_uvloop` | L365 | No callers outside `__init__.py` re-export, examples, and docs | | `run_agents_with_tasks_uvloop` | L501 | No callers outside `__init__.py` re-export, examples, and docs | ## What Needs to Change - [ ] Delete the 2 functions from `swarms/structs/multi_agent_exec.py` - [ ] Remove their entries from `swarms/structs/__init__.py` - [ ] Delete example files that only exist for these functions: - `examples/multi_agent/exec_utilities/new_uvloop_example.py` - `examples/multi_agent/exec_utilities/uvloop_example.py` - `examples/multi_agent/concurrent_examples/uvloop/same_task_example.py` - `examples/multi_agent/concurrent_examples/uvloop/different_tasks_example.py` - `examples/guides/workshops/workshop_sep_20/same_task_example.py` - `examples/guides/850_workshop/uvloop_example.py` - [ ] Remove their entries from `docs/swarms/structs/various_execution_methods.md` - [ ] Verify no other files reference these names after deletion ## Why These functions have no callers in production library code and were likely superseded by `run_agents_concurrently` (which is actively used across `agent_rearrange.py`, `llm_council.py`, `majority_voting.py`, `mixture_of_agents.py`, `ma_blocks.py`). Keeping dead code adds maintenance burden and confuses consumers of the public API. ## Functions to Keep For reference, the following functions in the same file are actively used and must **not** be touched: - `run_single_agent` — used internally by `batched_grid_agent_execution` - `run_agent_async` — used internally by `run_agents_concurrently_async` - `run_agents_concurrently_async` — used internally by `run_agents_concurrently_multiprocess` - `run_agents_concurrently` — used in 5+ production structs - `run_agents_concurrently_multiprocess` — exported for external use - `batched_grid_agent_execution` — used in `llm_council.py`, `batched_grid_workflow.py` - `run_agents_with_different_tasks` — used in `spreadsheet_swarm.py` - `get_swarms_info` — used in `hybrid_hiearchical_peer_swarm.py` - `get_agents_info` — used in `agent_rearrange.py`, `aop.py`
0 条评论