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
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
What
Delete
Agent.handle_artifactsinswarms/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*.mdfiles. The only references are the method definition itself and a mention in theAgentclass docstring (agent.py:292).It is pure dead weight in an already 5,570-line file.
Scope
handle_artifactsmethod (swarms/structs/agent.py:4372-4447)handle_artifactsmention from theAgentclass docstring (agent.py:292)swarms.artifactsimports used only by this method become unused inagent.py, and remove them if soContext
Found during the code-waste audit (
CODE_WASTE_AUDIT.md, Part 1.6 — dead methods inagent.py). This is one of 16 dead methods identified inagent.py; this issue tracks onlyhandle_artifacts, the largest single one.🤖 Generated with Claude Code