kyegomez/swarms

[Cleanup] Remove dead `handle_artifacts` method from Agent (agent.py)

Geschlossen

#1.823 geöffnet am 08.08.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (986 Forks)github user discovery
good first issuestructstech-debt

Repository-Metriken

Stars
 (7.040 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 3T 5h) (17 gemergte PRs in 30 T)

Beschreibung

What

Delete Agent.handle_artifacts in swarms/structs/agent.py:4372-4447 (~76 lines).

Why

A repo-wide audit found the method has zero call sites anywhere — verified by grepping across swarms/, examples/, tests/, scripts/, and *.md files. The only references are the method definition itself and a mention in the Agent class docstring (agent.py:292).

It is pure dead weight in an already 5,570-line file.

Scope

  • Delete the handle_artifacts method (swarms/structs/agent.py:4372-4447)
  • Remove the handle_artifacts mention from the Agent class docstring (agent.py:292)
  • Check whether the swarms.artifacts imports used only by this method become unused in agent.py, and remove them if so
  • Run the test suite to confirm nothing breaks (no test references this method)

Context

Found during the code-waste audit (CODE_WASTE_AUDIT.md, Part 1.6 — dead methods in agent.py). This is one of 16 dead methods identified in agent.py; this issue tracks only handle_artifacts, the largest single one.

🤖 Generated with Claude Code

Contributor Guide