I will present joint work with Yiannis Sakellaridis and Akshay Venkatesh, in which we apply a perspective from topological field theory to the relative Langlands program. The main geometric objects are hyperspherical varieties for a reductive group, a nonabelian counterpart of hypertoric varieties which include the cotangent bundles of spherical varieties. To a hyperspherical variety one can assign two quantization problems, automorphic and spectral, both resulting in structures borrowed from QFT. The automorphic quantization (or A-side) organizes objects such as periods, Plancherel measure, theta series and relative trace formula, while the spectral quantization (or B-side) organizes L-functions and Langlands parameters. Our conjectures organize the relative Langlands program as a duality operation on hyperspherical varieties, which exchanges automorphic and spectral quantizations (and may be seen as Langlands duality for boundary conditions in 4d TFT, a refined form of symplectic duality / 3d mirror symmetry).