move gate dir to agent