refactoring Agent
refactoring metric writers are created by the scenario
refactoring
refactored agent creation