def build_agent_command()

in project/paperbench/paperbench/nano/utils.py [0:0]


def build_agent_command(agent: "Agent") -> str:  # type: ignore
    """Builds the command to run the agent."""

    cmd = ["bash", f"{AGENT_DIR}/start.sh"]

    if agent.kwargs_type == "argparse":
        for key, value in agent.kwargs.items():
            cmd += [f"--{key}", str(value)]

    if agent.kwargs_type == "omegaconf":
        cmd += [f"{key}={value}" for key, value in agent.kwargs.items()]

    return " ".join(cmd)