Adaptive control of interconnected and muliti-agent systems