According to the interop matrix, App Volumes 4.0.1 is compatible back to Horizon 7.10.0: VMware Product Interoperability Matrices
You can use the 2.18 agent with a 4 manager, but there are some considerations. Check out the App Volumes 4 Installation and Upgrade Considerations guide and check out the section on coexistence.