def add_task_flags_to_agent_opt(agent, opt, flags):
    """Allows to insert task flags in the task name itself, they are
    put inside the opt before the task is created.
    """
    fl = flags.split(':')
    task = []
    for f in fl:
        if '=' in f:
            one_flag = f.split('=')
            opt[one_flag[0]] = one_flag[1]
        else:
            task.append(f)
    opt['task'] = ':'.join(task)
