Skip to content

[Bug][SkillOrchestra] run() silently drops imgs and execution kwargs before agent execution #1906

Description

@biancam5

Describe the bug

SkillOrchestra.run() exposes an imgs parameter for multiple image inputs and also accepts **kwargs, but these values are not fully propagated to the selected agents during execution.

This creates a silent mismatch between the public API and the actual execution behavior: callers can provide multiple images or additional execution arguments, but the selected agent never receives them.

To Reproduce

This can be observed directly from the current implementation in:

swarms/structs/skill_orchestra.py

  1. SkillOrchestra.run() accepts both imgs and **kwargs:
def run(
    self,
    task: str,
    img: Optional[str] = None,
    imgs: Optional[List[str]] = None,
    *args,
    **kwargs,
) -> Any:
  1. When run() delegates execution to _execute_agents(), only img and **kwargs are passed:
results = self._execute_agents(
    selected, current_task, img=img, **kwargs
)

imgs is not forwarded.

  1. _execute_agents() itself accepts **kwargs, but the selected agents are ultimately invoked with only task and img:
agent.run(task=agent_task, img=img)

and in the concurrent path:

executor.submit(
    agent.run, task=agent_task, img=img
)

So the additional keyword arguments are also discarded before reaching the agent.

For example:

orchestra.run(
    task="Analyze and compare these images",
    imgs=["image1.png", "image2.png"],
)

Based on the public API, the selected agent would be expected to receive the image list, but imgs is never propagated to the execution call.

Expected behavior

Arguments exposed by SkillOrchestra.run() should be consistently propagated to the selected agents.

In particular:

  • imgs should reach the selected agent(s).
  • Supported execution **kwargs should not be silently discarded.
  • The behavior should be consistent for both single-agent and multi-agent execution paths.

Alternatively, if these arguments are intentionally unsupported, they should not be exposed by the public run() API.

Additional context

A regression test covering imgs and additional keyword-argument forwarding for both execution paths would help prevent this behavior from returning in future changes.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions